Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ベンチャー入社後の3年間でDevOps実践して開発・運用体験を劇的に改善した話
Search
Tomohiko Ozawa
June 22, 2023
Programming
1
370
ベンチャー入社後の3年間でDevOps実践して開発・運用体験を劇的に改善した話
Tomohiko Ozawa
June 22, 2023
Tweet
Share
More Decks by Tomohiko Ozawa
See All by Tomohiko Ozawa
カスタム GitHub Actions 超入門
kota65535
5
3.4k
Other Decks in Programming
See All in Programming
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
4.2k
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.4k
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.9k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
200
EventSourcingの理想と現実
wenas
6
2.2k
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
390
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1.1k
イベント駆動で成長して委員会
happymana
1
260
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
Designing the Hi-DPI Web
ddemaree
280
34k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Being A Developer After 40
akosma
86
590k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Ruby is Unlike a Banana
tanoku
96
11k
Transcript
© 2023 SRE Holdings Corporation 証券コード:2980 © 2023 SRE Holdings
Corporation 3 DevOps 2023/06/21
© 2023 SRE Holdings Corporation SRE Holdings 2 2014 2019
SRE / AI DX DX IT
© 2023 SRE Holdings Corporation • (@kota65535) • • ⁃
⁃ ⁃ ⁃ CI/CD ⁃ • AWS ⁃ AWS Certified Solution Architect Professional 3
© 2023 SRE Holdings Corporation • Dev Ops • 2
• DevOps 4
© 2023 SRE Holdings Corporation • • • • DevOps
5
© 2023 SRE Holdings Corporation • Continuous Integration ⁃ •
Continuous Delivery ⁃ • Microservices ⁃ IF ⾒ • Infrastructure as Code ⁃ • Monitoring and Logging ⁃ • Communication and Collaboration ⁃ DevOps by AWS 6
© 2023 SRE Holdings Corporation 1. ⁃ ⁃ ⁃ CI/CD
2. 3. ⁃ DevOps 7
© 2023 SRE Holdings Corporation 8 Backend Java Spring Boot
MySQL OpenAPI Docker AWS ECS Python FastAPI Frontend Infra/Monitoring TypeScript React Material UI Emotion AWS S3 AWS CloudFront Vitest Cypress AWS Terraform Ansible GitHub GitHub Actions Envoy CloudWatch CI/CD X-Ray SonarCloud Trivy Vite
© 2023 SRE Holdings Corporation 9
© 2023 SRE Holdings Corporation • CI/CD : GitHub Actions
⁃ GitHub ⾒ ⁃ Action • setup-java: Java • github-openvpn-connect-action: OpenVPN • : GitHub Flow ⁃ main Feature ⁃ vs. Git Flow • Web • • ⁃ ⁃ CI/CD 10
© 2023 SRE Holdings Corporation • App Repo ⁃ ⁃
⁃ • : foo-front, foo-back ⁃ CI • Infra Repo ⁃ (Terraform) ⁃ App Repo ⁃ • : dev, stg, prod ⁃ CD 11 foo ├── build.gradle ├── foo-back └── foo-front foo-infra ├── envs │ ├── dev │ ├── prod │ └── stg ├── files └── modules
© 2023 SRE Holdings Corporation App Repo CI 12
© 2023 SRE Holdings Corporation • 1 2 • •
Pros. ⁃ ⁃ ⁃ • Cons. ⁃ CI ⁃ ⾒ • : ⁃ 1 ~8 ⁃ ⁃ ⾒ 頻 App Repo - vs 13
© 2023 SRE Holdings Corporation • • • GNU Make
⁃ ⁃ ⾒ • Bazel ⁃ ⁃ • Gradle ⁃ ⁃ Java 頻 ⁃ App Repo - 14
© 2023 SRE Holdings Corporation • Pros. ⁃ ⁃ Java
⁃ ⁃ ⁃ Gradle Wrapper ⁃ Groovy • Cons. ⁃ • • IntelliJ App Repo - Gradle 15
© 2023 SRE Holdings Corporation • Language-agnostic • clean ⁃
• check ⁃ • assemble ⁃ • build ⁃ check, assemble App Repo - Gradle 16
© 2023 SRE Holdings Corporation • App Repo - Gradle
(1/3) 17 assemble jar dockerBuild (Java) assemble npmBuild (Node) zip check test checkstyle check npmTest eslint
© 2023 SRE Holdings Corporation • App Repo - Gradle
(2/3) 18 assemble check assemble npmBuild (Node) zip check npmTest eslint assemble jar dockerBuild (Java) check test checkstyle
© 2023 SRE Holdings Corporation • App Repo - Gradle
(3/3) 19 assemble check assemble npmBuild (Node) zip check npmTest eslint assemble jar dockerBuild (Java) check test checkstyle
© 2023 SRE Holdings Corporation • • ⁃ ⁃ build
• ⁃ ⁃ check App Repo - (1/4) 20 Backend Frontend Build Check 📝
© 2023 SRE Holdings Corporation 1. ⁃ paths- lter ⁃
• • 2. ⁃ Gradle Project ⁃ App Repo - (2/4) 21 foo-back: - foo-back/** - * foo-front: - foo-front/** - * $ cd foo-back $ gradle dependentProjects –q :foo-front
© 2023 SRE Holdings Corporation • Composite Action • App
Repo - (3/4) 22 prepare-build: runs-on: ubuntu-latest outputs: changed: ${{ steps.services.outputs.changed }} # 変更されたサービスのリスト affected: ${{ steps.services.outputs.affected }} # 影響のあるサービスのリスト steps: - name: Checkout uses: actions/checkout@v3 - name: Get services uses: ./.github/actions/get-services id: services
© 2023 SRE Holdings Corporation • Matrix App Repo -
(4/4) 23 build-changed: needs: - prepare-build if: ${{ needs.prepare-build.outputs.changed != '[]' }} strategy: matrix: service: ${{ fromJSON(needs.prepare-build.outputs.changed) }} uses: ./.github/workflows/build-service.yml with: service: ${{ matrix.service }} check-affected: needs: - prepare-build if: ${{ needs.prepare-build.outputs.affected != '[]' }} strategy: matrix: service: ${{ fromJSON(needs.prepare-build.outputs.affected) }} uses: ./.github/workflows/check-service.yml with: service: ${{ matrix.service }}
© 2023 SRE Holdings Corporation App Repo - CI 24
© 2023 SRE Holdings Corporation App Repo - CI: Build
(1/4) 25
© 2023 SRE Holdings Corporation • PR / PR Push
• Gradle build / check App Repo - CI: Build (2/4) 26
© 2023 SRE Holdings Corporation • (Sonar Scanner) ⁃ ⁃
SonarCloud • PR App Repo - CI: Build (3/4) 27
© 2023 SRE Holdings Corporation • Slack • App Repo
- CI: Build (4/4) 28 •
© 2023 SRE Holdings Corporation App Repo - CI: Release
(1/6) 29
© 2023 SRE Holdings Corporation • PR / PR Push
• Gradle build / check App Repo - CI: Release (2/6) 30
© 2023 SRE Holdings Corporation • (Sonar Scanner) App Repo
- CI: Release (3/6) 31
© 2023 SRE Holdings Corporation • CodeArtifact Publish ⁃ Bundle
(Jar) ⁃ OpenAPI Document (YAML) • ECR Push ⁃ Docker Image • API & Publish ⁃ OpenAPI YAML HTML ⁃ Redoc ⁃ S3 App Repo - CI: Release (4/6) 32
© 2023 SRE Holdings Corporation • Infra Repo Release ⁃
Repository Dispatch ⁃ • • • App Repo - CI: Release (5/6) 33 { "services": [ { "name": "foo-back", "version": "1.2.3", "island": "01" } ] }
© 2023 SRE Holdings Corporation • Slack • @here ⁃
Release App Repo - CI: Release (6/6) 34
© 2023 SRE Holdings Corporation Infra Repo CD 35
© 2023 SRE Holdings Corporation Infra Repo - CD 36
© 2023 SRE Holdings Corporation • App Repo Release •
TF Infra Repo CD: Bump 37
© 2023 SRE Holdings Corporation Infra Repo CD: Plan (1/4)
38
© 2023 SRE Holdings Corporation Infra Repo CD: Plan (2/4)
39 • Bump Push • Terraform Plan
© 2023 SRE Holdings Corporation Infra Repo CD: Plan (3/4)
40 • PR PR Plan ⁃ [Click here] Plan
© 2023 SRE Holdings Corporation Infra Repo CD: Plan (4/4)
41 • main Slack Plan • Apply
© 2023 SRE Holdings Corporation Infra Repo CD: Apply (1/4)
42
© 2023 SRE Holdings Corporation Infra Repo CD: Apply (2/4)
43 • Apply OK ⁃ • Terraform Apply ⁃ Plan Plan
© 2023 SRE Holdings Corporation Infra Repo CD: Apply (3/4)
44 • ⁃ CodeDeploy ECS Blue/Green
© 2023 SRE Holdings Corporation Infra Repo CD: Apply (4/4)
45 • ⁃ CodeArtifact Bundle ⁃ Hosting S3 ⁃ CloudFront
© 2023 SRE Holdings Corporation • ⁃ GitHub Template repository
• 46
© 2023 SRE Holdings Corporation • Terraform Providers ⁃ terraform-provider-maven
⁃ terraform-provider-unarchive ⁃ terraform-provider-temporary • Terraform Modules ⁃ terraform-aws-github-work ow-dispatch ⁃ terraform-aws-github-work ow-dispatch-slack ⁃ terraform-aws-s3-deployment CI/CD OSS 47 • GitHub Actions ⁃ github-terraform-plan-comment-action ⁃ github-terraform-plan-slack-action ⁃ github-workflow-dispatch-action ⁃ github-workflow-dispatch-slack-action ⁃ github-openvpn-connect-action ⁃ github-asdf-parse-action ⁃ github-git-config-action ⁃ github-template-sync-action ⁃ github-template-rename-action
© 2023 SRE Holdings Corporation • ⁃ PR 10 Dev
⁃ ⁃ • ⁃ ⁃ • ⁃ ChatOps Apply ⁃ 築 CI/CD 48
© 2023 SRE Holdings Corporation DX (Developer Experience) 1 49
© 2023 SRE Holdings Corporation