Section | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Elastic Bamboo
...
- Log onto the currently running elastic instance (or spawn one if none are running). http://confluence.atlassian.com/display/BAMBOO/Accessing+an+Elastic+Instance
- Note that the ssh key is on
belltown:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/elasticbamboo.pk
- Note that if you want to log onto the AWS console, Mike's username and password is on
belltown:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/Mike'sPassword
- Note that the ssh key is on
- From the shell try out the commands you want to run at boot time
- Run you build and make sure it works
- Check your changes to customize-extras.sh into source control PLFM/trunk/tools/bamboo/bin/customise-extras.sh
- On the bamboo host, overwrite
/mnt/bamboo-ebs/bin/customise-extras.sh
with your updated script. - Follow these instructions to create snapshot and configure bamboo to use it:
- Clean off any build artifacts
/mnt/bamboo-ebs/bin/mysql -u root -p drop database test2bambooa; create database test2bambooa
rm -rf /mnt/bamboo-ebs/bamboo-agent/build-dir/PLFM-TRUNK-???JOB1
- Stop Shutdown MySQL
/mnt/bamboo-ebs/bin/mysqladmin -u root -p stopshutdown
- Do this stuff Updating your EBS snapshot to create the snapshot
- Clean off any build artifacts
- Shutdown the host, and kick off a new build. This should start a new bamboo host that will run your updated script.
- Make sure the build passes!
Installing custom MySQL, R, Python, and dependencies
Mysql, R, and Python are all binary builds which reside in the /mnt/bamboo-ebs structure. The primary binaries for all reside in /mnt/bamboo-ebs/bin/. In order to access these builds, you need to have the following in your environment:
Code Block |
---|
PATH=/mnt/bamboo-ebs/bin:$PATH LD_LIBRARY_PATH=/mnt/bamboo-ebs/lib:$LD_LIBRARY_PATH |
These environmental variables are inserted into the environment via the /mnt/bamboo-ebs/customize-extras.sh script which is run by the elastic bamboo system.
Mysql
Before installed mysql, the libaio package needs to be installed. Only a few files are needed to run mysql, however. So after installing via yum (yum install libaio), the following command can be used to move the files to their permanent home in /mnt/bamboo-ebs/lib/ (mv /usr/lib/libaio* /mnt/bamboo-ebs/lib/) to satisfy this dependency during future boots.
Mysql was upgraded using the binary distribution located here: http://dev.mysql.com/downloads/mysql/#downloads, listed as Linux - Generic 2.6 (x86, 32 bit), Compressed Tar Archive. This is untarred into /mnt/bamboo-ebs/. From with the resultant directory: /bin, /share/, and /lib should have their contents moved to the same locations in /mnt/bamboo-ebs/. The rest of the tar can be deleted. The bin/mysqld_safe file needs to be modified, having all occurances of the following paths replaced: /var/lib/mysql with /mnt/bamboo-ebs/data/ and /usr/bin with /mny/bamboo-ebs/bin. After this the customize-extras.sh script will be able to launch mysql on boot. In addition, the default databases need to be created using the mysql_install_db script, and the test2 database create as explained in how to modify the ebs snapshot above.
Python
Python requires gcc-c++ for a full compile. This is also required by R later on, but neither require any of the files installed to run. This can installed via yum (yum install gcc-c++).
...