SlideShare a Scribd company logo
Mastering IaC
the DevOps Way
2006-2010
Hello!
I am smalltown
MaiCoin Site Reliability Engineer
Taipei HashiCorp UG Organizer
AWS UG Taiwan Staff
Taipei HashiCorp User Group
● Vault Workshop:幫 Credentials 找個
窩 (2019/06)
● DevOpsDays Taipei: AWS
Kubernetes Service Mesh Workshop
(Tomorrow 13:00~17:00)
● Hack 'n' Roll: Kubernetes From Zero
To Hero (2019/11/09)
About 2017...
But Maybe Not So Far...
What Problem We Facing
● Permission Control
● Infrastructure Quality
● Collaboration
● Efficiency & Productivity
Post-IaC Era Permission Unit Testing Integration Testing GitOps
Post-IaC Era Permission Unit Testing Integration Testing GitOps
Infrastructure as Code
● The Process of Managing and Provisioning
Computer Data Centers Through
Machine-Readable Definition Files
Iac First Generation
~$ apt-get update
~$ apt-get install
-y tar=1.16.1
package 'tar' do
version '1.16.1'
action :install
end
👉 Record Your Provision Procedure with
CM Tool, Not Document !
R.I.P. Configuration Management
Why?
Stateful Service
Stateless Service
Cloud Provider
Orchestrator
IaC Second Generation
👉 Record Your Cloud Resource with IaC
Tool, Not Document !
resource "aws_s3_bucket" "b" {
bucket = "my_tf_test_bucket"
acl = "private"
tags { Name = "My_bucket" }
}
IaC Second Generation is Hot Now!
… etc
AWS CDKPulumiTerraform
Post-IaC Era Permission Unit Testing Integration Testing GitOps
Do you know the Prod.
environment broken ? 😠
I think I execute
terraform destroy
in Alpha...maybe 😱
We need the multiple
accounts or projects
architecture with
cloud provider 🍯
I feel it’s complicated,
why we need that 🤔
Who Can Cause a Service Broken?
Developer!
Who Can Ruin Entire Infrastructure?
SRE!
Multiple Accounts/Projects Architecture?!
● There are Multiple Environments for One
General Application
● Due to Application Need to be Tested, but
not Impact the Real Users
● Production Environments Don’t Allow
Access at Will
● Infrastructure Becomes Code Now, Hence,
It Need to be Treated as The Same Way
Multiple Accounts/Projects Architecture
Beta
RobotRead Write
Prod
RobotRead Write
Alpha
RobotRead Write
Multiple Accounts/Projects Architecture
● The Write Role is For Human Usage
if Necessary
● Production Write and Robot Role
Only can be Permitted Through
Change Management Process
● Don’t Manage Infrastructure By
Your Laptop
Prod
RobotRead Write
Don't Repeat Yourself (DRY)
● Keep Code DRY
● Keep Configuration DRY
● Keep CLI Flags DRY
● No Matter What IaC Tools Been Used, You
Could Take a Look at Terragrunt
Keep Code DRY
● Separate Different
Account or Project by
Folder
IaC
├── aws
│ ├── alpha-ac
│ │ ├── us-east-1
│ │ │ ├── database
│ │ │ ├── elastic
│ │ │ ├── ...
│ │ │ └── kubernetes
│ │ └── us-west-2
│ ├── beta-ac
│ └── prod-ac
├── azure
└── gcp
Keep Code DRY
● Separate Code and Configuration!
● Separate Code and Configuration!
● Separate Code and Configuration!
● Code Modularize Then
Configuration can Reference
Different Module Version
module "consul" {
source = "consul/aws"
version = "0.0.5"
servers = 3
}
Keep Configuration DRY
● The Same Account,
Environment...etc,
Share the Same
Configuration
aws
├── alpha-ac
│ ├── alpha-ac.conf
│ ├── us-east-1
│ │ ├── database
│ │ ├── elastic
│ │ ├── ...
│ │ ├── kubernetes
│ │ └── us-east-1.conf
│ └── us-west-2
├── aws.conf
├── beta-ac
└── prod-ac
Keep CLI Flags DRY
● Flag Like -var 'foo=bar' or -var-file=foo can be
Stored in the Shared Configuration
Post-IaC Era Permission Unit Testing Integration Testing GitOps
Everything As Code
Could You Write Code Without Tests?
What is Terratest?
● A Go Library That Makes it Easier to Write
Automated Tests for Your Infrastructure
Code
● It Provides a Variety of Helper Functions
and Patterns for Common Infrastructure
Testing Tasks
How to Test IaC By Terratest
Setup
- Compose Configuration
- Create Resource
- Wait Resource Ready
Verification
- Leverage Helper Function
- Write Golang Directly
Teardown
- Destroy Resource
- Generate Report
Rich Helper Function
● Testing Terraform Code
● Testing Packer Templates
● Testing Docker Images
● Executing Commands on Servers Over SSH
● Working With AWS APIs
● Working With GCP APIs
● Working With Kubernetes APIs
● Testing Helm Charts
● Making HTTP Requests
● Running Shell Commands
IaC Testing Tools Comparison
● XXX-Spec ←→ Terratest ←→ Pure Programming
Language
● Learning Curve is Between XXX-Spec and Pure
Programming Language
● Not Only Check Server Properties, But Also The
Service Functionality
● Testing Scope Include Entire Systems
IaC Module Structure With Testing
● Modules: The Terraform
to Create Cloud Resource
● Examples: Illustrate how
to Use the Module
● Test: Test the Module by
Executing Examples
tf-aws-iam
├── examples
│ ├── iam-roles
│ └── iam-users
├── modules
│ ├── roles
│ └── users
└── test
├── iam_roles_test.go
└── iam_users_test.go
IaC Module Unit Test CI/CD Flow
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#1
#2
#3
#4
#5
#6
Unit Test
Post-IaC Era Permission Unit Testing Integration Testing GitOps
What Need To Take Care In Production?
● Operational Excellence: Prevent Service
Outages or Degradation
● Security Policy: Adopted Internally Protect
Data Privacy and Infrastructure Integrity
● Compliance Policy: Ensure Compliance with
External Standards (PCI-DSS, SOC, or GDPR)
How to Verify Them?
Auditing
Excel Engineer
● Lots of Spreadsheets
● Lots of Manual Process
● Takes Weeks to Months to
Complete Review and Fix
● Policy Document not Ready
yet
● But The Most Terrible ...
Shift Left Testing
Testing is Performed Earlier in the Life Cycle
Development Life Cycle
Local
Development
Continuous
Integration
Production
Environment
Fast Slow Slower
Development Life Cycle
Auditing
Local
Development
Continuous
Integration
Production
Environment
Development Life Cycle
Automation Auditing
Local
Development
Continuous
Integration
Production
Environment
How to Achieve Automation Auditing?
Audit CodePolicy
☝ Policy as Code
What is Open Policy Agent?
OPA
Service
Policy
(Rego)
Data
(JSON)
Request,
Event, etc
Query
Decision
OPA Features
● Declarative Policy Language (Rego)
● Library, Sidecar, Host-Level Daemon
● Management API for Control &
Observability
● Tooling to Build, Test and Debug Policy
OPA Integrations
Admission
Control
API AUthorization
SSH & sudo
Data Protection
Data Filtering
Linux PAM
https://github.com/smalltown/policy-as-code
Someone Create A Server in AWS...
0.0.0.0/0
Test Terraform With OPA
Policy
(Rego)
1. Terraform Output Plan
Result as Json File
2. OPA Test The JSON
Input Through Policy
Terraform
OPA
Benefits
● Help Individual Developers Sanity Check
Their Terraform Changes
● Auto-Approve Run-Of-The-Mill
Infrastructure Changes and Reduce the
Burden of Peer-Review
● Help Catch Problems That Arise When
Applying Terraform to Production After
Applying it to Staging
IaC Integration Test CI/CD Flow
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#1
#2
#3
#4
#5
#6
PaC Tool
#1
Unit Test
Integration
Test
#2
#3
#5
#4
Post-IaC Era Permission Unit Testing Integration Testing GitOps
A Normal Day at office
Why Alpha
is Broken?
I apply something
just now @@
(15 mins later...) You
need to merge my PR
first, or blabla...
👉 Don’t Manage Infrastructure By Your
Laptop
How to Achieve it?
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#2
#3
#4
#5
#6
PaC Tool
Unit Test
Integration
Test
#2
#3
#5
#4
#1
#1
What GitOps Want to Resolve Here?
● The Bridge Between IaC, Developer and
Cloud Resource
● Avoid Execute IaC From Developer’s Laptop
● Avoid Multiple Developers Modify the Same
IaC
● E.g. Atlantis, Terraform Cloud
Take Atlantis & Terraform for Example
● Display Detail Changes in Git PR Page
● Only When the PR is Reviewed/Merged,
The Changes Can be Applied
● No One Can Modify The Same IaC in The
Same Time (Permission)
● Reference Article
Add GitOps Feature
Developer
IaC Tool
Terratest
Git Service
CI/CD Framework
Cloud
#1
#2
#3
#4
#5
#6
PaC Tool
#1
Unit Test
Integration
Test
#2
#3
#5
#4
GitOps
GitOps
#1
#2
#3
#4
Key Takeaways
Permission Control
Unit Test
(Terratest)
Integration Test (PaC)
Collaboration (GitOps)
THANKS!
Any questions?
You can find me at:
● facebook.com/smalltown0110
● smalltown@awsug.tw
We’re Hiring!!
Software Engineer in Test
Software Engineer

