SlideShare une entreprise Scribd logo
1  sur  37
Multi-Language
Infrastructure as Code
The Cloud is the New Operating System:
Let’s Program It
Joe Duffy
@funcOfJoe
Pulumi Founder and CEO
6/26/19 - QCon NYC
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
multi-language-iascode/
Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Why Infrastructure as Code?
Standing on the Shoulders of Giants
2
Why Infrastructure as Code?
Standing on the Shoulders of Giants
3
My Background
All developer tools:
● Early engineer on .NET and C#.
● Created team that built Task/Async in .NET.
● Architect for safe, distributed operating system.
● Led languages groups (C++/C#/F#/etc), IDE support, static analysis.
● Initiated effort to open source .NET and take to Linux/Mac.
Came to the cloud from a different perspective.
I didn’t know I’d be doing infrastructure as code, until we started doing it ...
4
All developers are (or will become) cloud developers.
5
I’m a Developer -- Why Infrastructure?
6
Modern Cloud Architectures
7
EKS
Lambda
S3 API Gateway
Aurora
MySQL
DataDog
App
Docker
DataDog
CloudWatch
App
MySQL
1.0 2.0 3.0
Cloud 1.0
2000-2009
⌁Fixed VMs
⌁N-Tier Apps
⌁Private Cloud
Cloud 2.0
2010-2019
⌁Dynamic VMs
⌁Hosted DBs
⌁Hybrid Cloud
Cloud 3.0
2019+
⌁Serverless
⌁Containers
⌁Public Cloud
The cloud is no longer an afterthought.
8
The Cloud Operating System
What is an operating system anyway?
● Provides HW resources to our applications (CPU, network, memory, disk).
● Manages competing demands through scheduling.
● Secures access to resources.
● Offers primitives, and application models, that developers and IT admins use to
get things done without meddling with hardware.
s/operating system/cloud/g
9
The Cloud is the Operating System
10
Traditional OS Cloud OS
Granularity One Machine Fleets of Machines
Master Kernel Control Plane
“Perimeter” NIC/Firewall Virtual Private Cloud
Security ACLs, Users/Groups/Roles IAM (Users/Groups/Roles)
Scheduling Processes and Threads VMs, Containers, Functions
Storage Filesystem, Registry Block Store, Objects, Databases
Packaging Executables, Shared Libraries Images (VMs, Containers, Functions)
Debugging In-Memory/Interactive Logging/Postmortem
Managing Infrastructure
From kernel objects to infrastructure resources:
● Networks, security roles
● Virtual machines, Kubernetes clusters, private Docker repositories
● Databases, object stores, AI services
How do we manage the lifecycle for these infrastructure resources?
Repeatable? Reviewable? Reliable? Versionable?
Point and click 😟 😟 😟 😟
Scripts 😕 😕 😕 😕
Infrastructure as Code 😁 😁 😁 😁
11
Infrastructure as Code lets you declare cloud
resources — clusters, compute, databases, hosted
services — that your application needs, using code.
Declarative Infrastructure as Code takes those
declarations, compares the “goal” to the “current” state
of your cloud, and rectifies the difference.
12
13
provider "aws" {
region = "us-east-1"
}
resource "aws_instance" "web" {
ami = "ami-25488752"
instance_type = "t2.micro"
vpc_security_group_ids = ["${aws_security_group.web.id}"]
user_data = "${file("template/user_data.sh")}"
tags {
Name = "hello-world-web"
}
}
resource "aws_security_group" "web" {
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
$ SECGROUP_ID=$(
aws ec2 --region us-east-1 
create-security-group 
--group-name="web" 
--description="Web")
$ aws ec2 --region us-east-1 
authorize-security-group-ingress 
--group-id=$(SECGROUP_ID) 
--protocol="tcp" 
--port=80 
--cidr="0.0.0.0/0"
$ aws ec2 --region us-east-1 
run-instances 
--ami-id=ami-25488752 
--instance-type=t2.micro 
--security-group-ids=${SECGROUP_ID} 
--user-data=template/user_data.sh 
--tag-specifications=
"[{Key=Name,Value=hello-world-web}]"
From Scripting... To Infrastructure as Code...
��
��
��
��
��
��
��
��
��
��
How It Works
14
Code
IaC Engine
Cloud
State
Plan
Update
C
R
U
D
Days 1, 2, and Beyond
Day 1: standing up new infrastructure
● For a new project
● For taking a prototype into production
Day 2+: evolving existing infrastructure
● Continuously deploying application updates
● Upgrading to new versions of things (e.g., Kubernetes 1.14 to 1.15)
● Evolving topology as needs change (e.g., adding a new microservice, scaling out an
existing service, leveraging new data services, adopting new best practices)
● For a new environment for an existing product (e.g., dev/stage/prod1/prod2)
15
Just One Problem...
Infrastructure as code is often not code! 😢
● YAML, domain specific languages (DSLs), ...
● Breaks down at scale -- begets templates and YAML mungers.
We’re missing a lot of things we love about code!
● Abstraction and reuse: functions, classes
● Expressive constructs: loops, list comprehensions
● Great tooling: IDEs, refactoring, linters, static analysis
● Most of all, productivity!
16
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "wordpress.fullname" . }}
labels:
app: "{{ template "wordpress.fullname" . }}"
chart: "{{ template "wordpress.chart" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
app: "{{ template "wordpress.fullname" . }}"
release: {{ .Release.Name | quote }}
{{- if .Values.updateStrategy }}
strategy: {{ toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: "{{ template "wordpress.fullname" . }}"
chart: "{{ template "wordpress.chart" . }}"
release: {{ .Release.Name | quote }}
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
annotations:
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
{{- if .Values.metrics.podAnnotations }}
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
{{- end }}
{{- end }}
spec:
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
{{- end }}
{{- include "wordpress.imagePullSecrets" . | indent 6 }}
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "status.localhost"
containers:
- name: wordpress
image: {{ template "wordpress.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env:
- name: ALLOW_EMPTY_PASSWORD
value: {{ ternary "yes" "no" .Values.allowEmptyPassword |
quote }}
- name: MARIADB_HOST
{{- if .Values.mariadb.enabled }}
value: {{ template "mariadb.fullname" . }}
{{- else }}
value: {{ .Values.externalDatabase.host | quote }}
{{- end }}
- name: MARIADB_PORT_NUMBER
{{- if .Values.mariadb.enabled }}
value: "3306"
{{- else }}
value: {{ .Values.externalDatabase.port | quote }}
{{- end }}
- name: WORDPRESS_DATABASE_NAME
{{- if .Values.mariadb.enabled }}
value: {{ .Values.mariadb.db.name | quote }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
- name: WORDPRESS_DATABASE_USER
{{- if .Values.mariadb.enabled }}
value: {{ .Values.mariadb.db.user | quote }}
{{- else }}
value: {{ .Values.externalDatabase.user | quote }}
{{- end }}
- name: WORDPRESS_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
- name: WORDPRESS_USERNAME
value: {{ .Values.wordpressUsername | quote }}
- name: WORDPRESS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "wordpress.fullname" . }}
key: wordpress-password
- name: WORDPRESS_EMAIL
value: {{ .Values.wordpressEmail | quote }}
- name: WORDPRESS_FIRST_NAME
value: {{ .Values.wordpressFirstName | quote }}
- name: WORDPRESS_LAST_NAME
value: {{ .Values.wordpressLastName | quote }}
- name: WORDPRESS_HTACCESS_OVERRIDE_NONE
value: {{ ternary "yes" "no" .Values.allowOverrideNone |
quote }}
- name: WORDPRESS_BLOG_NAME
value: {{ .Values.wordpressBlogName | quote }}
- name: WORDPRESS_SKIP_INSTALL
value: {{ ternary "yes" "no" .Values.wordpressSkipInstall
| quote }}
- name: WORDPRESS_TABLE_PREFIX
value: {{ .Values.wordpressTablePrefix | quote }}
{{- if .Values.smtpHost }}
- name: SMTP_HOST
value: {{ .Values.smtpHost | quote }}
{{- end }}
{{- if .Values.smtpPort }}
- name: SMTP_PORT
value: {{ .Values.smtpPort | quote }}
{{- end }}
{{- if .Values.smtpUser }}
- name: SMTP_USER
value: {{ .Values.smtpUser | quote }}
{{- end }}
{{- if .Values.smtpPassword }}
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
volumeMounts:
- mountPath:
name: word
subPath: w
{{- if and .
.Values.customHTAcce
- mountPath:
name: cust
subPath: w
{{- end }}
resources:
{{ toYaml .Values.re
{{- if .Values.metri
- name: metric
image: {{ te
imagePullPol
quote }}
command: [ '
'http://status.local
ports:
- name: metr
containerP
livenessProb
httpGet:
path: /m
port: me
initialDel
timeoutSec
readinessPro
httpGet:
path: /m
port: me
initialDel
timeoutSec
resources:
{{ toYaml .Values.me
😱😱😱
17
Still an Afterthought...
For applications:
For infrastructure:
For application infrastructure:
CLI Language
aws/azure/gcp Bash/YAML/JSON
terraform HCL
CLI Language
kubectl YAML
helm YAML+Gotmpl
docker YAML
18
✅ Why Infrastructure as Code?
Standing on the Shoulders of Giants
19
💡🤔
What if we used real languages
for infrastructure too?
20
Infrastructure as Code
Everything we know and love about languages:
● Tools (IDEs, test frameworks, linters).
● Abstraction and reuse.
● Ecosystems of libraries, sharing via package managers.
● Eliminate copy-and-paste and clumsy templating.
All of the safety and robustness of infrastructure as code:
● Any cloud.
● Reliably checkpoint states and recover from failure.
● Review and commit infrastructure changes like code.
● Automate deployments on Days 1, 2, and beyond.
21
Demo
Infrastructure as Code
22
Multi-Language Runtime
23
Many Clouds
24
FOUNDATION
PROVIDERS
Unopinionated support
for all clouds and their
resources.
PRODUCTIVITY
LIBRARIES
Libraries for best
practices and
productivity. Containers Serverless Infrastructure
MANY-CLOUD
FRAMEWORK
Create modern cloud
native applications
that can run anywhere.
PRODUCTIVITYCONTROL
Kubernetes as Code
25
Demo
Kubernetes as Code
26
Automated Delivery
Most production deployments are triggered using automation.
● GitOps: Review changes in SCM, trigger deployments from CI/CD.
● One Workflow: Application containers, application config, infrastructure.
27
28
Cloud Engineering - Test Your Infrastructure
Unit testing: Ensure infrastructure configuration is correct.
Integration testing: Ensure the system works after deploying.
Enforce policy: Stop security issues before they ship.
More exotic testing: Fault injection, fuzzing, scale testing.
29
✅ Why Infrastructure as Code?
✅ Standing on the Shoulders of Giants
30
The Future of Cloud Architectures
Developers want to focus on business logic!
● PaaS: deploy small units of application-centric packaging (e.g, containers).
● Serverless: focus on application logic, pay per use, less fixed infrastructure.
● NoCode: for vertical applications, no code at all (powered by IaC underneath).
The world is powered by infrastructure building blocks.
Great things will come to those who can build bigger things out of smaller things.
Using real languages for infrastructure enables a virtuous cycle of building.
Teams where developers, infrastructure engineers, and operators collaborate will win.
31
The power of real programming languages
with the safety and robustness of infrastructure as code.
32
In Summary
It’s Just Code -- Have Some Fun!
33
Q&A
https://pulumi.io
@PulumiCorp
34
Joe Duffy
@funcOfJoe
Pulumi Founder and CEO
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
multi-language-iascode/

Contenu connexe

Plus de C4Media

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaC4Media
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?C4Media
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseC4Media
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinC4Media
 

Plus de C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Dernier

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Multi-language Infrastructure as Code

  • 1. Multi-Language Infrastructure as Code The Cloud is the New Operating System: Let’s Program It Joe Duffy @funcOfJoe Pulumi Founder and CEO 6/26/19 - QCon NYC
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ multi-language-iascode/
  • 3. Presented at QCon New York www.qconnewyork.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. Why Infrastructure as Code? Standing on the Shoulders of Giants 2
  • 5. Why Infrastructure as Code? Standing on the Shoulders of Giants 3
  • 6. My Background All developer tools: ● Early engineer on .NET and C#. ● Created team that built Task/Async in .NET. ● Architect for safe, distributed operating system. ● Led languages groups (C++/C#/F#/etc), IDE support, static analysis. ● Initiated effort to open source .NET and take to Linux/Mac. Came to the cloud from a different perspective. I didn’t know I’d be doing infrastructure as code, until we started doing it ... 4
  • 7. All developers are (or will become) cloud developers. 5
  • 8. I’m a Developer -- Why Infrastructure? 6
  • 9. Modern Cloud Architectures 7 EKS Lambda S3 API Gateway Aurora MySQL DataDog App Docker DataDog CloudWatch App MySQL 1.0 2.0 3.0 Cloud 1.0 2000-2009 ⌁Fixed VMs ⌁N-Tier Apps ⌁Private Cloud Cloud 2.0 2010-2019 ⌁Dynamic VMs ⌁Hosted DBs ⌁Hybrid Cloud Cloud 3.0 2019+ ⌁Serverless ⌁Containers ⌁Public Cloud
  • 10. The cloud is no longer an afterthought. 8
  • 11. The Cloud Operating System What is an operating system anyway? ● Provides HW resources to our applications (CPU, network, memory, disk). ● Manages competing demands through scheduling. ● Secures access to resources. ● Offers primitives, and application models, that developers and IT admins use to get things done without meddling with hardware. s/operating system/cloud/g 9
  • 12. The Cloud is the Operating System 10 Traditional OS Cloud OS Granularity One Machine Fleets of Machines Master Kernel Control Plane “Perimeter” NIC/Firewall Virtual Private Cloud Security ACLs, Users/Groups/Roles IAM (Users/Groups/Roles) Scheduling Processes and Threads VMs, Containers, Functions Storage Filesystem, Registry Block Store, Objects, Databases Packaging Executables, Shared Libraries Images (VMs, Containers, Functions) Debugging In-Memory/Interactive Logging/Postmortem
  • 13. Managing Infrastructure From kernel objects to infrastructure resources: ● Networks, security roles ● Virtual machines, Kubernetes clusters, private Docker repositories ● Databases, object stores, AI services How do we manage the lifecycle for these infrastructure resources? Repeatable? Reviewable? Reliable? Versionable? Point and click 😟 😟 😟 😟 Scripts 😕 😕 😕 😕 Infrastructure as Code 😁 😁 😁 😁 11
  • 14. Infrastructure as Code lets you declare cloud resources — clusters, compute, databases, hosted services — that your application needs, using code. Declarative Infrastructure as Code takes those declarations, compares the “goal” to the “current” state of your cloud, and rectifies the difference. 12
  • 15. 13 provider "aws" { region = "us-east-1" } resource "aws_instance" "web" { ami = "ami-25488752" instance_type = "t2.micro" vpc_security_group_ids = ["${aws_security_group.web.id}"] user_data = "${file("template/user_data.sh")}" tags { Name = "hello-world-web" } } resource "aws_security_group" "web" { ingress { from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } $ SECGROUP_ID=$( aws ec2 --region us-east-1 create-security-group --group-name="web" --description="Web") $ aws ec2 --region us-east-1 authorize-security-group-ingress --group-id=$(SECGROUP_ID) --protocol="tcp" --port=80 --cidr="0.0.0.0/0" $ aws ec2 --region us-east-1 run-instances --ami-id=ami-25488752 --instance-type=t2.micro --security-group-ids=${SECGROUP_ID} --user-data=template/user_data.sh --tag-specifications= "[{Key=Name,Value=hello-world-web}]" From Scripting... To Infrastructure as Code... �� �� �� �� �� �� �� �� �� ��
  • 16. How It Works 14 Code IaC Engine Cloud State Plan Update C R U D
  • 17. Days 1, 2, and Beyond Day 1: standing up new infrastructure ● For a new project ● For taking a prototype into production Day 2+: evolving existing infrastructure ● Continuously deploying application updates ● Upgrading to new versions of things (e.g., Kubernetes 1.14 to 1.15) ● Evolving topology as needs change (e.g., adding a new microservice, scaling out an existing service, leveraging new data services, adopting new best practices) ● For a new environment for an existing product (e.g., dev/stage/prod1/prod2) 15
  • 18. Just One Problem... Infrastructure as code is often not code! 😢 ● YAML, domain specific languages (DSLs), ... ● Breaks down at scale -- begets templates and YAML mungers. We’re missing a lot of things we love about code! ● Abstraction and reuse: functions, classes ● Expressive constructs: loops, list comprehensions ● Great tooling: IDEs, refactoring, linters, static analysis ● Most of all, productivity! 16
  • 19. apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "wordpress.fullname" . }} labels: app: "{{ template "wordpress.fullname" . }}" chart: "{{ template "wordpress.chart" . }}" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} spec: selector: matchLabels: app: "{{ template "wordpress.fullname" . }}" release: {{ .Release.Name | quote }} {{- if .Values.updateStrategy }} strategy: {{ toYaml .Values.updateStrategy | nindent 4 }} {{- end }} replicas: {{ .Values.replicaCount }} template: metadata: labels: app: "{{ template "wordpress.fullname" . }}" chart: "{{ template "wordpress.chart" . }}" release: {{ .Release.Name | quote }} {{- if or .Values.podAnnotations .Values.metrics.enabled }} annotations: {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} {{- if .Values.metrics.podAnnotations }} {{ toYaml .Values.metrics.podAnnotations | indent 8 }} {{- end }} {{- end }} spec: {{- if .Values.schedulerName }} schedulerName: "{{ .Values.schedulerName }}" {{- end }} {{- include "wordpress.imagePullSecrets" . | indent 6 }} hostAliases: - ip: "127.0.0.1" hostnames: - "status.localhost" containers: - name: wordpress image: {{ template "wordpress.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} env: - name: ALLOW_EMPTY_PASSWORD value: {{ ternary "yes" "no" .Values.allowEmptyPassword | quote }} - name: MARIADB_HOST {{- if .Values.mariadb.enabled }} value: {{ template "mariadb.fullname" . }} {{- else }} value: {{ .Values.externalDatabase.host | quote }} {{- end }} - name: MARIADB_PORT_NUMBER {{- if .Values.mariadb.enabled }} value: "3306" {{- else }} value: {{ .Values.externalDatabase.port | quote }} {{- end }} - name: WORDPRESS_DATABASE_NAME {{- if .Values.mariadb.enabled }} value: {{ .Values.mariadb.db.name | quote }} {{- else }} value: {{ .Values.externalDatabase.database | quote }} {{- end }} - name: WORDPRESS_DATABASE_USER {{- if .Values.mariadb.enabled }} value: {{ .Values.mariadb.db.user | quote }} {{- else }} value: {{ .Values.externalDatabase.user | quote }} {{- end }} - name: WORDPRESS_DATABASE_PASSWORD valueFrom: secretKeyRef: - name: WORDPRESS_USERNAME value: {{ .Values.wordpressUsername | quote }} - name: WORDPRESS_PASSWORD valueFrom: secretKeyRef: name: {{ template "wordpress.fullname" . }} key: wordpress-password - name: WORDPRESS_EMAIL value: {{ .Values.wordpressEmail | quote }} - name: WORDPRESS_FIRST_NAME value: {{ .Values.wordpressFirstName | quote }} - name: WORDPRESS_LAST_NAME value: {{ .Values.wordpressLastName | quote }} - name: WORDPRESS_HTACCESS_OVERRIDE_NONE value: {{ ternary "yes" "no" .Values.allowOverrideNone | quote }} - name: WORDPRESS_BLOG_NAME value: {{ .Values.wordpressBlogName | quote }} - name: WORDPRESS_SKIP_INSTALL value: {{ ternary "yes" "no" .Values.wordpressSkipInstall | quote }} - name: WORDPRESS_TABLE_PREFIX value: {{ .Values.wordpressTablePrefix | quote }} {{- if .Values.smtpHost }} - name: SMTP_HOST value: {{ .Values.smtpHost | quote }} {{- end }} {{- if .Values.smtpPort }} - name: SMTP_PORT value: {{ .Values.smtpPort | quote }} {{- end }} {{- if .Values.smtpUser }} - name: SMTP_USER value: {{ .Values.smtpUser | quote }} {{- end }} {{- if .Values.smtpPassword }} - name: SMTP_PASSWORD valueFrom: secretKeyRef: volumeMounts: - mountPath: name: word subPath: w {{- if and . .Values.customHTAcce - mountPath: name: cust subPath: w {{- end }} resources: {{ toYaml .Values.re {{- if .Values.metri - name: metric image: {{ te imagePullPol quote }} command: [ ' 'http://status.local ports: - name: metr containerP livenessProb httpGet: path: /m port: me initialDel timeoutSec readinessPro httpGet: path: /m port: me initialDel timeoutSec resources: {{ toYaml .Values.me 😱😱😱 17
  • 20. Still an Afterthought... For applications: For infrastructure: For application infrastructure: CLI Language aws/azure/gcp Bash/YAML/JSON terraform HCL CLI Language kubectl YAML helm YAML+Gotmpl docker YAML 18
  • 21. ✅ Why Infrastructure as Code? Standing on the Shoulders of Giants 19
  • 22. 💡🤔 What if we used real languages for infrastructure too? 20
  • 23. Infrastructure as Code Everything we know and love about languages: ● Tools (IDEs, test frameworks, linters). ● Abstraction and reuse. ● Ecosystems of libraries, sharing via package managers. ● Eliminate copy-and-paste and clumsy templating. All of the safety and robustness of infrastructure as code: ● Any cloud. ● Reliably checkpoint states and recover from failure. ● Review and commit infrastructure changes like code. ● Automate deployments on Days 1, 2, and beyond. 21
  • 26. Many Clouds 24 FOUNDATION PROVIDERS Unopinionated support for all clouds and their resources. PRODUCTIVITY LIBRARIES Libraries for best practices and productivity. Containers Serverless Infrastructure MANY-CLOUD FRAMEWORK Create modern cloud native applications that can run anywhere. PRODUCTIVITYCONTROL
  • 29. Automated Delivery Most production deployments are triggered using automation. ● GitOps: Review changes in SCM, trigger deployments from CI/CD. ● One Workflow: Application containers, application config, infrastructure. 27
  • 30. 28
  • 31. Cloud Engineering - Test Your Infrastructure Unit testing: Ensure infrastructure configuration is correct. Integration testing: Ensure the system works after deploying. Enforce policy: Stop security issues before they ship. More exotic testing: Fault injection, fuzzing, scale testing. 29
  • 32. ✅ Why Infrastructure as Code? ✅ Standing on the Shoulders of Giants 30
  • 33. The Future of Cloud Architectures Developers want to focus on business logic! ● PaaS: deploy small units of application-centric packaging (e.g, containers). ● Serverless: focus on application logic, pay per use, less fixed infrastructure. ● NoCode: for vertical applications, no code at all (powered by IaC underneath). The world is powered by infrastructure building blocks. Great things will come to those who can build bigger things out of smaller things. Using real languages for infrastructure enables a virtuous cycle of building. Teams where developers, infrastructure engineers, and operators collaborate will win. 31
  • 34. The power of real programming languages with the safety and robustness of infrastructure as code. 32 In Summary
  • 35. It’s Just Code -- Have Some Fun! 33
  • 37. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ multi-language-iascode/