Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Build Your Cloud Infrastructure as Code With .N...
Search
Hossam Barakat
November 13, 2020
Programming
160
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
More Decks by Hossam Barakat
See All by Hossam Barakat
Build Your Cloud Infrastructure as Code With .Net Core - Build Stuff
hossambarakat
0
92
Kubernetes Blue-Green Deployment Made Easy with Argo Rollouts - ADDO
hossambarakat
0
150
Build Your Azure Infrastructure as Code With .NET Core - Azure Day
hossambarakat
0
49
Build Your Azure Infrastructure as Code With .Net Core - Global Azure 2021
hossambarakat
0
69
Practical Domain-Driven Design with EF Core - NDC London 2021
hossambarakat
0
260
Practical Domain Driven Design With EFCore - NDC Sydney 2020
hossambarakat
0
150
Build Your Cloud Infrastructure as Code With .Net Core - NDC Porto 2020
hossambarakat
2
170
Kubernetes for Developers - All Day DevOps
hossambarakat
2
190
Secure your Kubernetes Containers - All Day DevOps
hossambarakat
0
140
Other Decks in Programming
See All in Programming
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
200
Vite+ Unified Toolchain for the Web
naokihaba
0
740
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.5k
1B+ /day規模のログを管理する技術
broadleaf
0
130
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
霧の中の代数的エフェクト
funnyycat
1
340
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.4k
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
110
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
For a Future-Friendly Web
brad_frost
183
10k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
260
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
410
Amusing Abliteration
ianozsvald
1
220
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Transcript
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