er-aws-deploy

1.4.0 • Public • Published

NODE AWS ECS Deployment cli tools

Description & Limitations

  • It can update only already existing services. The only manual step you have to take is to create the ECS service on AWS first.
  • This step can be automated using the aws CLI tools

What it does:

  • It updates an existing task definition with a given Docker image and image tag
  • The task definition has to be the same as the service name
  • It will find and update the image tag with the new tag
  • It will stop the service and wait for 60 seconds
  • It will start the service again with the new task definition that was created
  • That's it, the new service is live!
Running as global installed task:
 npm install -g er-aws-deploy

# Deploy new AWS service
DEBUG=er-aws-deploy aws-deploy-service \
  --cluster=$CLUSTER \
  --service-name=$SERVICE_NAME \
  --image=$IMAGE_NAME \
  --image-tag=$IMAGE_TAG \
  --service-count=$SERVICE_DESIRED_COUNT \
  --service-min-health=$SERVICE_DESIRED_MINIMUM_HEALTH_PERCENT \
  --service-max-health=$SERVICE_DESIRED_MAXIMUM_HEALTH_PERCENT \
  --config-path=$CONFIG_PATH

# Publish new 'latest' and '1.0.0' image to docker registry
DEBUG=er-aws-deploy docker-service-publish \
  --image=$IMAGE_NAME \
  --image-tag=$IMAGE_TAG

# Publish to docker registry and AWS
DEBUG=er-aws-deploy aws-build-deploy-service \
  --cluster=$CLUSTER \
  --service-name=$SERVICE_NAME \
  --image=$IMAGE_NAME \
  --image-tag=$IMAGE_TAG \
  --service-count=$SERVICE_DESIRED_COUNT \
  --service-min-health=$SERVICE_DESIRED_MINIMUM_HEALTH_PERCENT \
  --service-max-health=$SERVICE_DESIRED_MAXIMUM_HEALTH_PERCENT \
  --config-path=$CONFIG_PATH

Readme

Keywords

none

Package Sidebar

Install

npm i er-aws-deploy

Weekly Downloads

9

Version

1.4.0

License

MIT

Last publish

Collaborators

  • liviuignat