More Related Content

What's hot

Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Nikhil Thomas
 
DevOps Best Practices
DevOps Best PracticesDevOps Best Practices
DevOps Best Practices
Giragadurai Vallirajan
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
Amazon Web Services
 
DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
Shiva Narayanaswamy
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
Amazon Web Services
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
Opsta
 
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalkContinuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Thomas Shaw
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
Amazon Web Services
 
TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdf
MIlton788007
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
Brice Fernandes
 
Terraform
TerraformTerraform
Terraform
An Nguyen
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Simplilearn
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 
Terraform
TerraformTerraform
Terraform
Phil Wilkins
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
Julien Pivotto
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
Araf Karsh Hamid
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
Araf Karsh Hamid
 

What's hot (20)

Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
 
DevOps Best Practices
DevOps Best PracticesDevOps Best Practices
DevOps Best Practices
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOpsFree GitOps Workshop + Intro to Kubernetes & GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
 
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalkContinuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
Continuous Delivery using AWS CodePipeline, AWS Lambda & AWS ElasticBeanstalk
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdf
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
Terraform
TerraformTerraform
Terraform
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Terraform
TerraformTerraform
Terraform
 
An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 

Similar to DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way

Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
Yaniv cohen
 
Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013
Andrei Savu
 
Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10
Andrei Savu
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
Cesar Cardenas Desales
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsFedir RYKHTIK
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
Luciano Mammino
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
LogeekNightUkraine
 
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Kaxil Naik
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
Cesar Cardenas Desales
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
Linaro
 
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdfPrefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Jeff Hale
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
sosorry
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
GetInData
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
Weaveworks
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
DevOps.com
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Martin Spier
 
