Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Build Your Cloud Infrastructure as Code With .N...
Search
Hossam Barakat
November 13, 2020
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Build Your Cloud Infrastructure as Code With .Net Core - ADDO 2020
Hossam Barakat
November 13, 2020
Transcript
33 slides
Build Your Cloud Infrastructure as Code With .Net Core Hossam
Barakat Technical Lead at Willow @hossambarakat_ | www.hossambarakat.net
@hossambarakat_ • Intro to Infrastructure as code • Your First
Pulumi Program • Pulumi Fundamentals • Continuous Delivery Agenda
@hossambarakat_ Data Centers
@hossambarakat_ Rise of Cloud Computing
@hossambarakat_ How to provision cloud resources?
@hossambarakat_ Manual AKA Point and Click
@hossambarakat_ Manual AKA Point and Click
@hossambarakat_ Snowflake Servers
@hossambarakat_ Infrastructure as Code
@hossambarakat_ • Managing and provisioning cloud resources using code. Infrastructure
as Code
@hossambarakat_ Imperative: CLI commands and scripts
@hossambarakat_ Idempotency and error handling
@hossambarakat_ Declarative Infrastructure as Code
@hossambarakat_ Tool Declarative Infrastructure as Code Desired State Actual Resources
@hossambarakat_ • Azure Resource Manager • AWS CloudFormation • Google
Deployment Manager • Terraform • … Declarative Infrastructure as Code tools
@hossambarakat_ • JSON, YAML, domain specific languages (DSLs),… Infrastructure as
Code tools
@hossambarakat_ https://noyaml.com/
@hossambarakat_
@hossambarakat_ Enter Pulumi
@hossambarakat_ • Pulumi is an open source infrastructure as code
tool the lets you use real languages – C#, TypeScript, Go,… – to provision and manage cloud resources. What is Pulumi?
@hossambarakat_ • Control flow with loops and if conditions •
Abstraction with functions, classes, packages,… • Code sharing with package management (Nuget, npm,…) • Authoring with favourite IDEs, refactoring, code completion, static type checking • Testing with existing frameworks and tools Benefits
@hossambarakat_
@hossambarakat_ Terraform vs Pulumi var resourceGroup = new ResourceGroup("pulumi-resources", new
ResourceGroupArgs { Location = "West Europe" }); ); var environments = new string[]{"dev", "uat", "prod"}; foreach (var environment in environments) { var storageAccount = new Account($"storage{environment}", new AccountArgs { Name = $"iacpulumi{environment}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, AccountReplicationType = "LRS", AccountTier = "Standard", }); } resource "azurerm_resource_group" "rg" { name = "terraform-resources" location = "West Europe" } variable "environments" { description = "storage account regions" type = list(string) default = ["dev", "uat", "prod"] } resource "azurerm_storage_account" "sa" { name = "iacpulumi${var.environments[count.index]}" resource_group_name = azurerm_resource_group.rg.name location = azurerm_resource_group.rg.location account_tier = "Standard" account_replication_type = "LRS" count = length(var.environments) }
@hossambarakat_ Pulumi Fundamentals
@hossambarakat_ Projects & Stacks web-app (Pulumi.yaml) Project $ pulumi new
Stacks $ pulumi stack init stackName Pulumi.<stack-name>.yaml Pulumi.yaml
@hossambarakat_ Configurations $ pulumi config set dbPassword S3cr37 config: serverless-app:dbPassword:
S3cr37 Pulumi.<stack-name>.yaml var config = new Pulumi.Config(); var password = config.Require("dbPassword"); Pulumi.cs
@hossambarakat_ Secrets $ pulumi config set --secret dbPassword S3cr37 var
config = new Pulumi.Config(); var password = config.Require("dbPassword"); Pulumi.cs Pulumi.<stack-name>.yaml config: serverless-app:dbPassword: secure: AAABAELDrCQE+rQbzTxN43iAD6iGDXTYQ90AzpILkfEY3uwtc+g=
@hossambarakat_ But that would be imperative and not declarative?
@hossambarakat_ How Pulumi Works State CLI and Engine AWS Azure
Kubernetes Providers Code Plan Apply new Resource()
@hossambarakat_ Continuous Deployment Infrastructure as Code Manual Review
@hossambarakat_ Summary
@hossambarakat_ Questions?
Thanks Hossam Barakat @hossambarakat_ www.hossambarakat.net
More Decks by Hossam Barakat
See All by Hossam Barakat
Build Your Cloud Infrastructure as Code With .Net Core - Build Stuff
hossambarakat
0
110
Kubernetes Blue-Green Deployment Made Easy with Argo Rollouts - ADDO
hossambarakat
0
180
Build Your Azure Infrastructure as Code With .NET Core - Azure Day
hossambarakat
0
63
Build Your Azure Infrastructure as Code With .Net Core - Global Azure 2021
hossambarakat
0
80
Practical Domain-Driven Design with EF Core - NDC London 2021
hossambarakat
0
280
Practical Domain Driven Design With EFCore - NDC Sydney 2020
hossambarakat
0
160
Build Your Cloud Infrastructure as Code With .Net Core - NDC Porto 2020
hossambarakat
2
190
Kubernetes for Developers - All Day DevOps
hossambarakat
2
200
Secure your Kubernetes Containers - All Day DevOps
hossambarakat
0
150
Other Decks in Programming
See All in Programming
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
330
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
690
Crash Auto Pipelines
veronikapj
1
430
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
AI-Powered Domain-Driven Design
ziobrando
0
470
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
Spec-driven Development with AI
simas
PRO
0
2.3k
AI Augmentation Techniques with Liberty
ivargrimstad
1
520
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
430
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
How to train your dragon (web standard)
notwaldorf
96
6.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
510
Chasing Engaging Ingredients in Design
codingconduct
0
400