File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 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:
3636aws ecs update-service --cluster rust-ecs-prod --service <service-name> --force-new-deployment
3737```
3838
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+
3955## Deploying application changes
4056
4157Each 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.
98114[ aws-access ] : aws-access.md
99115[ console-access ] : aws-access.md#using-the-aws-console
100116[ 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