File tree 1 file changed +17
-0
lines changed 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,22 @@ pushing any new code beforehand. To do so, run this command:
36
36
aws ecs update-service --cluster rust-ecs-prod --service <service-name> --force-new-deployment
37
37
```
38
38
39
+ ## Rolling back a deployment
40
+
41
+ To rollback a bad deployment you can run the [ ` aws-rollback.py ` ] script (stored
42
+ in the simpleinfra repository) with your [ AWS credentials] [ aws-access ] present
43
+ in the shell. The script requires the name of the ECR container image
44
+ repository as its first and only argument:
45
+
46
+ ```
47
+ ./aws-rollback.py <image-repository-name>
48
+ ```
49
+
50
+ The script will show the list of images available in the repository, and asks
51
+ for the image number to rollback to. Once that's inserted the script will point
52
+ the ` latest ` tag to the image you chose, and if an ECS service with the same
53
+ name as the repository exists that service will be restarted too.
54
+
39
55
## Deploying application changes
40
56
41
57
Each application stores its own Docker container in a [ ECR repository] [ ecr ] in
@@ -98,3 +114,4 @@ pushed there will be deployed to the ECS cluster.
98
114
[ aws-access ] : aws-access.md
99
115
[ console-access ] : aws-access.md#using-the-aws-console
100
116
[ ecr ] : https://aws.amazon.com/ecr/
117
+ [ `aws-rollback.py` ] : https://github.com/rust-lang/simpleinfra/blob/master/aws-rollback.py
You can’t perform that action at this time.
0 commit comments