[Bamboo Knowledge Base]
This page is intended to complement the instructions for Configuring elastic instances to use the EBS. It lists different methods of for populating your EBS volume, depending on the data you wish to have available in your snapshot.
On this page:
Related pages:
You can upload Maven 2 repository data to your EBS volume, so that it does not have to be downloaded every time an elastic agent (running on an instance which uses the EBS volume) is started.
To populate your EBS snapshot with your Maven repository data, we recommend that you upload it via SCP (see step 5c of the 'Creating your first EBS snapshot' section in Configuring elastic instances to use the EBS). In most cases, you will have a modified settings.xml
file if you are using Maven 2. This means that you will need to upload this file and Maven repository data to your EBS volume, rather than populating your volume by running a build.
You can upload Ant repository data to your EBS volume, so that it does not have to be downloaded every time an elastic agent (running on an instance which uses the EBS volume) is started.
To populate your EBS snapshot with your Ant repository data, we recommend that you run a build on an elastic agent with a blank EBS volume attached to the elastic instance (see step 2 of the 'Updating your EBS snapshot' section in Configuring elastic instances to use the EBS). This is a faster and more reliable method of populating your volume, if you are using Ant.
You can upload scripts to your EBS volume so that the elastic agent started on any elastic instances which use this EBS volume, will have PostgreSQL automatically installed.
These elastic instances must be started from an elastic image which is associated with an EBS snapshot derived from this EBS volume.
To set up the automatic installation of PostgreSQL on your EBS volume for elastic agents, you will need to create the following script:
setupPostgreSQL.sh
#!/bin/sh yum install -y postgresql-server service postgresql initdb cat > /var/lib/pgsql/data/pg_hba.conf << EOF local all all trust host all all 127.0.0.1/32 trust EOF /etc/init.d/postgresql start
This script uses the package management tools provided by Fedora to install and configure PostgreSQL on the agent when its started.
You then need to update the customise-extras.sh
file on your EBS volume (see Important EBS Directories and Files) to invoke this script.
Finally, you need to add a custom capability (e.g. postgres=true
) to the elastic agents with PostgreSQL installed. You can do this by updating the elastic image configuration that the agents inherit their capabilities from. Read Configuring elastic agent capabilities for detailed instructions.
You can upload scripts to your EBS volume so that the elastic agent started on any elastic instances which use the EBS volume, will be able to run Selenium tests.
These elastic instances must be started from an elastic image which is associated with an EBS snapshot derived from this EBS volume.
To set up elastic agents to support Selenium test, you will need to create the following script:
setupSelenium.sh
#!/bin/sh centosMajorVersion=5 centosVersion=${centosMajorVersion} cat >/etc/yum.repos.d/centos-$centosVersion.repo <<EOF [centos-base] name=CentOS - Base mirrorlist=http://mirrorlist.centos.org/?release=${centosVersion}&arch=\$basearch&repo=os gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-${centosMajorVersion} enabled=0 [centos-update] name=CentOS - Updates mirrorlist=http://mirrorlist.centos.org/?release=${centosVersion}&arch=\$basearch&repo=updates gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-${centosMajorVersion} enabled=0 EOF yum -y --enablerepo=centos-base install firefox yum -y install xorg-x11-server-Xvfb xterm xorg-x11-server-utils xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-Type1 /usr/bin/killall Xvfb #Start virtual screen Xvfb :100 -ac -screen 0 1024x768x24 &
This script uses the package management tools provided by Fedora to install Mozilla's Firefox and enough of X to get a VNC (Virtual Network Computing) server running.
vnc-server
— the vnc server used by the selenium test server.xorg-x11-server-Xvfb xterm xorg-x11-server-utils twm xorg-x11-fonts-
— these packages cover the xorg dependencies to get Firefox to run.vncpasswd
— this is the password file used by the VNC server (copied to /home/bamboo/.vnc/passwd
)vncxstartup
— this is the script executed by the VNC server when a connection is made (copied to /home/bamboo/.vnc/xstartup
)/opt/firefox
(we manually install Firefox because the package that would be installed by the Fedora 8 package management appears to be outdated)..bashrc
file is customised to include the Firefox directory when searching for libraries. This is so Firefox will be able to find its libraries.You then need to update the customise-extras.sh
file on your EBS volume (see Important EBS Directories and Files) to invoke this script.
Finally, you need to add a custom capability (e.g. selenium=true
) to the elastic agents with PostgreSQL installed. You can do this by updating the elastic image configuration that the agents inherit their capabilities from. Read Configuring elastic agent capabilities for detailed instructions.