Quick start
How to use
Pass your ecs-cluster name
- You must always provide the
ecs-cluster
on the command-line - Optionally, you can provide the
delay
option to delay in-between checks - Optionally, you can also provide the
attempts
option for the number of attempts for the health check
Use the -e
option to exit with 1 when unhealthy
- You you provide the
-e
flag, the program will exit withexit code 1
if any of the target is unhealthy - This is useful for continuous delivery - Jenkins, CircleCI and others
- Likewise, if you dont't provide the
-e
flag, the program will simply exit withexit code 0
if any of the target is unhealthy
Use the -b
option to disable progress bar
On jenkins you may not want the progress bar to be printed out as it prints out the progress line by line. You can use the -b
option to disable progress bar. By default, it prints the progress bar.
With Docker
docker run --rm \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
-e AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \
-e AWS_REGION=${AWS_REGION} \
-e AWS_DEFAULT_REGION=${AWS_REGION} \
health-check --ecs-cluster esp-devops --attempts 50 --delay 2
## pass -b to disable progress bar on jenkins