Skip to content

Commit

Permalink
ecs-deploy: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstah committed Aug 11, 2019
1 parent 8122280 commit 519444b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
41 changes: 30 additions & 11 deletions ecs/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,46 @@ Update an ECS service and its task definition with a new image and starts a depl
and override the images with the ones in `--image`.

```
usage: ecs-deploy --task-name=TASK-NAME --cluster=CLUSTER --service=SERVICE [<flags>]
usage: ecs-deploy --cluster=CLUSTER --service=SERVICE [<flags>]
Update a task definition on ECS.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--assume-role-arn=ASSUME-ROLE-ARN
--task-name=TASK-NAME ECS task name
--cluster=CLUSTER ECS cluster
--service=SERVICE ... ECS services
--image=IMAGE ... Change the images to the new ones. Format is container_name=image. Can be repeated.
--timeout=300s Timeout when waiting for services to update
--task-json=TASK-JSON Path to a JSON file with the task definition to use
--assume-role-arn=ASSUME-ROLE-ARN
Role to assume
--assume-role-external-id=ASSUME-ROLE-EXTERNAL-ID
--assume-role-external-id=ASSUME-ROLE-EXTERNAL-ID
External ID of the role to assume
--assume-role-session-name=ASSUME-ROLE-SESSION-NAME
--assume-role-session-name=ASSUME-ROLE-SESSION-NAME
Role session name
--region=REGION AWS Region
--mfa-serial-number=MFA-SERIAL-NUMBER
--mfa-serial-number=MFA-SERIAL-NUMBER
MFA Serial Number
--mfa-token-code=MFA-TOKEN-CODE
--mfa-token-code=MFA-TOKEN-CODE
MFA Token Code
--session-duration=1h Session Duration
-v, --version Display the version
--task-name=TASK-NAME ECS task name
--cluster=CLUSTER ECS cluster
--service=SERVICE ... ECS services
--image=IMAGE ... Change the images to the new ones. Container name=image
--timeout=300s Timeout when waiting for services to update
--log-level=warn Log level
--log-format=text Log format
```

# Examples

* Update a container image in a task
```
$ ecs-deploy --cluster prod --task-name web --service web --image proxy=nginx:latest
```
* Update mutliple containers in the same task
```
$ ecs-deploy --cluster prod --task-name web --service web --image proxy=nginx:latest api=django:latest
```
* Update the task JSON
```
$ ecs-deploy --cluster prod --service web --task-json web.json --image api=django:latest
```
2 changes: 1 addition & 1 deletion ecs/deploy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
taskName = kingpin.Flag("task-name", "ECS task name").String()
cluster = kingpin.Flag("cluster", "ECS cluster").Required().String()
services = kingpin.Flag("service", "ECS services").Required().Strings()
images = kingpin.Flag("image", "Change the images to the new ones. Container name=image").StringMap()
images = kingpin.Flag("image", "Change the images to the new ones. Format is container_name=image. Can be repeated.").StringMap()
timeout = kingpin.Flag("timeout", "Timeout when waiting for services to update").Default("300s").Duration()
taskJSON = kingpin.Flag("task-json", "Path to a JSON file with the task definition to use").String()
)
Expand Down

0 comments on commit 519444b

Please sign in to comment.