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
creating infra / 新サービスのインフラ作ってた話
Search
ryosms
November 03, 2020
Technology
1
1k
creating infra / 新サービスのインフラ作ってた話
合同勉強会 in 大都会岡山 -2020 Winter Online-
ryosms
November 03, 2020
Tweet
Share
More Decks by ryosms
See All by ryosms
JetBrains Plugins / IDEと香辛料
ryosms
0
310
VS CodeでもGitKraken
ryosms
0
1.4k
量子コンピュータ完全に理解した / quantum computing perfect master
ryosms
1
280
Intro to Git GUI Client
ryosms
3
710
CloudGarageでJIRAを運用した感想
ryosms
1
740
再考 エンジニアの装備 〜武器編〜 / Weapon for Engineer
ryosms
2
180
AndroidをJUnit4でやる / Using JUnit4 with Android
ryosms
0
720
Other Decks in Technology
See All in Technology
UIテスト自動化サポート- Testbed for XCUIAutomation practice
notoroid
0
130
米国国防総省のDevSecOpsライフサイクルをAWSのセキュリティサービスとOSSで実現
syoshie
2
1.1k
Github Copilot エージェントモードで試してみた
ochtum
0
100
AIエージェント最前線! Amazon Bedrock、Amazon Q、そしてMCPを使いこなそう
minorun365
PRO
14
5k
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
11k
AWS テクニカルサポートとエンドカスタマーの中間地点から見えるより良いサポートの活用方法
kazzpapa3
2
530
Welcome to the LLM Club
koic
0
170
Microsoft Build 2025 技術/製品動向 for Microsoft Startup Tech Community
torumakabe
2
260
Observability infrastructure behind the trillion-messages scale Kafka platform
lycorptech_jp
PRO
0
140
より良いプロダクトの開発を目指して - 情報を中心としたプロダクト開発 #phpcon #phpcon2025
bengo4com
1
3.1k
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
260
Snowflake Summit 2025 データエンジニアリング関連新機能紹介 / Snowflake Summit 2025 What's New about Data Engineering
tiltmax3
0
310
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Bash Introduction
62gerente
614
210k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Six Lessons from altMBA
skipperchong
28
3.8k
Designing Experiences People Love
moore
142
24k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
A Tale of Four Properties
chriscoyier
160
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
KATA
mclloyd
29
14k
Optimizing for Happiness
mojombo
379
70k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
Transcript
新サービスのインフラ作ってた話 @合同勉強会 in 大都会岡山 -2020 Winter Online-
I am a GitKraken Ambassador, not a paid employee of
GitKraken by Axosoft. INTRODUCE MYSELF Ryo Sumasu @ryosms #gbdaitokai
拍手アプリ https://syobochim.hatenablog.com/entry/2020/10/31/205851 ⚫ ↓にアクセスすると拍手ができます ⚫ 拍手してもらえるとハゲみになります ⚫ https://dprn9mw3rdpyz.cloudfront.net/?id=c 466f4d0-00e3-4271-a626-93a09e705ce4
AGENDA ⚫ 前置き ⚫ インフラ構成 ⚫ デプロイ周り
会社・前業務・サービス内容 前置き
会社のこと https://www.rhizome-e.com/ ⚫ 株式会社リゾーム ⚫ 通称 #R社 ⚫ toB事業(主にショッピングセンター向け) ⚫
所属チームはRailsがメイン ⚫ 運用はAWS / heroku
前にやってた業務(抜粋) ⚫ toCサイト(閉鎖済み) ⚫ Spring Boot + Docker + Elastic
Beanstalk ⚫ Rundeck構築 ⚫ 社内システムの構築 ⚫ 主力商品(Rails)の検証環境構築の簡易化 ⚫ Vue.js + Cognito + AWS Amplify ⚫ API Gateway + AWS Lambda(Golang) + DynamoDB ⚫ Elastic Beanstalk (Docker multi container)
今回のサービスの概要 ⚫ ショッピングセンター向けWebサービス ⚫ 帳票出力有り ⚫ マルチテナントなクラウドサービス ⚫ もう少しでサービスイン
全体像 インフラ構成
None
個別 インフラ構成
Rails
帳票
ログ分析
ツールとか、デプロイ方法とか デプロイ周り
デプロイツール ⚫ CloudFormation ⚫ Terraform ⚫ ecspresso
CloudFormation https://aws.amazon.com/jp/cloudformation/ ⚫ インフラのガワを構築するのに利用 ⚫ VPC関連 ⚫ ECS Cluster ⚫
SQS ⚫ Elasticsearch ⚫ Lambda(sam cli) ⚫ CloudWatch Logs ロググループ ⚫ S3 ⚫ IAM ⚫ etc…
Terraform https://www.terraform.io/ ⚫ パラメータストアの管理に使用 ⚫ CloudFormationでは管理できないケースがある ⚫ https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/late st/UserGuide/aws-resource-ssm-parameter.html
ecspresso https://github.com/kayac/ecspresso ⚫ ECSサービスのデプロイに使用 ⚫ config.yml ⚫ service-def.json ⚫ task-def.json
ecspresso https://twitter.com/ryosms/status/1219871032485404675
ecspresso https://github.com/kayac/ecspresso ⚫ ECSサービスのデプロイに使用 ⚫ config.yml ⚫ service-def.json service-def.yml ⚫
task-def.json task-def.yml ⚫ yqを利用してyml→jsonに変換
デプロイ手順 ⚫ デプロイやDBのメンテ用にEC2を作成 ⚫ EC2の起動テンプレートとansibleで作り直し可能 ⚫ 手元で動かせるように同様のDockerイメージも作成 ⚫ 各手順はすべてコマンドで実行 ⚫
複雑なコマンドは手順をシェルスクリプトにしたりしている
デプロイ手順 ⚫ 最新ソースをgit pull ⚫ terraform applyでパラメータストア更新 ⚫ CFnのOutputから環境変数作成 ⚫
サービス定義・タスク定義のjson生成 ⚫ Dockerイメージのbuild・push ⚫ ECSサービスのデプロイ
もっと簡単にデプロイしたい めんどくさい
めんどくさい処理はRundeckにやらせよう Rundeck
Rundeckでのデプロイ手順 ⚫ RundeckのWebコンソールにログインする ⚫ 本プロジェクトのページに移動する ⚫ デプロイ用のJobを実行する
Rundeckでのデプロイ手順
I am a GitKraken Ambassador, not a paid employee of
GitKraken by Axosoft. Use my referral URL to be entered to win a Nintendo Switch! www.gitkraken.com/invite/xKSqCHYi