Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Trip I'm New Here Apr 13, 2021

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

 

 

 

 

 

 

 

 

1 answer

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
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

855 views 16 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you