How to Install and Configure Bamboo in Ubuntu

(Last Updated On: February 18, 2020)

Install and configure Bamboo in Ubuntu 16.04

 

 

                        This article will surely provide you all the information about how to install and configure bamboo on ubuntu server. Along with bamboo, you need to install some of the other Atlassian product like Bitbucket and Jira software for making your code deployment experience a lot smoother.

 

What is Atlassian Bamboo?

Ans:  Bamboo is a continuous integration and continuous deployment server developed by Atlassian. It provides an automated and reliable build and test process for software source-codes. Install and configure Bamboo with these easy and simple steps defined in this article.

What is Continuous Integration?

Ans:  It is a software engineering practice of integrating all the changes that are made to the project and then testing them accordingly on a daily basis or more frequently.

The main goal of Continuous Integration is to provide rapid feedback. Suppose there are any changes made to the codes by nay of the developer and somehow that is a wrong one or a defective one, then it can be found and corrected as soon as possible with Continuous Integration.

 

What are the products available with Atlassian?

Ans: Currently there are 19 Atlassian products available in the market.

  • JIRA
  • Trello
  • Confluence
  • HipChat
  • Bitbucket
  • JIRA Service Desk
  • SourceTree
  • Bamboo
  • Trello Bot
  • Stride
  • Jira Cloud Bot
  • Atlassian Crowd
  • FishEye
  • Crucible
  • Trello for G Suite
  • Jitsi
  • Clover
  • Statuspage
  • AppFuse

 

 

Continuous delivery, from code to deployment.

( Build >> Test >> Deploy >> Connect )

 

               Installing and configuring Bamboo in Ubuntu:

 

Requirement:

  • Java OpenJDK-8-JDK
  • Bamboo install Package

 

Installation:

  • Check the Java version:
# java -version

 

  • Install Java: 
#  apt-get install software-properties-common
#  add-apt-repository ppa:openjdk-r/ppa
#  apt-get update
#  apt-get install openjdk-8-jdk

 

  • Download and Configure Bamboo:
#  cd /opt 
#  wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-6.8.0.tar.gz
#  tar -xvf atlassian-bamboo-6.8.0.tar.gz
#  mv atlassian-bamboo-6.8.0 bamboo
#  cd /opt/bamboo/
#  ls -l

Output:
total 160
drwxr-xr-x 14 bamboo bamboo  4096 Jan 30  2019 ./
drwxr-xr-x  3 root   root    4096 Sep  4 20:36 ../
drwxr-xr-x 39 root   root    4096 Jan 30  2019 atlassian-bamboo/
-rwxr-xr-x  1 root   root    1375 Jan 30  2019 bamboo.sh*
drwxr-xr-x  2 root   root    4096 Jan 30  2019 bin/
-rw-r--r--  1 root   root   20106 Jan 30  2019 BUILDING.txt
drwxr-xr-x  2 root   root    4096 Jan 30  2019 conf/
-rw-r--r--  1 root   root    6237 Jan 30  2019 CONTRIBUTING.md
drwxr-xr-x  2 root   root    4096 Jan 30  2019 lib/
drwxr-xr-x  2 root   root   61440 Jan 30  2019 licenses/
drwxr-xr-x  2 root   root    4096 Jan 30  2019 logs/
-rw-r--r--  1 root   root    1777 Jan 30  2019 NOTICE
-rw-r--r--  1 root   root    3775 Jan 30  2019 README.html
-rw-r--r--  1 root   root    3334 Jan 30  2019 README.md
-rw-r--r--  1 root   root    2026 Jan 30  2019 README.txt
drwxr-xr-x  6 root   root    4096 Jan 30  2019 scripts/
drwxr-xr-x  2 root   root    4096 Jan 30  2019 temp/
drwxr-xr-x  2 root   root    4096 Jan 30  2019 tomcat-docs/
drwxr-xr-x  4 root   root    4096 Jan 30  2019 tools/
drwxr-xr-x  2 root   root    4096 Jan 30  2019 webapps/
drwxr-xr-x  2 root   root    4096 Jan 30  2019 work/

Now set the bamboo home environment by editing bamboo-init.properties. It can be done from the bamboo installation directory.

 

#  vim /opt/bamboo/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties
    #bamboo.home=C:/bamboo/bamboo-home

 

Uncomment and set the below path as bamboo home:

bamboo.home=/home/bamboo/bamboo-home

save and exit (: wq)

 

#  mkdir -p /home/bamboo/bamboo-home

This is the home directory of bamboo, not the installation directory. So you must not confuse it. Now create a user who can run bamboo as a service.

#  useradd -s /bin/bash bamboo
#  chown bamboo: /opt/bamboo

 

Now create bamboo.service file under /etc/systemd/system/

# vim /etc/systemd/system/bamboo.service
[Unit]
Description = Atlassian Bamboo
After = syslog.target network.target

[Service]
Type = forking
User = bamboo
ExecStart = /opt/bamboo/bin/start-bamboo.sh
ExecStop = /opt/bamboo/bin/stop-bamboo.sh
SuccessExitStatus = 143

[Install]
WantedBy = multi-user.target

