SlideShare a Scribd company logo
1 of 63
Download to read offline
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

Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformAdin Ermie
 
Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and PrometheusWeaveworks
 
GDG Cloud Southlake #8 Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...
GDG Cloud Southlake #8  Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...GDG Cloud Southlake #8  Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...
GDG Cloud Southlake #8 Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...James Anderson
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfssuser31375f
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIDavid Hahn
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Janusz Nowak
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesQAware GmbH
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overviewGabriel Carro
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Amazon Web Services
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep diveWinton Winton
 
Azure DevOps Presentation
Azure DevOps PresentationAzure DevOps Presentation
Azure DevOps PresentationInCycleSoftware
 

What's hot (20)

Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using Terraform
 
Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
 
GDG Cloud Southlake #8 Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...
GDG Cloud Southlake #8  Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...GDG Cloud Southlake #8  Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...
GDG Cloud Southlake #8 Steve Cravens: Infrastructure as-Code (IaC) in 2022: ...
 
Ingress overview
Ingress overviewIngress overview
Ingress overview
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
Terraform
TerraformTerraform
Terraform
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
Terraform
TerraformTerraform
Terraform
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
 
Azure DevOps Presentation
Azure DevOps PresentationAzure DevOps Presentation
Azure DevOps Presentation
 

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 DevopShiftYaniv 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 2013Andrei Savu
 
Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10Apache Provisionr (incubating) - Bucharest JUG 10
Apache Provisionr (incubating) - Bucharest JUG 10Andrei Savu
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applicationsCesar 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 applicationsCesar 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 applicationsCesar Cardenas Desales
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2Linaro
 
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.pdfJeff 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 Systemssosorry
 
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 WorkshopWeaveworks
 
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 EngineersDevOps.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 PresentationObika 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 Kuberneteskloia
 
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 DistributedRedis 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 Culturesmalltown
 
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 Uglysmalltown
 
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 Managementsmalltown
 
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 PodPodsmalltown
 
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 IaCsmalltown
 
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 AWSsmalltown
 
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 PaCsmalltown
 
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 Clustersmalltown
 
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 2smalltown
 
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 -> Statefulsmalltown
 
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 Bitterssmalltown
 
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 Codesmalltown
 
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

JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 

Recently uploaded (20)

JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 

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