æ°è¦ãµã¼ãã¹ã®éçºãã¼ã ã«æå±ãã¦ããkarabishã§ãã
2021å¹´11æã«JJUG CCC 2021 Fallã«ã¦ãå¤æ 管çãµã¼ããã¹ã¦ãã®ç¶ç¶çãã¹ãã®åãçµã¿ãã¨ãããã¼ãã§ç»å£ãã¾ããã ããã©ã¼ãã³ã¹ãã¹ãã®èªååã«ã¤ãã¦çºè¡¨ããã®ã§ãããçºè¡¨æã¯ã©ããããã¨ããã£ãã®ãã®ã¿ããä¼ããã¾ããã®ã§æ¬ããã°ã§ã¯å ·ä½çãªæ¹æ³ããä¼ãã§ããã°ã¨æãã¾ãã
- JJUG CCC 2021 Fallã¨ã¯
- ãªãããã©ã¼ãã³ã¹ãã¹ãã®èªååãåãçµã¿ããã®ã
- ããã©ã¼ãã³ã¹ãã¹ãã®èªååã§å©ç¨ãããã®
- Ansible/JMeter/Grafana/InfluxDB/PostgreSQLã®ç°å¢æ§ç¯
- ããã©ã¼ãã³ã¹ãã¹ããèªååãããåã¯
- ã¾ã¨ã
JJUG CCC 2021 Fallã¨ã¯
JJUG CCCã¯æ¯å¹´2åãæ¥ã¨ç§ã«éå¬ããæ¥æ¬æ大ã®Javaã³ãã¥ããã£ã¤ãã³ãã§ããJavaé¢é£ã®æè¡ãäºä¾ã«é¢ããè¯è³ªãªã»ãã·ã§ã³ãè¡ãããã¾ãç°ãªãåéã§æ´»èºããJavaæè¡è ãéã¾ãå ´ã¨ããªã£ã¦ãã¾ãã
https://fortee.jp/jjug-ccc-2021-fall
ç»å£è³æã¯ãã¡ã
é¢é£ããã°ã¨ãã¦ä»¥ä¸ãåããã¦ã確èªãã ããï¼
tech-blog.rakus.co.jp
ãªãããã©ã¼ãã³ã¹ãã¹ãã®èªååãåãçµã¿ããã®ã
ãããããªãããã©ã¼ãã³ã¹ãã¹ããèªååããåãçµã¿ããã®ãã§ãããããã©ã¼ãã³ã¹ãã¹ããèªååããåã¯3ã¤ã®åé¡ãããã¾ããã ãã®3ã¤ã®åé¡ãããæ°è»½ã«ã§ãã¦ããªãã£ããã¨ã§ãããã©ã¼ãã³ã¹ã®æ¹åããããã¨ãé£ããã£ãããæ¹åã«åãçµã¿ã¾ããã
ããã©ã¼ãã³ã¹ãã¹ãã®èªååã§å©ç¨ãããã®
ãã¡ãã®ãã¼ã«ãå©ç¨ããã®ã§ãããåãã¼ã«ã®å½¹å²ã¯ä»¥ä¸ã®éãã§ãã
- Gitlab CI
- ããã©ã¼ãã³ã¹ãã¹ãã®ã¤ãã³ããçºç«ãã
- Ansible
- JMeterã«ããã©ã¼ãã³ã¹ãã¹ããå®è¡ãã¦ããã
- JMeterã®å®è¡çµæãInfluxDB/PostgreSQLã«ãã¼ã¿ãæ°¸ç¶åãã¦ããã
- JMeter
- ããã©ã¼ãã³ã¹ãã¹ããå®è¡ãã
- Grafana
- ããã©ã¼ãã³ã¹ãã¹ãçµæãã°ã©ãåãã
- InfluxDB
- ããã©ã¼ãã³ã¹ãã¹ãçµæã®HTTPãªã¯ã¨ã¹ããã¨ã®çµæãæ°¸ç¶åãã
- PostgreSQL
- ããã©ã¼ãã³ã¹ãã¹ãçµæã®çµ±è¨æ å ±ãæ°¸ç¶åãã
Ansible/JMeter/Grafana/InfluxDB/PostgreSQLã®ç°å¢æ§ç¯
Ansible
Gitlab CIä¸ã§Ansibleãã¤ã³ã¹ãã¼ã«ãããDockerãå©ç¨ãã¦ãã¾ãã
JMeter
JMeterã®æ§ç¯ã¯JDKã®ã¤ã³ã¹ãã¼ã«ã¨ãå
¬å¼ãµã¤ããããã¤ããªãã¡ã¤ã«ã解åããã°å©ç¨å¯è½ã«ãªãã¾ãã
ãã¥ã¼ãã³ã°ããç®æã¯JMeterãå©ç¨ããã¡ã¢ãªãGCããããç°å¢ã«åãããå¿
è¦ãããããã§ãã
Grafana/InfluxDB/PostgreSQL
Grafana/InfluxDB/PostgreSQLã¯podmanä¸ã«æ§ç¯ãã¦ãã¾ããå©ç¨ãã¦ããCentOSãdockerããµãã¼ããã¦ããªãã£ãããpodmanãå©ç¨ãã¦ãã¾ãã CentOSã¸ã®podmanã®ã¤ã³ã¹ãã¼ã«ã¯yumã§ã¤ã³ã¹ãã¼ã«å¯è½ã§ãã
podmanã¯ä»¥ä¸ã®ããã«ãããã§ã¹ããè¨è¼ããpodman play kube {ãããã§ã¹ã}
ãå®è¡ããã°podãæ§ç¯ãã¦ããã¾ãã
apiVersion: v1 kind: Pod metadata: labels: app: dashboard name: dashboard spec: containers: - name: grafana image: grafana/grafana ports: - containerPort: 3000 hostPort: 3000 protocol: TCP - name: influxdb image: influxdb env: - name: DOCKER_INFLUXDB_INIT_MODE value: setup - name: DOCKER_INFLUXDB_INIT_USERNAME value: root - name: DOCKER_INFLUXDB_INIT_PASSWORD value: password - name: DOCKER_INFLUXDB_INIT_ORG value: org - name: DOCKER_INFLUXDB_INIT_BUCKET value: performancetest - name: DOCKER_INFLUXDB_INIT_ADMIN_TOKEN value: admintoken ports: - containerPort: 8086 hostPort: 8086 protocol: TCP volumeMounts: - name: pv-influxdb mountPath: /var/lib/influxdb2 - name: pv-influxdb-config mountPath: /etc/influxdb2 - name: postgres image: postgres env: - name: POSTGRES_USER value: postgres - name: POSTGRES_PASSWORD value: postgres - name: POSTGRES_DB value: performancetest ports: - containerPort: 5432 hostPort: 5432 protocol: TCP volumeMounts: - name: pv-postgres mountPath: /var/lib/postgresql/data volumes: - name: pv-postgres hostPath: path: /usr/local/dashboard/data/postgres type: Directory - name: pv-influxdb hostPath: path: /usr/local/dashboard/data/influxdb/data type: Directory - name: pv-influxdb-config hostPath: path: /usr/local/dashboard/data/influxdb/config type: Directory
ããã©ã¼ãã³ã¹ãã¹ããèªååãããåã¯
ããã©ã¼ãã³ã¹ãã¹ãã®èªååã«ã¤ãã¦èª¬æããåã«5ã¤ã®ã¹ãããã§ä½æ¥ãè¡ã£ã¦ãã¾ããã
åºæ¬çã«ã¯ãã®ä½æ¥ãèªååãã¦ãã¾ãã
1. è² è·ãããããµã¼ããæ§ç¯ãã
Gitlab CIããã¤ãã³ããåãåããAnsibleã«ã¦è² è·ãããããµã¼ããæ§ç¯ãã¾ãã
AWSã ã¨terraformãå®è¡ãããããªã¤ã¡ã¼ã¸ã§ãã
2. è² è·ãããããµã¼ããæ§ç¯ãã
Ansible/JMeter/Grafana/InfluxDB/PostgreSQLã®ç°å¢æ§ç¯ãåç §ãã ããã
3. JMeterã·ããªãªãå®è¡ãã
JMeterã·ããªãªã¯jmeter -n -t {ã·ããªãªãã¡ã¤ã«} -l {JTLãã¡ã¤ã«ã®åºåå
} -e -o {ã¬ãã¼ãã®åºåå
}
ãå®è¡ãããã¨ã§å¯è½ã§ãã
JTLãã¡ã¤ã«ã¯HTTPãªã¯ã¨ã¹ããã¨ã®çµæã§ãã®å¾InfluxDBã«æ°¸ç¶åããã¬ãã¼ãã®åºåå
ã¯çµ±è¨æ
å ±ã§ãã®å¾ã«PostgreSQLã«æ°¸ç¶åãã¾ãã
4. JTLãã¡ã¤ã«ãã¤ã³ãã¼ããã
JTLãã¡ã¤ã«ãInfluxDBã«æ°¸ç¶åã¯influx write --org {DOCKER_INFLUXDB_INIT_ORG} --token {DOCKER_INFLUXDB_INIT_ADMIN_TOKEN} --host http://{ã¨ã³ããã¤ã³ã}:8086 --bucket {DOCKER_INFLUXDB_INIT_BUCKET} --file {CSVãã¡ã¤ã«}
ãå®è¡ãããã¨ã§å¯è½ã§ãã
5. çµ±è¨æ å ±ãã¤ã³ãã¼ããã
çµ±è¨æ
å ±ã¯JSONå½¢å¼ã§ä¿åããã¦ãããããSQLã«å¤æãpsql
ã³ãã³ãã§INSERTãã¦ãã¾ãã
6. Grafanaã§InfluxDB/PostgreSQLã«ããçµæãã°ã©ãåãã
ã¾ãã¯GrafanaããInfluxDBã¨PostgreSQLã«æ¥ç¶ããããã®Data Sourcesãè¨å®ãã¾ãã
- InfluxDBã®Data Sourcesè¨å®ã¯ãã¡ããåç §ãã ããã
- PostgreSQLã®Data Sourcesè¨å®ã¯ãã¡ããåç §ãã ããã
InfluxDBã¨PostgreSQLã«æ¥ç¶ã§ããããã«ãªã£ãããããã¨ã¯è¡¨ç¤ºããã°ã©ãè¨å®ããã¡ããåç
§ã«è¨å®ããã®ã¿ã¨ãªãã¾ãã
ã¾ããä»åã¯GUIããå種è¨å®ãããã®ã§ãããèµ·åæã«ãããã¸ã§ãã³ã°ãããã¨ããã¡ãã«ããéãå¯è½ã§ãã
ã¾ã¨ã
ããã©ã¼ãã³ã¹ãã¹ãã®ã¤ãã³ããçºç«ããä½æ¥ãããã°ãã¹ããèªååãããããã«ãªãã¾ããã
ããã§æ¬æ¥ããããã£ãããã©ã¼ãã³ã¹æ¹åã«åãçµã¿ãã§ããããã«ãªãã®ã§ã¯ã¨æãã¾ãã
ã¨ã³ã¸ãã¢ä¸éæ¡ç¨ãµã¤ã
ã©ã¯ã¹ã§ã¯ãã¨ã³ã¸ãã¢ã»ãã¶ã¤ãã¼ã®ä¸éæ¡ç¨ãç©æ¥µçã«è¡ã£ã¦ããã¾ãï¼
ãèå³ããã¾ãããæ¯éã確èªããé¡ããã¾ãã
https://career-recruit.rakus.co.jp/career_engineer/ã«ã¸ã¥ã¢ã«é¢è«ãç³è¾¼ã¿ãã©ã¼ã
ã©ã®è·ç¨®ã«å¿åããã°è¯ããããããªãã¨ããæ¹ã¯ãã«ã¸ã¥ã¢ã«é¢è«ãéæè¡ã£ã¦ããã¾ãã
以ä¸ãã©ã¼ã ãããç³è¾¼ã¿ãã ããã
rakus.hubspotpagebuilder.comã¤ãã³ãæ å ±
ä¼ç¤¾ã®é°å²æ°ãç¥ãããæ¹ã¯ãæ¯é±éå¬ãã¦ããã¤ãã³ãã«ãåå ãã ããï¼
rakus.connpass.com