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
Patterns In Infrastructure as Code
Search
Takeshi Kondo
April 24, 2020
Technology
8
6.2k
Patterns In Infrastructure as Code
Infra Study Meetup#1
https://forkwell.connpass.com/event/171560/
Takeshi Kondo
April 24, 2020
Tweet
Share
More Decks by Takeshi Kondo
See All by Takeshi Kondo
SRE NEXT CfP チームが語る 聞きたくなるプロポーザルとは / Proposals by the SRE NEXT CfP Team that are sure to be accepted
chaspy
2
1.4k
Slack Platform(Deno) での RAG 実装 - LangChain(js) を使ってみた / rag-implementation-on-slack-platform-deno-experimenting-with-langchain-js
chaspy
0
250
SRE の考えをマネジメントに活かす / applying SRE ideas to management
chaspy
7
7.8k
RAGの簡易評価によるフィードバックサイクル実践 / Feedback cycle practice through simplified assessment of RAGs
chaspy
2
5.6k
定量データと定性評価を用いた技術戦略の組織的実践 / Systematic implementation of technology strategies using quantitative data and qualitative evaluation
chaspy
9
2k
エンジニアブランディングチームの KPI / KPI's of engineer branding team
chaspy
2
2.3k
「SLO Review」今やるならこうする / If I had to do the "SLO Review" again
chaspy
3
2.1k
開発者とともに作る Site Reliability Engineering / SREing with Developers
chaspy
10
8.5k
自己診断能力の獲得を目指して / Toward the acquisition of self-diagnostic skills
chaspy
1
5.3k
Other Decks in Technology
See All in Technology
Kotlinで型安全にバイテンポラルデータを扱いたい! ReladomoラッパーをAIと実装してみた話
itohiro73
3
240
書籍『実践 Apache Iceberg』の歩き方
ishikawa_satoru
0
470
戦えるAIエージェントの作り方
iwiwi
22
11k
Digitization部 紹介資料
sansan33
PRO
1
5.8k
Amazon Athena で JSON・Parquet・Iceberg のデータを検索し、性能を比較してみた
shigeruoda
1
300
MCP サーバーの基礎から実践レベルの知識まで
azukiazusa1
12
4.7k
Data Engineering Guide 2025 #data_summit_findy by @Kazaneya_PR / 20251106
kazaneya
PRO
7
1.2k
プロダクトエンジニアとしてのマインドセットの育み方 / How to improve product engineer mindset
saka2jp
1
170
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
250
Open Table Format (OTF) が必要になった背景とその機能 (2025.10.28)
simosako
3
640
AIエージェントを導入する [ 社内ナレッジ活用編 ] / Implement AI agents
glidenote
1
190
短期間でRAGシステムを実現 お客様と歩んだ生成AI内製化への道のり
taka0709
1
180
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Producing Creativity
orderedlist
PRO
348
40k
Bash Introduction
62gerente
615
210k
BBQ
matthewcrist
89
9.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
720
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Rails Girls Zürich Keynote
gr2m
95
14k
Git: the NoSQL Database
bkeepers
PRO
431
66k
We Have a Design System, Now What?
morganepeng
54
7.9k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Balancing Empowerment & Direction
lara
5
710
Transcript
Patterns In Infrastructure as Code Takeshi Kondo / @chaspy Infra
Study Meetup #1
Passed
Agenda • Infrastructure as Code in Quipper • Patterns in
Infrastructure as Code 1. Environment Pattern 2. Scaffold Pattern 3. Backup Pattern
Agenda • Infrastructure as Code in Quipper • Patterns in
Infrastructure as Code 1. Environment Pattern 2. Scaffold Pattern 3. Backup Pattern • What • Why • Point • Example
Agenda • Infrastructure as Code in Quipper • Patterns in
Infrastructure as Code 1. Environment Pattern 2. Scaffold Pattern 3. Backup Pattern
Infrastructure as Code in Quipper (1) • Infrastructure / Cloud
(AWS) • Terraform • Codenize.tools (Miam, Roadworker) • Application Platform (Kubernetes) • Kube-aws • Server Provisioning • Ansible
Infrastructure as Code in Quipper (2) • SaaS Configuration •
Datadog • Dashboard • SLO • Monitor • Pingdom • Deadman’s snitch • CircleCI • Environment Variables
Infrastructure as Code in Quipper(2) • SaaS Configuration • Datadog
• Dashboard • SLO • Monitor • Pingdom • Deadman’s snitch • CircleCI • Environment Variables Terraform Codenize.tools (Barkdog) circleci-env (Internal tool)
Infrastructure as Code in Quipper(2) • SaaS Configuration • Datadog
• Dashboard • SLO • Monitor • Pingdom • Deadman’s snitch • CircleCI • Environment Variables Terraform Codenize.tools (Barkdog) circleci-env (Internal tool)
Infrastructure as Code in Quipper(2) • SaaS Configuration • Datadog
• Dashboard • SLO • Monitor • Pingdom • Deadman’s snitch • CircleCI • Environment Variables Terraform Codenize.tools (Barkdog) circleci-env (Internal tool)
Agenda • Infrastructure as Code in Quipper • Patterns in
Infrastructure as Code 1. Environment Pattern 2. Scaffold Pattern 3. Backup Pattern • What • Why • Point • Example
Environment Pattern
Environment Pattern Production Resource Staging Resource Staging Code Production Code
Infrastructure as Code - Chapter 9. Patterns for Defining Infrastructure Apply Apply Change Change
Environment Pattern: Why • To minimize blast radius • To
test before releasing to production
Environment Pattern: Point • Don’t Repeat Yourself • Minimize commonality
• Keep it simple stupid • Enforcing, not communize Infrastructure as Code - 9.2.7 Approaches to Sharing Definitions
Environment Pattern: Example services ᵓᴷᴷ hoge-service ᴹ ᵓᴷᴷ production ᴹ
ᴹ ᵓᴷᴷ aurora.tf ᴹ ᴹ ᵓᴷᴷ main.tf ᴹ ᴹ ᵓᴷᴷ provider.tf ᴹ ᴹ ᵓᴷᴷ terraform.tf ᴹ ᴹ ᵓᴷᴷ terraform.tfvars ᴹ ᴹ ᵓᴷᴷ variables.tf ᴹ ᴹ ᵋᴷᴷ versions.tf ᴹ ᵋᴷᴷ staging ᴹ ᵓᴷᴷ aurora.tf ᴹ ᵓᴷᴷ main.tf ᴹ ᵓᴷᴷ provider.tf ᴹ ᵓᴷᴷ terraform.tf ᴹ ᵓᴷᴷ terraform.tfvars ᴹ ᵓᴷᴷ variables.tf ᴹ ᵋᴷᴷ versions.tf ᵋᴷᴷ modules Terraform ansible ᵋᴷᴷ ubuntu1804 ᵓᴷᴷ reverse-proxy-production ᴹ ᵓᴷᴷ goss ᴹ ᵓᴷᴷ group_vars ᴹ ᴹ ᵓᴷᴷ all.yml ᴹ ᴹ ᵓᴷᴷ development.yml ᴹ ᴹ ᵋᴷᴷ staging.yml ᴹ ᵓᴷᴷ hosts-development ᴹ ᵓᴷᴷ hosts-test ᴹ ᵓᴷᴷ roles ᴹ ᴹ ᵋᴷᴷ nginx ᴹ ᴹ ᵓᴷᴷ files ᴹ ᴹ ᵓᴷᴷ tasks ᴹ ᴹ ᵋᴷᴷ templates ᴹ ᵋᴷᴷ site.yml ᵓᴷᴷ reverse-proxy-staging ᵓᴷᴷ common-roles ᵓᴷᴷ datadog ᵓᴷᴷ td-agent Ansible
Scaffold Pattern
Scaffold Pattern Template Input variable Code Generate
Scaffold Pattern: Why • To make self-service easier • Reduce
cognitive load Infrastructure as Code - 9.1.6 Self-Service Environments
Scaffold Pattern: Point • Write a document • Make each
program do one thing well https://en.wikipedia.org/wiki/Unix_philosophy
Scaffold Pattern: Example • Create new application with Kubernetes manifest
• Create new resource with Terraform HCL • Create AWS Aurora resource definition • Create Datadog SLO Definition
Create AWS Aurora resource definition
Backup Pattern
Backup Pattern Code Resource Import Change manually
Backup Pattern Code Resource Import Change manually Apply
Backup Pattern: Why • Easy to change from GUI (especially
SaaS Configuration) • For backup • For greppability • For bulk replacement
Backup Pattern: Point • Sync Interval • If long, it
may overwrite the actual configuration
Backup Pattern: Example • Datadog Dashboard • Datadog Monitor •
Jenkins Configuration (SCM Sync Plugin)
Datadog Dashboard
Let’s Read http://shop.oreilly.com/product/0636920294382.do
Special Thanks • @suzuki-shunsuke • To lead splitting Terraform state
• To improve CI/CD pipeline • SRE graduates • To introduce of Infrastructure as Code • To build workflow with maintainability
Happy (Infrastructure as) Coding
Thank You! chaspy chaspy_ Site Reliability Engineer at Quipper Takeshi
Kondo Terraform-jp