diff --git a/.gitignore b/.gitignore index f5e6a958..4755593d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ resources/ node_modules/ **/cdk.out/* *~ +.idea/* diff --git a/content/ecs-spot-capacity-providers/_index.md b/content/ecs-spot-capacity-providers/_index.md index 8a9cb457..3b1895f5 100644 --- a/content/ecs-spot-capacity-providers/_index.md +++ b/content/ecs-spot-capacity-providers/_index.md @@ -7,16 +7,23 @@ pre: "⁃ " ## Overview - Welcome! In this workshop you learn how to **cost optimize** running a sample container based web application, using Amazon ECS and EC2 Spot Instances. -The *estimated time* for completing the workshop is 90-120 minutes. +The **learning objective** of this hands-on workshop is to help understand the different options to cost optimize container workloads running on **[Amazon ECS](https://aws.amazon.com/ecs/)** using **[EC2 Spot Instances](https://aws.amazon.com/ec2/spot/)** and **[Amazon Fargate Spot](https://aws.amazon.com/fargate/)**. This workshop covers topics such as ECS Cluster Auto scaling and how to use scale efficiently with **[Capacity Providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html)** to spread your tasks across a mix of resources, both on AWS Fargate and AWS Fargate Spot and EC2 OnDemand and Spot Instances. + +{{% children showhidden="false" %}} + +{{% notice info %}} +The estimated time for completing the workshop is **90 to 120 minutes**. The estimated cost will be less than **$5**. +{{% /notice %}} + +These labs are designed to be completed in sequence. If you are reading this at a live AWS event, the workshop attendants will give you a high level run down of the labs. Then it's up to you to follow the instructions below to complete the labs. Don't worry if you're embarking on this journey in the comfort of your office or home, this site contains all the materials for you'll need to complete this workshop. + + -The **learning objective** of this hands-on workshop is to help understand the different options to cost optimize container workloads running on [***Amazon ECS***] (https://aws.amazon.com/ecs/) using [***EC2 Spot Instances***] (https://aws.amazon.com/ec2/spot/) and [***Amazon Fargate Spot***] (https://aws.amazon.com/fargate/). -This workshop covers ECS Cluster Auto scaling(by using **[Capacity Providers] (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html)**) on two compute options, user managed compute on **EC2** and fully managed serverless compute on **Amazon Fargate.** ### About Spot Instances in Containerized workloads -Many containerized workloads are usually stateless and fault tolerant and are great fit for running them on EC2 Spot. In this workshop we will explore how to run containers on inturruptable EC2 Spot instances and save significantly compared to running them on EC2 On-Demand instances. +Many containerized workloads are usually stateless and fault tolerant and are great fit for running them on EC2 Spot. In this workshop we will explore how to run containers on interruptible EC2 Spot instances and save significantly compared to running them on EC2 On-Demand instances. diff --git a/content/ecs-spot-capacity-providers/prerequisites.md b/content/ecs-spot-capacity-providers/prerequisites.md new file mode 100644 index 00000000..04129975 --- /dev/null +++ b/content/ecs-spot-capacity-providers/prerequisites.md @@ -0,0 +1,23 @@ +--- +title: "Prerequisites" +weight: 3 +--- + +To run through this workshop we expect you to have some familiarity with [Docker](www.docker.com), AWS, any container orchestration tools such as [Amazon Elastic Container Service (ECS)](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html), [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/), [Kubernetes](https://kubernetes.io/), etc. During the workshop you will be using [AWS Cloud9](https://aws.amazon.com/cloud9/) editor and terminal to run [AWS CLI](https://aws.amazon.com/cli/) commands. Use the AWS Region that is specified by the facilitator when running this workshop at AWS hosted event. You may use any AWS Region while running it self-paced mode on your own AWS account. + +## Conventions: + +Throughout this workshop, we provide commands for you to run in the terminal. These commands will look like this: + +
+$ ssh -i PRIVATE_KEY.PEM ec2-user@EC2_PUBLIC_DNS_NAME ++ +The command starts after `$`. Words that are ***UPPER_ITALIC_BOLD*** indicate a value that is unique to your environment. For example, the ***PRIVATE\_KEY.PEM*** refers to the private key of an SSH key pair that you've created, and the ***EC2\_PUBLIC\_DNS\_NAME*** is a value that is specific to an EC2 instance launched in your account. + +## General requirements and notes: + +1. This workshop is self-paced. The instructions will walk you through achieving the workshop’s goal using the AWS Management Console. + +2. While the workshop provides step by step instructions, *please do take a moment to look around and understand what is happening at each step* as this will enhance your learning experience. The workshop is meant as a getting started guide, but you will learn the most by digesting each of the steps and thinking about how they would apply in your own environment and in your own organization. You can even consider experimenting with the steps to challenge yourself. + diff --git a/content/ecs-spot-capacity-providers/prerequisites/_index.md b/content/ecs-spot-capacity-providers/prerequisites/_index.md deleted file mode 100644 index edd222c5..00000000 --- a/content/ecs-spot-capacity-providers/prerequisites/_index.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "Prerequisites" -chapter: true -weight: 3 ---- - -# Prerequisites - -
-Familiarity with Docker, AWS, any container orchestration tools such as ECS, EKS, Kubernetes etc. You will be using AWS Cloud9 to CLI commands. Use the AWS Region that is specified by the facilitator when running this workshop at AWS hosted event. You may use any AWS Region while ruinning it self-paced mode on your own/organization AWS account. -
- -Conventions ---- --Throughout this workshop, we provide commands for you to run in the terminal. These commands will look like this: -
- -**$ ssh -i PRIVATE_KEY.PEM ec2-user@EC2_PUBLIC_DNS_NAME** - -The command starts after **$**. Words that are ***UPPER_ITALIC_BOLD*** indicate a value that is unique to your environment. For example, the **PRIVATE_KEY.PEM** refers to the private key of an SSH key pair that you’ve created, and the **EC2_PUBLIC_DNS_NAME** is a value that is specific to an EC2 instance launched in your account. - -## General requirements and notes: - - -1. This workshop is self-paced. The instructions will walk you through achieving the workshop’s goal using the AWS Management Console. -2. While the workshop provides step by step instructions, *please do take a moment to look around and understand what is happening at each step* as this will enhance your learning experience. The workshop is meant as a getting started guide, but you will learn the most by digesting each of the steps and thinking about how they would apply in your own environment and in your own organization. You can even consider experimenting with the steps to challenge yourself. - diff --git a/workshops/ecs-spot-capacity-providers/launch-template-data.1.json b/workshops/ecs-spot-capacity-providers/launch-template-data.1.json deleted file mode 100755 index 5f8d6715..00000000 --- a/workshops/ecs-spot-capacity-providers/launch-template-data.1.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "IamInstanceProfile": { - "Arn": "%instanceProfile%" - }, - "ImageId": "%ami-id%", - "SecurityGroupIds": [ - "%instanceSecurityGroup%" - ], - "InstanceType": "t3.micro", - "BlockDeviceMappings": [ - { - "DeviceName": "/dev/xvdcz", - "Ebs": { - "VolumeSize": 22, - "VolumeType": "gp2", - "DeleteOnTermination": true, - "Encrypted": true - } - } - ], - "TagSpecifications": [ - { - "ResourceType": "instance", - "Tags": [ - { - "Key": "Name", - "Value": "%workshopName%" - }, - { - "Key": "Env", - "Value": "Test" - } - ] - } - ], - "NetworkInterfaces":[ - { - "AssociatePublicIpAddress":true, - "DeviceIndex": 0, - "Groups":["sg-4f3f0d1e"] - } - ], - "SecurityGroupIds": ["sg-4f3f0d1e"], - "SecurityGroups": ["sg-4f3f0d1e"], - "Monitoring": { - "Enabled": true - }, - - "UserData": "%UserData%" -}