Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,311
Community Members
 
Community Events
176
Community Groups

Pipe fails on the aws side during various events – DownloadBundle, ApplicationStop, AfterBlockTraffi

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

 

 

 

 

 

 

 

 

2 answers

For me, I had to restart the codedeploy agent (on the original EC2) for the BeforeBlockTraffic issue.  

0 votes

@Trip thanks for the question!

I think that the problem is not that deployment-instructions file do not exist, that note is put in another type error's subsection.

But what you initially referred to is right: you have the subsection in Troubletshoot guide called

Troubleshooting all lifecycle events skipped errors

There you can see exactly your error: 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

 

However, except of that code-deploy agent is running, other checks explained by this aws guide (linked by you) can be made:

- Your instance might not be able to reach the CodeDeploy or S3 public endpoint using port 443.

- check if service role has required permissions

and other actions that are described there.

 

Right now, we do not have a lot of information about your AWS Code deploy setup and your ec2 instance.

If you could share the pipeline log, it would be great, so we can ensure that nothing wrong happend inside our pipeline and this is AWS side and setup for AWS ec2-instance should be rechecked (I suspect if you finish following this troubleshooting guide, you can find the root cause).

However, if during communication we understand, that something is wrong in AWS code deploy pipe, we will fix it. But let's first communicate to understand your root cause.

 

Regards, Galyna

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events