Securing Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 PresentationSecuring Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 Presentation
Obika Gellineau
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
Redis Labs
 

Similar to DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way (20)

Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013Creating pools of Virtual Machines - ApacheCon NA 2013
Creating pools of Virtual Machines - ApacheCon NA 2013
 
Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and Projects
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
 
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
 
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
 
PyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applicationsPyConIT 2018 Writing and deploying serverless python applications
PyConIT 2018 Writing and deploying serverless python applications
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdfPrefect Paris Airflow Meetup Jeff Hale April 2023.pdf
Prefect Paris Airflow Meetup Jeff Hale April 2023.pdf
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
 
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)Ensuring Performance in a Fast-Paced Environment (CMG 2014)
Ensuring Performance in a Fast-Paced Environment (CMG 2014)
 
Securing Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 PresentationSecuring Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 Presentation
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
 

More from smalltown

Kubernetes Summit 2023: Head First Kubernetes
Kubernetes Summit 2023: Head First Kubernetes Kubernetes Summit 2023: Head First Kubernetes
Kubernetes Summit 2023: Head First Kubernetes
smalltown
 
SRE Conference 2022 - How to Build a Healthy On-Call Culture
SRE Conference 2022 - How to Build a Healthy On-Call CultureSRE Conference 2022 - How to Build a Healthy On-Call Culture
SRE Conference 2022 - How to Build a Healthy On-Call Culture
smalltown
 
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the UglyKubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
smalltown
 
DevOpsDays Taipei 2021 - How FinTech Embrace Change Management
DevOpsDays Taipei 2021 - How FinTech Embrace Change ManagementDevOpsDays Taipei 2021 - How FinTech Embrace Change Management
DevOpsDays Taipei 2021 - How FinTech Embrace Change Management
smalltown
 
