Sign inSign up

aplulu/aws-ecs-deploy

By aplulu

•Updated over 7 years ago

Image
0

1.3K

aplulu/aws-ecs-deploy repository overview

⁠aws-ecs-deploy

Simple AWS ECS Task Deployment

⁠Usage

Usage of deploy:
  -cluster string
        Cluster Name
  -container string
        Container Name
  -image string
        Image URL
  -service string
        Service Name
  -skip-verify
        Skip Service Verify
  -task-definition string
        Task Definition Name
  -wait-count int
        Wait Count (default 30)
  -wait-sleep int
        Wait Sleep (default 3)

⁠Environment Variables

NameDescription
AWS_REGIONRegion
AWS_ACCESS_KEY_IDAccess Key ID
AWS_SECRET_ACCESS_KEYSecret Access Key
IMAGEImage Name
CONTAINERContainer Name
CLUSTERCluster Name
SERVICEService Name
WAIT_SLEEPService verify Interval (sec)
WAIT_COUNTMaximum number of verify for service
SKIP_VERIFYSkip service verify

⁠Example

⁠Google Cloud Build

cloudbuild.yaml

steps:
- name: gcr.io/cloud-builders/docker
  args:
  - build
  - --tag=$_IMAGE
  - .
- name: gcr.io/cloud-builders/docker
  args:
  - push
  - $_IMAGE
- name: aplulu/aws-ecs-deploy
  args:
  - --image=$_IMAGE:$COMMIT_SHA
  - --task-definition=[TaskDefinitionName]
  - --container=[ECSTaskDefinitionContainerName]
  - --cluster=[ECSClusterName]
  - --service=[ECSServiceName]
  env:
  - AWS_REGION=ap-northeast-1
  - AWS_ACCESS_KEY_ID=[AccessKeyID]
  secretEnv:
  - AWS_SECRET_ACCESS_KEY
substitutions:
  _IMAGE: [ImageName]
timeout: 720s
secrets:
- kmsKeyName: projects/[ProjectID]/locations/global/keyRings/[KeyringName]/cryptoKeys/[KeyName]
  secretEnv:
    AWS_SECRET_ACCESS_KEY: 

Tag summary

Content type

Image

Digest

Size

8.8 MB

Last updated

over 7 years ago

docker pull aplulu/aws-ecs-deploy