Slide 1

Slide 1 text

Build Your Azure Infrastructure as Code With .NET Core Hossam Barakat Engineering Manager at Willow @hossambarakat_ | www.hossambarakat.net

Slide 2

Slide 2 text

@hossambarakat_ How to provision cloud resources?

Slide 3

Slide 3 text

@hossambarakat_ Manual AKA Point and Click

Slide 4

Slide 4 text

@hossambarakat_ Manual AKA Point and Click

Slide 5

Slide 5 text

@hossambarakat_ Snowflake Servers

Slide 6

Slide 6 text

@hossambarakat_ Infrastructure as Code

Slide 7

Slide 7 text

@hossambarakat_ • Managing and provisioning cloud resources using code. Infrastructure as Code

Slide 8

Slide 8 text

@hossambarakat_ Imperative: CLI commands and scripts

Slide 9

Slide 9 text

@hossambarakat_ Idempotency and error handling

Slide 10

Slide 10 text

@hossambarakat_ Declarative Infrastructure as Code

Slide 11

Slide 11 text

@hossambarakat_ Tool Declarative Infrastructure as Code Desired State Actual Resources

Slide 12

Slide 12 text

@hossambarakat_ • Azure Resource Manager • Terraform • Bicep • AWS CloudFormation • Google Deployment Manager • … Declarative Infrastructure as Code tools

Slide 13

Slide 13 text

@hossambarakat_ • JSON, YAML, domain specific languages (DSLs),… Infrastructure as Code tools

Slide 14

Slide 14 text

@hossambarakat_

Slide 15

Slide 15 text

@hossambarakat_ Enter Pulumi

Slide 16

Slide 16 text

@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?

Slide 17

Slide 17 text

@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

Slide 18

Slide 18 text

@hossambarakat_

Slide 19

Slide 19 text

@hossambarakat_ Pulumi Fundamentals

Slide 20

Slide 20 text

@hossambarakat_ Projects & Stacks web-app (Pulumi.yaml) Project $ pulumi new Stacks $ pulumi stack init stackName Pulumi..yaml Pulumi.yaml

Slide 21

Slide 21 text

@hossambarakat_ Configurations $ pulumi config set dbPassword S3cr37 config: serverless-app:dbPassword: S3cr37 Pulumi..yaml var config = new Pulumi.Config(); var password = config.Require("dbPassword"); Pulumi.cs

Slide 22

Slide 22 text

@hossambarakat_ Application architecture on Azure

Slide 23

Slide 23 text

@hossambarakat_

Slide 24

Slide 24 text

@hossambarakat_ But that would be imperative, right?

Slide 25

Slide 25 text

@hossambarakat_ How Pulumi Works State CLI and Engine AWS Azure Kubernetes Providers Code Plan Apply new Resource()

Slide 26

Slide 26 text

@hossambarakat_ Continuous Deployment Infrastructure as Code Manual Review State

Slide 27

Slide 27 text

@hossambarakat_ GitHub Integration

Slide 28

Slide 28 text

@hossambarakat_ Summary

Slide 29

Slide 29 text

@hossambarakat_

Slide 30

Slide 30 text

@hossambarakat_ • https://github.com/hossambarakat/pulumi-demos • http://pulumi.com/docs • https://github.com/pulumi/examples Resources

Slide 31

Slide 31 text

@hossambarakat_ Questions?

Slide 32

Slide 32 text

Thanks Hossam Barakat @hossambarakat_ www.hossambarakat.net