Now  enable the bamboo service

#  systemctl enable bamboo.service

output:
Created symlink from /etc/systemd/system/multi-user.target.wants/bamboo.service to /etc/systemd/system/bamboo.service.

Check if the is set to start at boot time,

# if [ -f /etc/systemd/system/*.wants/bamboo.service ]; then echo "On"; else echo "Off"; fi
On

To run bamboo as service & auto-start with system boot follow the steps given below :

# vim /etc/init.d/bamboo

(copy and paste the below script)

#!/bin/sh
set -e

#### VARIABLES ####

# Name of app ( bamboo, Confluence, etc )
APP=bamboo
# Name of the user to run as
USER=bamboo
# Location of application's bin directory
BASE=/opt/bamboo

case "$1" in
  # Start command
  start)
    echo "Starting $APP"
    /bin/su - $USER -c "export BAMBOO_HOME=${BAMBOO_HOME}; $BASE/bin/startup.sh &> /dev/null"
    ;;
  # Stop command
  stop)
    echo "Stopping $APP"
    /bin/su - $USER -c "$BASE/bin/shutdown.sh &> /dev/null"
    echo "$APP stopped successfully"
    ;;
   # Restart command
   restart)
        $0 stop
        sleep 5
        $0 start
        ;;
  *)
    echo "Usage: /etc/init.d/$APP {start|restart|stop}"
    exit 1
    ;;
esac
exit 0



save and exit (:wq)

# chmod 755 /etc/init.d/bamboo

 

  • Set Bamboo service in Startup:

# update-rc.d bamboo defaults

Adding system startup for /etc/init.d/bamboo …

/etc/rc0.d/K20bamboo -> ../init.d/bamboo

/etc/rc1.d/K20bamboo -> ../init.d/bamboo

/etc/rc6.d/K20bamboo -> ../init.d/bamboo

/etc/rc2.d/S20bamboo -> ../init.d/bamboo

/etc/rc3.d/S20bamboo -> ../init.d/bamboo

/etc/rc4.d/S20bamboo -> ../init.d/bamboo

/etc/rc5.d/S20bamboo -> ../init.d/bamboo

 

  • Now to Start the Bamboo service:

# service bamboo start   (if not started, try executing the /opt/bamboo/bin/start-bamboo.sh file manually)

# service bamboo stop

# service bamboo restart

To change port:

# vi /opt/bamboo/conf/server.xml

Change port “8085” to “80”

Save and exit (:wq)

# service bamboo restart

http://ip_address

Now you can create an administrator user to manage the application which is the final installation step.

 

Installation of Bamboo:

  • Enter the License Key
  • Choose Express Installation
  • Fill up the required field

*Note: You need a  valid license for the Bamboo installation from their store.

 

After you have finished configuring bamboo, you can now try to install Bitbucket and Jira software along with it.

So lets set up Bitbucket and Jira:

 

Install and configure Jira in Ubuntu:                           

  • Download and Install Jira:

 

# wget https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-7.1.0-jira-7.1.0-x64.bin

# ./ atlassian-jira-software-7.1.0-jira-7.1.0-x64.bin

  • Access it from the browser,

http://ip_address:8080

Install and configure Bitbucket in Ubuntu:

 

  •  Download bitbucket:

# wget https://downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-4.3.2-x64.bin

 

  • Before Executing bitbucket install git:

# apt-get install git

Destination Directory: /opt/atlassian/bitbucket

Default location of plugin and other data: /var/atlassian/application-data/bitbucket

NOTE: For external database need connector.

 

  • Download the JDBC Connector.

# tar -xvf mysql-connector-java-5.1.38.tar.gz

# cd mysql-connector-java-5.1.38

# cp mysql-connector-java-5.1.38-bin.jar /opt/atlassian/bitbucket/lib

# chown atlbitbucket:atlbitbucket mysql-connector-java-5.1.38-bin.jar

Now Stop and Start the Bitbucket Service:

# service atlbitbucket stop

# service atlbitbucket start

 

  • Access it from the browser:

http://ip_address:7990

 

Fill up the required field and select Integrate with Jira.

After that provide Jira URL connection with port and username with a password and select connect.

 

Install and configure Bamboo

  • To Link Repository From Bitbucket to Bamboo : 

=> Select Linked Repository   => Select Add Repository =>

 

Install and configure Bamboo

Install and configure Bamboo

 

  • To Configure Application Links:

Go to  settings => Insert the URL for the Application want to link =>  Create new Link

 

Install and configure Bamboo

 

So, this is how you can set up a bamboo server on ubuntu server distribution with Jira and Bitbucket/Stash. If you have any query feel free to comment below.

 

 

Conclusion

 

So, guys, I have tried my best to simplify things so that you can have a better understanding and user experience. Now it’s your turn to pay me back.

Now I am expecting your responses. If you like this content or even dislike,  just leave a comment. Your responses will motivate me to do better and deliver better. I will try my best to enrich my skill.

So thank you guys, Have a good day.

Rate this content
Sending
User Review
4.43 (7 votes)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ad Blocker Detected

Ad Blocker Detected, please disable it to help this page in many ways. Thank you so much.

Refresh