Build Stage |
Run stage |
creating cluster |
cluster formation |
Deploy stage : Dev,Staging,Prod |
Stage Name | Job description |
---|---|
Build stage | Default Job: ->Source code checkout ->Building Docker image (Image format: 'registry.address:port/namespace/repository:tag') |
Run stage | Push the image to ECR: ->Script for Inject the ecr credentials ->Docker push (push the image to ECR). |
creating cluster | →command: aws ecs create-cluster --cluster-name "appname-xxxxx" --region "us-east-1" |
Job name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Bootstrapping Ec2 instance: | → command knife bootstrap ipaddress.xxxxx --ssh-user centos --sudo --identity-file /home/bamboo/.ssh/xxxxx.pem --node-name nodename-xxxx --run-list 'role[ecs-xxxx]' → command Adding the runlist knife node run_list add nodenamexxxx 'role[role-name]' | ||||||||||
→ command Run task aws ecs register-task-definition --family xxxapp --container-definitions "[{"name":"appname_container","image":"registry.address:port/namespace/repository:tag:xxxxxxxx: 10,"memory":300,"workingDirectory": "/opt/Directoryname","essential": true,"environment": [{"name": "NODE_ENV","value": "DEVELOPMENT"}],"portMappings": [ {"hostPort": 3001,"containerPort": 3001,"protocol": "tcp" } ],"command": ["node","bin/www"]}]" --network-mode "bridge" The above following are the build jobs. Deploy jobs: We have to deploy the containers in two servers in three different environments(Dev,staging,Prod). The tasks description in the bamboo deploy jobs:
|
No comments:
Post a Comment