Automated Bamboo server bamboo.cfg.xml configuration

I am working on modeling Bamboo Server in our "Cloud" network using Chef. What I'm looking for that I haven't been able to find is any documentation on if this is possible and if so what needs to be configured. By that I mean which xml files, (i.e., bamboo.cfg.xml). I have the installation automated and I have part of the configuration automated up until the point of the database choice. It seems with me changing the "setupStep" I can get to a certain point but I'm kind of stuck at this point in the configuration of the Bamboo Server. Any help you can give me is greatly appreciated.

8 answers

0 vote

If you have the installation automated, Bamboo should do the file handling for you.

Alternatively, you can install Bamboo on your machine, zip the installation directory, home directory, dump the database and use these 3 files to set up an empty Bamboo instance - without setup.

BTW: there are changes coming to setup in 5.0, so any automation is likely to break.

Hi Scott, I am working on a similar thing , can you share how are you achieving this using Chef.

What I finally ended up doing to get this working in Chef was to do a “standard” installation of Bamboo Server connecting up to an external Oracle database.  I did an export or dump of the Oracle database and saved it to a file called expbamboo.dat, for example…  I uploaded this expbamboo.dat into our repo for later use.  I then did my normal install recipe to lay the Bamboo Server binaries down on the filesystem and then in my instance recipe I did something like the following to import the .dat file once the Oracle database was up and running…

 

#!/bin/bash

cd <%= @downloads_dir %>

/<%= node['bamboo_server']['oracle_client_home'] %>/bin/imp system/<%= node['bamboo_server']['system_db_pass'] %>@<%= node['bamboo_server']['db_server_host'] %>:<%= node['bamboo_server']['oracle_port'] %>/<%= node['bamboo_server']['oracle_service_name'] %> file=/<%= @downloads_dir %>/expbamboo.dat log=/tmp/impbamboo.log full=Y

 

 

Just an FYI…  I wrote another cookbook for the complete Oracle installation/configuration J

 

Once you’re done importing the .dat file into your Oracle database you’re basically doing the other configuration type stuff laying down .xml, .properties, etc and then restarting the Bamboo Server.  The key was capturing the complete Bamboo Server install in that .dat file and then importing it.  In that .dat file it captures everything you do, admin password setup, config changes, etc, so once you’re done importing the .dat it looks and feels like a completed Bamboo Server.

 

 

So to understand this correctly , the .dat file contains all the info needed for Bamboo setup like Passwords , License info etc. And you have a .xml file that you does the Plan Creation and adding tasks for that Plan. Have you modified the bamboo.cfg.xml to include variables like bamboo.buildKey bamboo.planKey etc Thanks Scott , this is great info

That is exactly correct I modified or customized the bamboo.cfg.xml, checked that into our repo and variablized various values as you can see below:

 

?xml version="1.0" encoding="UTF-8"?>

