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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Highlighted

how to assign Elastic IP'S parallel when we launch instances from AMI using start up script.

Hi Team,

How to assign Elastic IP'S parallel when we launch instances from AMI using start up script from bamboo.

Could you please suggest on it.

FYI : able to assign elastic ip's sequentially from start up script.

startup script:
========
echo "sleep for some time,Amazon enough time to associate the Elastic IP without interrupting any of the Bamboo processes"
sleep 90
echo "assign elastic Ip to ElasticAgent instance"
export AWS_ACCESS_KEY_ID="*****************
export AWS_SECRET_ACCESS_KEY=*****************
export AWS_DEFAULT_REGION=*******************
export instance_id=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/instance-id`
echo $instance_id
aws ec2 describe-addresses --query 'Addresses[?AssociationId==null]' > output.json
cat output.json
EIP=$(cat output.json | jq -r '.[0] | .PublicIp')

echo "EIP:$EIP"

if [ "$EIP" = "NULL" ]; then
echo "***Nothing to be assign to instance***"
else
echo "Assign unused ip to instance"
aws ec2 associate-address --instance-id $instance_id --public-ip $EIP
echo $?
fi

 

Note: I want 10 to 15 seconds instance launching delay to assign elastic IP'S.

   could you please suggest on how to customize above mentioned script or how to delay  instance launches from bamboo startup script or any configurations need to be change from AWS side.

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

165 views 2 5
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