You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Lab-1-Artifacts/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ At the end of this lab you will have an ECS cluster composed of Spot fleet insta
10
10
11
11
a. The cluster should be named **catsndogsECScluster**. This name is used in later labs, so if you name the cluster something else you will have to remember this when running later commands.
12
12
13
-
b. Select several instance types from a range of instance types. It is recommended you use smaller instance sizes rather than large ones. For example: m4.large, c4.large, r4.large, i3.large. You may also use previous-generation families.
13
+
b. Select several instance types from a range of instance types. It is recommended you use smaller instance sizes rather than large ones. For example: m5.large, c5.large, m4.large, c4.large, r4.large, i3.large.
Copy file name to clipboardExpand all lines: Lab-1-Artifacts/lab1-detailed-steps.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@
24
24
25
25
4. i3.large
26
26
27
-
**Note:** You can also pick older generation families such as m3.large..
27
+
**Note:** You can also pick older generation families such as m3.large as long as they support HVM AMIs.
28
28
29
-
8. In **Maximum big price (per instance/hour)** you can click the **Spot prices** link to view the current spot prices for the instance types and sizes you have selected. More information on how EC2 Spot instance pricing works is available on the Amazon EC2 Spot Instances Pricing page: https://aws.amazon.com/ec2/spot/pricing/
29
+
8. In **Maximum price (per instance/hour)** you can click the **Spot prices** link to view the current spot prices for the instance types and sizes you have selected. More information on how EC2 Spot instance pricing works is available on the Amazon EC2 Spot Instances Pricing page: https://aws.amazon.com/ec2/spot/pricing/
30
30
31
31
9. Enter a maximum bid price. For the purposes of the workshop, $0.25 should offer an excellent chance of your Spot bid being fulfilled. It does not matter if your spot bid is not fulfilled. In a later step you will add an on-demand instance to the cluster.
32
32
@@ -40,7 +40,7 @@
40
40
41
41
14. In **Security group**, select the Security Group containing the term **InstanceSecurityGroup**.
42
42
43
-
15. In **Container Instance IAM role** select the IAM role containing the term **catsndogssetup-EC2Role**.
43
+
15. In **Container Instance IAM role** select the IAM role containing the term **setup-EC2Role**.
44
44
45
45
16. In **IAM role for a Spot Fleet request** select the role with a name containing **catsndogssetup-SpotFleetTaggingRole**.
46
46
@@ -52,7 +52,7 @@
52
52
53
53
20. Select the checkbox for the CloudFormation stack, and click the **Template** tab.
54
54
55
-
21. The ECSSpotFleet resource has a Property named **LaunchSpecifications**, which contains **UserData**. This is about half way down the template. This UserData creates a termination watcher script described below. You will not be able to see the contents directly from the CloudFormation console.
55
+
21. The EcsSpotFleet resource has a Property named **LaunchSpecifications**, which contains **UserData**. This is about half way down the template. This UserData creates a termination watcher script described below. You will not be able to see the contents directly from the CloudFormation console, although you can see part of the script by going to the **Parameters** tab and hovering the mouse pointer over the value for **UserData**.
56
56
57
57
**Note:** This script creates a Spot instance termination notice watcher script on each EC2 instance. That watcher script runs on each instance every two minutes. It polls the EC2 instance metadata service for a Spot termination notice. If the instance is scheduled for termination (because you have been outbid) the script sends a command to the ECS service to put itself into a DRAINING state. This prevents new tasks being scheduled on the instance, and if capacity is available in the cluster, ECS will start replacement tasks on other instances within the cluster.
58
58
@@ -164,7 +164,7 @@ If you have used Auto Scaling groups with ECS before, you can launch a CloudForm
164
164
165
165
1. In the AWS Console **Compute** section click **EC2**, then click **Instances**.
166
166
167
-
2. Right click on an instance and click **Launch more like this**.
167
+
2. Identify instances that were launched for this workshop (hint: the security group assigned to them will start with **catsndogssetup**). Right click on an instance and click **Launch more like this**.
168
168
169
169
3. At the top of the console click **Choose Instance Type**.
7. In **Image** enter **205094881157.dkr.ecr.us-west-2.amazonaws.com/image-assessor:latest**.
19
+
7. In **Container Name** enter **ImageAssessmentContainer**.
20
20
21
-
8. In **Memory Limits (MiB)** enter **128**.
21
+
8. In **Image** enter **205094881157.dkr.ecr.us-west-2.amazonaws.com/image-assessor:latest**.
22
22
23
-
9. In **Env Variables** you need to enter the URL of the catsndogs load balancer. The ImageAssessor container uses this to send API commands to the cats containers:
23
+
9. In **Memory Limits (MiB)** enter **128**.
24
+
25
+
10. In **Env Variables** you need to enter the URL of the catsndogs load balancer. You can find this in the CloudFormation console - look at the **catsndogssetup** stack, check the **Outputs** tab for the value **LoadBalancerDNSName**. The ImageAssessor container uses this to send API commands to the cats containers:
24
26
25
27
1. Key: ALB_URL
26
28
27
29
2. Value: <URLoftheloadbalancer> for example: http://catsn-catsn-123455678-abcdefgh.us-west-2.elb.amazonaws.com
28
30
29
-
10. Click **Add**.
31
+
11. Click **Add**.
30
32
31
-
11. Click **Create**.
33
+
12. Click **Create**.
32
34
33
35
## 4.2 Create a scheduled ECS task.
34
36
@@ -107,35 +109,37 @@ The ImageAssessor can also reset all of the cats image if the following environm
107
109
108
110
2. Click the **Tasks** tab and then click **Run new Task**.
109
111
110
-
3. In **Task Definition** select the most recent revision of the **ImageAssessor** task.
112
+
3: For **Launch type** select **EC2**.
113
+
114
+
4. In **Task Definition** select the most recent revision of the **ImageAssessor** task.
111
115
112
-
4. In **Cluster** select the **catsndogsECScluster**.
116
+
5. In **Cluster** select the **catsndogsECScluster**.
113
117
114
-
5. In **Number of tasks** enter **2**.
118
+
6. In **Number of tasks** enter **2**.
115
119
116
-
6. Leave **Task Group** blank.
120
+
7. Leave **Task Group** blank.
117
121
118
-
7. Expand **Advanced Options**.
122
+
8. Expand **Advanced Options**.
119
123
120
-
8. Under **Container Overrides** expand the **ImageAssessor** container.
124
+
9. Under **Container Overrides** expand the **ImageAssessor** container.
121
125
122
-
9. In **Environment variable overrides** click the + to add a new environment variable.
126
+
10. In **Environment variable overrides** click the + to add a new environment variable.
123
127
124
-
10. In Key enter **RESETPICTURES** and in Value enter **1**.
128
+
11. In Key enter **RESETPICTURES** and in Value enter **1**.
125
129
126
-
11. Click **Run Task**.
130
+
12. Click **Run Task**.
127
131
128
-
12. In the **Tasks** tab the **ImageAssessor** tasks should move appear with a **Last status** of PENDING. In a few seconds this will change from PENDING to RUNNING.
132
+
13. In the **Tasks** tab the **ImageAssessor** tasks should move appear with a **Last status** of PENDING. In a few seconds this will change from PENDING to RUNNING.
129
133
130
-
13. The tasks will run for 30 seconds and then exit.
134
+
14. The tasks will run for 30 seconds and then exit.
131
135
132
-
14. Once they have exited, click **Desired task status: Stopped**.
136
+
15. Once they have exited, click **Desired task status: Stopped**.
133
137
134
-
15. Find one of the ImageAssessor tasks in the list and click the **Task** identifier.
138
+
16. Find one of the ImageAssessor tasks in the list and click the **Task** identifier.
135
139
136
-
16. Under Containers, expand the image-assessor container. You should see the **Exit code0** indicating the container exited successfully.
140
+
17. Under Containers, expand the image-assessor container. You should see the **Exit code0** indicating the container exited successfully.
137
141
138
-
17. Verify the cats pictures have been reset by querying the cats API. Replace the host in the example below with the URL of your load balancer:
142
+
18. Verify the cats pictures have been reset by querying the cats API. Replace the host in the example below with the URL of your load balancer:
Copy file name to clipboardExpand all lines: Lab-5-Artifacts/lab5-detailed-steps.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,13 @@ In this step, you will create a new task definition for a deep learning containe
10
10
11
11
3. Click **Create new Task Definition**.
12
12
13
-
4.In**Task Definition Name**, enter **mxnet**.
13
+
4.Click**EC2** and then **Next step**.
14
14
15
-
5.Click**Add Container**.
15
+
5.In**Task Definition Name**, enter **mxnet**.
16
16
17
-
6. In the **Add container** dialog, under Standard:
17
+
6. Click **Add Container**.
18
+
19
+
7. In the **Add container** dialog, under Standard:
18
20
19
21
1. In **Container name**, enter mxnet
20
22
@@ -26,19 +28,19 @@ In this step, you will create a new task definition for a deep learning containe
26
28
27
29
4. Click **Add**.
28
30
29
-
7. In **Constraint**, click **Add constraint**.
31
+
8. In **Constraint**, click **Add constraint**.
30
32
31
-
8. Set the **Expression** to use an instance type that is currently running in the cluster. For example if one of the instance types was an c4.large, you would enter:
33
+
9. Set the **Expression** to use an instance type that is currently running in the cluster. For example if one of the instance types was an c4.large, you would enter:
32
34
33
-
`attribute:ecs.instance-type == c4.large`
35
+
`attribute:ecs.instance-type == c4.large`
34
36
35
-
To check the instance types running, open the Clusters view in a new tab, click catsndogsECScluster and select the ECS Instances tab.
37
+
To check the instance types running, open the Clusters view in a new tab, click catsndogsECScluster and select the ECS Instances tab.
36
38
37
-
From the pop-up window, click the cog button, , and select ecs.instance-type.
39
+
From the pop-up window, click the cog button, , and select ecs.instance-type.
38
40
39
-
Scroll along the list of instances to see the ecs.instance-type value.
41
+
Scroll along the list of instances to see the ecs.instance-type value.
40
42
41
-
9. Click **Create**.
43
+
10. Click **Create**.
42
44
43
45
## 5.2 Create a new service for MXNet with a custom placement strategy
44
46
@@ -52,15 +54,17 @@ In this step, you will create a new ECS Service that will ensure two instances o
52
54
53
55
4. In **Configure service**:
54
56
55
-
1. In **Task definition**, choose **mxnet:1**.
57
+
1. In **Launch Type**, choose **EC2**.
58
+
59
+
2. In **Task definition**, choose the latest revision for **mxnet**.
56
60
57
-
2. In **Cluster**, choose **catsndogsECScluster**.
61
+
3. In **Cluster**, choose **catsndogsECScluster**.
58
62
59
-
3. In **Service name**, enter **mxnetservice**.
63
+
4. In **Service name**, enter **mxnetservice**.
60
64
61
-
4. In **Number of tasks**, enter **2**.
65
+
5. In **Number of tasks**, enter **2**.
62
66
63
-
5. Leave **Minimum healthy percent** and **Maximum percent** at their defaults.
67
+
6. Leave **Minimum healthy percent** and **Maximum percent** at their defaults.
64
68
65
69
You will now use a custom placement template to force the MXNet tasks to spread across Availability Zones, then across different instance types, and then BinPack based on Memory:
66
70
@@ -78,7 +82,7 @@ You will now use a custom placement template to force the MXNet tasks to spread
78
82
79
83
11. Click **Next step**.
80
84
81
-
12. In **Network configuration**, for **Load Balancing**, choose **ELB Type** of **None**.
85
+
12. In **Network configuration**, for **Load Balancing**, choose **Load balancer type** of **None**.
Copy file name to clipboardExpand all lines: Lab-6-Artifacts/lab6-detailed-steps.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,15 +134,13 @@ The development team at catsndogs.lol would like you to deploy a new revision of
134
134
135
135
4. Expand **Outputs**, locate the **Cloud9IDE** output. Click on the associated link to launch the Cloud9 IDE.
136
136
137
-
5. At the command prompt run `cd ~/environment/dogs` to switch to the local clone of the Dogs application repository.
137
+
5. In the folder list on the left, expand the **dogs** folder and double-click **index.html** to edit it.
138
138
139
-
6. Run the command `nano index.html` to edit the index.html file.
139
+
6. Locate the `background` property, within the ``<style>`` tags, and change the value to another color. For example, ``“background: green;”``
140
140
141
-
7. Locate the `background` property, within the ``<style>`` tags, and change the value to another color. For example, ``“background: blue;”``
141
+
7. Click on the circle in the tab showing **index.html** and click **Save** to save your changes.
142
142
143
-
8. Within the nano editor press `ctrl + x` to exit the editor. When prompted type `Y` to confirm that the changes should be saved.
144
-
145
-
9. Commit the changes that have just been made t and push them to the remote repository by running the following commands:
143
+
8. Commit the changes that have just been made t and push them to the remote repository by running the following commands:
146
144
147
145
```
148
146
git add index.html
@@ -151,15 +149,15 @@ git commit -m ‘changing background color
151
149
152
150
git push
153
151
```
154
-
10. Open the AWS management console, and open the **AWS CodePipeline** console at https://console.aws.amazon.com/codepipeline/.
152
+
9. Open the AWS management console, and open the **AWS CodePipeline** console at https://console.aws.amazon.com/codepipeline/.
155
153
156
-
11. To verify your pipeline ran successfully:
154
+
10. To verify your pipeline ran successfully:
157
155
158
156
1. From the **All Pipelines** table, click the **CatsnDogsPipeline**, to monitor the progress of your pipeline.
159
157
160
158
2. The status of each stage should change from No executions yet to **In progress**, and then **Succeeded** or **Failed**. The pipeline should complete the first run within a few minutes.
161
159
162
-
12. Copy the value of the **LoadBalancerDNSName**, created by the **catsndogssetup** CloudFormation stack that was deployed at the start of the workshop, in to you address bar of your web browser.
160
+
11. Copy the value of the **LoadBalancerDNSName**, created by the **catsndogssetup** CloudFormation stack that was deployed at the start of the workshop, in to you address bar of your web browser.
163
161
164
162
The Dogs application page should appear with fancy new background color.
0 commit comments