<application-configuration>
  <setupStep>complete</setupStep>
  <setupType>custom</setupType>
  <buildNumber>3507</buildNumber>
  <properties>
    <property name="bamboo.artifacts.directory">${bambooHome}/artifacts</property>
    <property name="bamboo.config.directory">${bambooHome}/xml-data/configuration</property>
    <property name="bamboo.jms.broker.client.uri">failover:(tcp://<%= node['bamboo_server']['server_host'] %>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&amp;initialReconnectDelay=15000</property>
    <property name="bamboo.jms.broker.uri">tcp://<%= node['bamboo_server']['server_host'] %>:54663?wireFormat.maxInactivityDuration=300000</property>
    <property name="bamboo.project.directory">${bambooHome}/xml-data/builds</property>
    <property name="buildWorkingDir">${bambooHome}/xml-data/build-dir</property>
    <property name="daily.backup.dir">${bambooHome}/backups</property>
    <property name="hibernate.c3p0.acquire_increment">1</property>
    <property name="hibernate.c3p0.idle_test_period">100</property>
    <property name="hibernate.c3p0.max_size">100</property>
    <property name="hibernate.c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.min_size">0</property>
    <property name="hibernate.c3p0.timeout">30</property>
    <property name="hibernate.connection.SetBigStringTryClob">true</property>
    <property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
    <property name="hibernate.connection.password"><%= node['bamboo_server']['oracle_admin_db_pass'] %></property>
    <property name="hibernate.connection.url">jdbc:oracle:thin:@<%= node['bamboo_server']['db_server_host'] %>:<%= node['bamboo_server']['oracle_port'] %>:<%= node['bamboo_server']['oracle_sid'] %></property>
    <property name="hibernate.connection.username"><%= node['bamboo_server']['oracle_admin_db_user'] %></property>
    <property name="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
    <property name="hibernate.setup">true</property>
    <property name="license.string">BLAH</property>
    <property name="lucene.index.dir">${bambooHome}/index</property>
    <property name="serverId">BEAZ-1692-QLDZ-UFK4</property>
    <property name="webwork.multipart.saveDir">${bambooHome}/temp</property>
  </properties>
</application-configuration>

 

Thanks Scott i have done similar to this , except i tried including

?xml version="1.0" encoding="UTF-8"?>
<application-configuration>
<setupStep>complete</setupStep>
<setupType>custom</setupType>
<buildNumber>3507</buildNumber>
<planName>CHEF</planName>

<planKey>CHEF-JOB</planKey>

<properties>
<property name="bamboo.artifacts.directory">${bambooHome}/artifacts</property>
<property name="bamboo.config.directory">${bambooHome}/xml-data/configuration</property>
<property name="bamboo.jms.broker.client.uri">failover:(tcp://<%= node['bamboo_server']['server_host'] %>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&amp;initialReconnectDelay=15000</property>
<property name="bamboo.jms.broker.uri">tcp://<%= node['bamboo_server']['server_host'] %>:54663?wireFormat.maxInactivityDuration=300000</property>
<property name="bamboo.project.directory">${bambooHome}/xml-data/builds</property>
<property name="buildWorkingDir">${bambooHome}/xml-data/build-dir</property>
<property name="daily.backup.dir">${bambooHome}/backups</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">100</property>
<property name="hibernate.c3p0.max_size">100</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">0</property>
<property name="hibernate.c3p0.timeout">30</property>
<property name="hibernate.connection.SetBigStringTryClob">true</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name="hibernate.connection.password"><%= node['bamboo_server']['oracle_admin_db_pass'] %></property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@<%= node['bamboo_server']['db_server_host'] %>:<%= node['bamboo_server']['oracle_port'] %>:<%= node['bamboo_server']['oracle_sid'] %></property>
<property name="hibernate.connection.username"><%= node['bamboo_server']['oracle_admin_db_user'] %></property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.setup">true</property>
<property name="license.string">BLAH</property>
<property name="lucene.index.dir">${bambooHome}/index</property>
<property name="serverId">BEAZ-1692-QLDZ-UFK4</property>
<property name="webwork.multipart.saveDir">${bambooHome}/temp</property>
</properties>
</application-configuration>

 

When i tried restarting the bamboo server , it didnt work 

Yeah I was never able to get the key to work when I replaced it with a variable...  I could only hardcode it to get it to work...

HI I'm trying to install bamboo using shell script. I completed till installation part. I got struck into configuring license and external database setup. Is there any possible way to accomplish  this?

Please see my original response above. The only way I was able to successfully do a fully automated install of Bamboo Server was utilizing Chef cookbooks, recipes, etc.

Thanks Scott.. If you have any cookbook at chef market, Please share the URL. It will be helpful

 

Thanks  

0 vote
Omar Herrera Community Champion Jun 08, 2018

Hi @jagannathan now a days Ansible is the trend tool for achieve this as @Scott Burks said.

You can check some documentation and found a role that adapt to you on this role repository for bamboo installation.

Cheers.

Omar H.

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,806 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