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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,831
Community Members
 
Community Events
184
Community Groups

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

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  

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

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 

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>

 

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

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