Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automated Bamboo server bamboo.cfg.xml configuration

Scott Burks April 8, 2013

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 votes
Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 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.

0 votes
jagannathan June 7, 2018

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?

Scott Burks June 7, 2018

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.

jagannathan June 7, 2018

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

 

Thanks  

0 votes
Scott Burks March 9, 2015

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...

0 votes
Ramya Kailas March 9, 2015

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 

0 votes
Scott Burks March 9, 2015

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>

 

0 votes
Scott Burks March 9, 2015

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.

 

 

Ramya Kailas March 9, 2015

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

0 votes
Ramya Kailas March 9, 2015

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

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2013

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events