VPC!
HTTP Server
import pulumi
import pulumi_aws as aws
import pulumi_awsx as awsx
cluster = aws.ecs.Cluster("default-cluster")
lb = awsx.lb.ApplicationLoadBalancer("nginx-lb")
service = awsx.ecs.FargateService("my-service",
cluster=cluster.arn,
assign_public_ip=True,
task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs(
container=awsx.ecs.TaskDefinitionContainerDefinitionArgs(
image="nginx:latest",
name="nginx",
cpu=512,
memory=128,
essential=True,
port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs(
target_group=lb.default_target_group
)],
)
)
)
Skills, Tools, Knowledge to deploy production infrastructure with Pulumi.
Leverage Pulumi Automation tools.
This includes:
Specifically, by the end of this workshop, participants will have:
Infrastructure as Code (IaC) is the process of managing and provisioning computing infrastructure through machine-readable scripts, rather than through physical hardware configuration or interactive configuration tools.
Imperative vs Declarative Deployments
Step by step instructions on how to reach an end state.
Building a House (Framing):
Deploy Docker Image to ECR
# Authenticate
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 659949029828.dkr.ecr.us-east-1.amazonaws.com
# Build Docker Image
docker build -t nma-level-one-ecr-9a75cad .
# Tag Image
docker tag nma-level-one-ecr-9a75cad:latest 659949029828.dkr.ecr.us-east-1.amazonaws.com/nma-level-one-ecr-9a75cad:latest
# Push Image
docker push 659949029828.dkr.ecr.us-east-1.amazonaws.com/nma-level-one-ecr-9a75cad:latest
Provide a Blueprint, and the service builds to the blueprint standard.
Building a House (Framing):
Deploy Docker Image to ECR
Features: Multi-Cloud, Programming, Declarative, Open Source
Pulumi is a modern (newer) IaC tool that allows you to define infrastructure resources using familiar programming languages.
The Pulumi CLI is the primary interface for interacting with Pulumi.
Common Commands
pulumi new
: Create a new project.pulumi up
: Deploy changes.pulumi preview
: Preview changes.pulumi destroy
: Tear down resources.Login to AWS via SSO: AWS Console
Navigate to the Cloud9 Dashboard.
Look under Shared with Me to find your environment.
It should be named: pw-cloud9-{your cics username}-*
Open this Cloud9 Instance
In a terminal, clone this GitLab Repo
Run the 00-getting-started/install.sh
script.
Restart Terminal. Run pulumi whoami
.
Open Source
Company
Pulumi Party!