How to configure Maven Repository with Bamboo onDemand

Dear Support

I am new to AWS and Bamboo, I have been advised at the London Atlassian Unite conference to post my question here.

Could you recommend the best way to configure Bambook on-Demand to work with a Maven 3 build?

Namely, how could I avoid repeat downloads of the maven 2 repository each time the Elastic Instance is restarted? (it download the repository to a local disk)

I would like to be able to switch off any elastic instance whenever there are no build to perform (cost saving).

Where should the M2 repository be located?

Should we be using a tailored AWS image with most m2 repository pre-downloaded/installed? How can I do this (precisely...)?

Could we mount a device on the instance to have that local repo?

Should we be running a Sonatype Nexus instance in another images? How to link them? or should it be on a tailored instance?

Any pointer, blog, article, manual, experience / help would be greatly appreciated

Thank you

Benoit

1 answer

1 vote

Namely, how could I avoid repeat downloads of the maven 2 repository each time the Elastic Instance is restarted? (it download the repository to a local disk)

You should store your preloaded repository on EBS and copy it to appropriate location during instance setup (or change the Maven repository location to EBS in repository.xml). You don't need to customise the base image for that, just use the stock one.

I would like to be able to switch off any elastic instance whenever there are no build to perform (cost saving).

Idle instances are automatically killed by Bamboo when the next paid hour approaches.

Where should the M2 repository be located?

The best way/fastest way is to keep it on the EBS. That's how we configure our instances at Atlassian.

Should we be using a tailored AWS image with most m2 repository pre-downloaded/installed? How can I do this (precisely...)?

The instructions for creating your EBS are here: http://confluence.atlassian.com/display/BAMBOO/Configuring+Elastic+Instances+to+use+the+EBS

Could we mount a device on the instance to have that local repo?

Yes, you can put any setup script you want on the EBS. The scripts are run as root so you can create/attach volumes and mount devices.

Should we be running a Sonatype Nexus instance in another images? How to link them? or should it be on a tailored instance?

You could run Nexus in the cloud, I guess. Linking: the address to Nexus would have to be kept on the EBS. If you're planning on having multiple instances running, you should have a dedicated instance for that. At Atlassian, we host our repository off-cloud, the cloud contains only the agents. Maven repo has to be available all the time, so it's not cost effective to keep it on the cloud, but it can be done. Agents, on the other hand, are needed only when there's something to build, so the amount of needed instances fluctuates throughout the day.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,585 views 0 6
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