Pipe fails on the aws side during various events – DownloadBundle, ApplicationStop, AfterBlockTraffic, BeforeBlockTraffic
This is my first pipeline. See below see below for my pipeline and appspec. The error I see in the console is “The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.”
I was able to verify there is a healthy instance in the ASG. The ASG min = 1, desired = 1, max =2. I’m not sure how to verify if too many instances failed. The deployment group is set to replace all at once. I also added the IGNORE_APPLICATION_STOP_FAILURES: 'true' which got it further in the process. But the rest of those events failed.
I brought down the healthy instance to see if the auto scale group would stand up a new one and executed as expected.
In troubleshooting saw this link –
https://docs.aws.amazon.com/codedeploy/latest/userguide/troubleshooting-deployments.html#troubleshooting-deployments-lifecycle-event-failures
In says - On Amazon Linux, Ubuntu Server, and RHEL instances, this file must exist in /opt/codedeploy-agent/deployment-root/deployment-instructions.
When I ssh, I don’t see the deployment-root directory, but the agent is running. If it makes a difference the deployment has never been successful.
Any help/guidance is much appreciated.
Appspec – this is a Drupal 9 site and was never able too find an example
version: 0.2
os: linux
files:
- source: /
destination: /var/www/html/web/
Pipeline –
image: atlassian/default-image:2
pipelines:
branches:
feature/infastructure:
- step:
name: Zip the code
script:
- zip -r myApp.zip . -x *.git*
- pipe: atlassian/aws-code-deploy:0.4.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
LOCAL_PATH: $(pwd)
COMMAND: 'upload'
S3_BUCKET: 'ahrq-testing-s3/dev-builds'
APPLICATION_NAME: 'AHRQ-Testing'
DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP
ZIP_FILE: 'myApp.zip'
- pipe: atlassian/aws-code-deploy:0.4.0
variables:
AAWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-1'
LOCAL_PATH: $(pwd)
COMMAND: 'deploy'
S3_BUCKET: 'ahrq-testing-s3/dev-builds'
APPLICATION_NAME: 'AHRQ-Testing'
DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP
IGNORE_APPLICATION_STOP_FAILURES: 'true'
WAIT: 'false'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'
artifacts:
- myApp.zip