Kubernetes Summit 2020 - DevOps: Where is My PodPod
Kubernetes Summit 2020 - DevOps: Where is My PodPodKubernetes Summit 2020 - DevOps: Where is My PodPod
Kubernetes Summit 2020 - DevOps: Where is My PodPod
smalltown
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
smalltown
 
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWSAWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
smalltown
 
Cloud Native User Group: Shift-Left Testing IaC With PaC
Cloud Native User Group: Shift-Left Testing IaC With PaCCloud Native User Group: Shift-Left Testing IaC With PaC
Cloud Native User Group: Shift-Left Testing IaC With PaC
smalltown
 
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
smalltown
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩
smalltown
 
TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?
smalltown
 
Cloud Native User Group: Prometheus Day 2
Cloud Native User Group:  Prometheus Day 2Cloud Native User Group:  Prometheus Day 2
Cloud Native User Group: Prometheus Day 2
smalltown
 
Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事
smalltown
 
DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?
smalltown
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
smalltown
 
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> StatefulKubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
smalltown
 
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
smalltown
 
Docker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and BittersDocker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and Bitters
smalltown
 
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is CodeDevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
smalltown
 
COSCUP 2017 - infrastructure As Code
COSCUP 2017 - infrastructure As Code COSCUP 2017 - infrastructure As Code
COSCUP 2017 - infrastructure As Code
smalltown
 

More from smalltown (20)

Kubernetes Summit 2023: Head First Kubernetes
Kubernetes Summit 2023: Head First Kubernetes Kubernetes Summit 2023: Head First Kubernetes
Kubernetes Summit 2023: Head First Kubernetes
 
SRE Conference 2022 - How to Build a Healthy On-Call Culture
SRE Conference 2022 - How to Build a Healthy On-Call CultureSRE Conference 2022 - How to Build a Healthy On-Call Culture
SRE Conference 2022 - How to Build a Healthy On-Call Culture
 
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the UglyKubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
 
DevOpsDays Taipei 2021 - How FinTech Embrace Change Management
DevOpsDays Taipei 2021 - How FinTech Embrace Change ManagementDevOpsDays Taipei 2021 - How FinTech Embrace Change Management
DevOpsDays Taipei 2021 - How FinTech Embrace Change Management
 
Kubernetes Summit 2020 - DevOps: Where is My PodPod
Kubernetes Summit 2020 - DevOps: Where is My PodPodKubernetes Summit 2020 - DevOps: Where is My PodPod
Kubernetes Summit 2020 - DevOps: Where is My PodPod
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
 
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWSAWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
 
Cloud Native User Group: Shift-Left Testing IaC With PaC
Cloud Native User Group: Shift-Left Testing IaC With PaCCloud Native User Group: Shift-Left Testing IaC With PaC
Cloud Native User Group: Shift-Left Testing IaC With PaC
 
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩
 
TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?
 
Cloud Native User Group: Prometheus Day 2
Cloud Native User Group:  Prometheus Day 2Cloud Native User Group:  Prometheus Day 2
Cloud Native User Group: Prometheus Day 2
 
Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事
 
DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
 
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> StatefulKubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
 
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
 
Docker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and BittersDocker Summit 2016 - Kubernetes: Sweets and Bitters
Docker Summit 2016 - Kubernetes: Sweets and Bitters
 
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is CodeDevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
 
COSCUP 2017 - infrastructure As Code
COSCUP 2017 - infrastructure As Code COSCUP 2017 - infrastructure As Code
COSCUP 2017 - infrastructure As Code
 

Recently uploaded

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 

Recently uploaded (20)

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 

DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way

  • 2. 2006-2010 Hello! I am smalltown MaiCoin Site Reliability Engineer Taipei HashiCorp UG Organizer AWS UG Taiwan Staff
  • 3. Taipei HashiCorp User Group ● Vault Workshop:幫 Credentials 找個 窩 (2019/06) ● DevOpsDays Taipei: AWS Kubernetes Service Mesh Workshop (Tomorrow 13:00~17:00) ● Hack 'n' Roll: Kubernetes From Zero To Hero (2019/11/09)
  • 5.
  • 6. But Maybe Not So Far...
  • 7.
  • 8.
  • 9. What Problem We Facing ● Permission Control ● Infrastructure Quality ● Collaboration ● Efficiency & Productivity
  • 10. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 11. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 12. Infrastructure as Code ● The Process of Managing and Provisioning Computer Data Centers Through Machine-Readable Definition Files
  • 13. Iac First Generation ~$ apt-get update ~$ apt-get install -y tar=1.16.1 package 'tar' do version '1.16.1' action :install end 👉 Record Your Provision Procedure with CM Tool, Not Document !
  • 16. IaC Second Generation 👉 Record Your Cloud Resource with IaC Tool, Not Document ! resource "aws_s3_bucket" "b" { bucket = "my_tf_test_bucket" acl = "private" tags { Name = "My_bucket" } }
  • 17. IaC Second Generation is Hot Now! … etc AWS CDKPulumiTerraform
  • 18. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 19. Do you know the Prod. environment broken ? 😠 I think I execute terraform destroy in Alpha...maybe 😱
  • 20. We need the multiple accounts or projects architecture with cloud provider 🍯 I feel it’s complicated, why we need that 🤔
  • 21. Who Can Cause a Service Broken? Developer! Who Can Ruin Entire Infrastructure? SRE!
  • 22. Multiple Accounts/Projects Architecture?! ● There are Multiple Environments for One General Application ● Due to Application Need to be Tested, but not Impact the Real Users ● Production Environments Don’t Allow Access at Will ● Infrastructure Becomes Code Now, Hence, It Need to be Treated as The Same Way
  • 23. Multiple Accounts/Projects Architecture Beta RobotRead Write Prod RobotRead Write Alpha RobotRead Write
  • 24. Multiple Accounts/Projects Architecture ● The Write Role is For Human Usage if Necessary ● Production Write and Robot Role Only can be Permitted Through Change Management Process ● Don’t Manage Infrastructure By Your Laptop Prod RobotRead Write
  • 25. Don't Repeat Yourself (DRY) ● Keep Code DRY ● Keep Configuration DRY ● Keep CLI Flags DRY ● No Matter What IaC Tools Been Used, You Could Take a Look at Terragrunt
  • 26. Keep Code DRY ● Separate Different Account or Project by Folder IaC ├── aws │ ├── alpha-ac │ │ ├── us-east-1 │ │ │ ├── database │ │ │ ├── elastic │ │ │ ├── ... │ │ │ └── kubernetes │ │ └── us-west-2 │ ├── beta-ac │ └── prod-ac ├── azure └── gcp
  • 27. Keep Code DRY ● Separate Code and Configuration! ● Separate Code and Configuration! ● Separate Code and Configuration! ● Code Modularize Then Configuration can Reference Different Module Version module "consul" { source = "consul/aws" version = "0.0.5" servers = 3 }
  • 28. Keep Configuration DRY ● The Same Account, Environment...etc, Share the Same Configuration aws ├── alpha-ac │ ├── alpha-ac.conf │ ├── us-east-1 │ │ ├── database │ │ ├── elastic │ │ ├── ... │ │ ├── kubernetes │ │ └── us-east-1.conf │ └── us-west-2 ├── aws.conf ├── beta-ac └── prod-ac
  • 29. Keep CLI Flags DRY ● Flag Like -var 'foo=bar' or -var-file=foo can be Stored in the Shared Configuration
  • 30. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 31. Everything As Code Could You Write Code Without Tests?
  • 32. What is Terratest? ● A Go Library That Makes it Easier to Write Automated Tests for Your Infrastructure Code ● It Provides a Variety of Helper Functions and Patterns for Common Infrastructure Testing Tasks
  • 33. How to Test IaC By Terratest Setup - Compose Configuration - Create Resource - Wait Resource Ready Verification - Leverage Helper Function - Write Golang Directly Teardown - Destroy Resource - Generate Report
  • 34. Rich Helper Function ● Testing Terraform Code ● Testing Packer Templates ● Testing Docker Images ● Executing Commands on Servers Over SSH ● Working With AWS APIs ● Working With GCP APIs ● Working With Kubernetes APIs ● Testing Helm Charts ● Making HTTP Requests ● Running Shell Commands
  • 35. IaC Testing Tools Comparison ● XXX-Spec ←→ Terratest ←→ Pure Programming Language ● Learning Curve is Between XXX-Spec and Pure Programming Language ● Not Only Check Server Properties, But Also The Service Functionality ● Testing Scope Include Entire Systems
  • 36. IaC Module Structure With Testing ● Modules: The Terraform to Create Cloud Resource ● Examples: Illustrate how to Use the Module ● Test: Test the Module by Executing Examples tf-aws-iam ├── examples │ ├── iam-roles │ └── iam-users ├── modules │ ├── roles │ └── users └── test ├── iam_roles_test.go └── iam_users_test.go
  • 37. IaC Module Unit Test CI/CD Flow Developer IaC Tool Terratest Git Service CI/CD Framework Cloud #1 #2 #3 #4 #5 #6 Unit Test
  • 38. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 39. What Need To Take Care In Production? ● Operational Excellence: Prevent Service Outages or Degradation ● Security Policy: Adopted Internally Protect Data Privacy and Infrastructure Integrity ● Compliance Policy: Ensure Compliance with External Standards (PCI-DSS, SOC, or GDPR)
  • 40. How to Verify Them? Auditing
  • 41. Excel Engineer ● Lots of Spreadsheets ● Lots of Manual Process ● Takes Weeks to Months to Complete Review and Fix ● Policy Document not Ready yet ● But The Most Terrible ...
  • 42. Shift Left Testing Testing is Performed Earlier in the Life Cycle
  • 45. Development Life Cycle Automation Auditing Local Development Continuous Integration Production Environment
  • 46. How to Achieve Automation Auditing? Audit CodePolicy ☝ Policy as Code
  • 47. What is Open Policy Agent? OPA Service Policy (Rego) Data (JSON) Request, Event, etc Query Decision
  • 48. OPA Features ● Declarative Policy Language (Rego) ● Library, Sidecar, Host-Level Daemon ● Management API for Control & Observability ● Tooling to Build, Test and Debug Policy
  • 49. OPA Integrations Admission Control API AUthorization SSH & sudo Data Protection Data Filtering Linux PAM
  • 51. Someone Create A Server in AWS... 0.0.0.0/0
  • 52. Test Terraform With OPA Policy (Rego) 1. Terraform Output Plan Result as Json File 2. OPA Test The JSON Input Through Policy Terraform OPA
  • 53. Benefits ● Help Individual Developers Sanity Check Their Terraform Changes ● Auto-Approve Run-Of-The-Mill Infrastructure Changes and Reduce the Burden of Peer-Review ● Help Catch Problems That Arise When Applying Terraform to Production After Applying it to Staging
  • 54. IaC Integration Test CI/CD Flow Developer IaC Tool Terratest Git Service CI/CD Framework Cloud #1 #2 #3 #4 #5 #6 PaC Tool #1 Unit Test Integration Test #2 #3 #5 #4
  • 55. Post-IaC Era Permission Unit Testing Integration Testing GitOps
  • 56. A Normal Day at office Why Alpha is Broken? I apply something just now @@ (15 mins later...) You need to merge my PR first, or blabla... 👉 Don’t Manage Infrastructure By Your Laptop
  • 57. How to Achieve it? Developer IaC Tool Terratest Git Service CI/CD Framework Cloud #2 #3 #4 #5 #6 PaC Tool Unit Test Integration Test #2 #3 #5 #4 #1 #1
  • 58. What GitOps Want to Resolve Here? ● The Bridge Between IaC, Developer and Cloud Resource ● Avoid Execute IaC From Developer’s Laptop ● Avoid Multiple Developers Modify the Same IaC ● E.g. Atlantis, Terraform Cloud
  • 59. Take Atlantis & Terraform for Example ● Display Detail Changes in Git PR Page ● Only When the PR is Reviewed/Merged, The Changes Can be Applied ● No One Can Modify The Same IaC in The Same Time (Permission) ● Reference Article
  • 60. Add GitOps Feature Developer IaC Tool Terratest Git Service CI/CD Framework Cloud #1 #2 #3 #4 #5 #6 PaC Tool #1 Unit Test Integration Test #2 #3 #5 #4 GitOps GitOps #1 #2 #3 #4
  • 61. Key Takeaways Permission Control Unit Test (Terratest) Integration Test (PaC) Collaboration (GitOps)
  • 62. THANKS! Any questions? You can find me at: ● facebook.com/smalltown0110 ● smalltown@awsug.tw
  • 63. We’re Hiring!! Software Engineer in Test Software Engineer