Bamboo Cloud mount EBS volume in SSD?

I specified a EBS snapshot ID in my elastic instance configuration page.

The snapshot contains atlas-sdk, pre-populated maven local repo and some other build tools I use.

I am hopping it will improve my build time, but turns out the volume bamboo created is always magnetic volume.

And I didn't find any options to specify a SSD volume.

Now my local build only take 1.5 min on desktop with SSD, the bamboo jobs actually takes 7 mins each, and I have many of those jobs!

 

Going through the bootstrap scripts on the image, it looks like hardcoded to use magnetic volume.

Anyone run into same problem, anyone managed to use SSD volume without copy and hack stock image?

 

I have tried to use instance startup script to overwrite the bootstrap script, but guess what, the bootstrap script runs first!

2 answers

1 accepted

This widget could not be displayed.

Finally get around to try this, following Przemek's suggestion, I have managed to use mount pre-populated EBS in SSD for elastic bamboo build. below are the steps if anyone is interested.

  1. config your EBS block follow Atlassian document: https://confluence.atlassian.com/bamboo/configuring-elastic-instances-to-use-the-ebs-289277121.html
  2. Un-select Automatically mount EBS check box in your Elastic image configuration page
  3. add script below to the end of your instance start up script, replace snapshot id, region, zone, aws key and aws secrete with your own

    mkdir /mnt/bamboo-ebs
    chown bamboo:bamboo -R /mnt/bamboo-ebs
    export EBS_VOLUME=$(/usr/bin/ec2-create-volume --snapshot snap-e80c56c2 -size 100 --availability-zone eu-west-1a --type gp2 --region eu-west-1 -O "KEY" -W "SECRETE"|cut -c8-19)
    export INSTANCE_ID=$(wget -q -O - http://instance-data/latest/meta-data/instance-id)
    sleep 30
    /usr/bin/ec2-attach-volume ${EBS_VOLUME} -i ${INSTANCE_ID} -d /dev/sdf --region eu-west-1  -O "KEY" -W "SECRETE"
    sleep 30
    /usr/bin/ec2-modify-instance-attribute ${INSTANCE_ID} -b /dev/sdf=${EBS_VOLUME}:true --region eu-west-1  -O "KEY" -W "SECRETE"
    mount /dev/xvdf /mnt/bamboo-ebs
    sleep 10
    chown bamboo:bamboo -R /mnt/bamboo-ebs
    su - bamboo -c "/mnt/bamboo-ebs/bin/customiseInstance.sh"

 

This widget could not be displayed.

You should be able to create, attach and mount a volume on your own through the instance setup script.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 6 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

38 views 0 8
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you