Upgrading Bamboo 5.14 to latest on Linux

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

This article provides sketches the upgrade process for Bamboo Server 5.14 to a recent version. For generic upgrade documentation, see Bamboo upgrade guide

Environment used in this document

Current VersionDesired version
  • Bamboo Server 5.14.4.1
  • Bamboo Server 6.8.0

For this example we'll be upgrading to Bamboo 6.8 but the same procedure can be applied to all recent versions of Bamboo. Besides we upgrade from Bamboo 5.14.4.1 and it could be any version 5.14.x.

Prerequisites

Checklist:

Java
  • JDK 1.8
Database
  • MySQL 5.6.3 - 5.7
  • PostgreSQL 9.4 - 10
  • SQL Server 2012 - 2016
  • Oracle 12c
CVS
  • Git 1.8.1.5 and later
  • Mercurial 1.8 and later
  • Subversion 1.5 - 1.8

Pre-upgrade tasks

  • Make sure Bamboo is not running
  • Backup of the current environment
  • Make sure the JAVA_HOME variable is pointing to valid JDK 1.8 installation

Checklist:


Backups

Create backups for the following data:

  • Bamboo Database
  • bamboo-home directory
  • Bamboo installation directory
JAVA_HOME

Run the below commands in terminal:

  • echo $JAVA_HOME

The output should be something similar to this:

bamboo@bamboo-VM:/$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
  • java -version

The output should be something similar to this:

bamboo@bamboo-VM:/$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

Run the upgrade

Before starting the upgrade, please make sure to complete the previous steps (Prerequisites and Pre-upgrade tasks)


For this example, Bamboo is installed at the following paths:

bamboo-home → /home/bamboo/bamboo-home

<<Installation folder>> → /home/bamboo/install

Step 1 - Stop Bamboo 5.14.x running as a service or as a process


Use the appropriate command taking in consideration how the service was configured:

Systemd Service Configuration

bamboo@bamboo-VM:/$ systemctl stop bamboo

SysV Init Script

bamboo@bamboo-VM:/$ /etc/init.d/bamboo stop

  • Bamboo running as a Linux process, triggered from console:

Run the <<Installation folder>>/bin/stop-bamboo.sh script:

bamboo@bamboo-VM:/$ cd ~/install/bin/
bamboo@bamboo-VM:~/install/bin$ ./stop-bamboo.sh

You can use the PS (Process Status) command to double check if the Bamboo process is not running anymore, i.e as such:

bamboo@bamboo-VM:~/install/bin$ ps aux | grep java
bamboo   28538  0.0  0.0  21536  1068 pts/0    S+   18:08   0:00 grep java

No Bamboo process should be listed in the command output.

If so, you need to terminate it using its PID (Process ID, would be the second entry thus 28538 in the consule output from above)

kill -9 <PID>

Step 2 - Download your new Bamboo 6.8.0

You can use wget to download Bamboo binaries:

bamboo@bamboo-VM:~$ wget https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-6.8.0.tar.gz

After the download finishes, you should see something similar as below using ls (stands for list and it is POSIX standard):

bamboo@bamboo-VM:~$ ls
atlassian-bamboo-5.14.4.1.tar.gz  atlassian-bamboo-6.8.0.tar.gz  bamboo-home  install  install_5.9.7

Step 3 - Extract all Bamboo 6.8 files

Rename Bamboo 5.14.4.1 installation folder:

bamboo@bamboo-VM:~$ mv install install_5.14.4.1
bamboo@bamboo-VM:~$ ls
atlassian-bamboo-5.14.4.1.tar.gz  atlassian-bamboo-6.8.0.tar.gz  bamboo-home  install_5.14.4.1  install_5.9.7

Create a new ~/install folder and extract the content of the downloaded .tar.gz inside it:

bamboo@bamboo-VM:~$ mkdir install
bamboo@bamboo-VM:~$ tar -xf atlassian-bamboo-6.8.0.tar.gz --strip 1 -C ~/install

Expected result:

bamboo@bamboo-VM:~$ cd install
bamboo@bamboo-VM:~/install$ ls
atlassian-bamboo  BUILDING.txt     lib       NOTICE       README.txt  tomcat-docs  work
bamboo.sh         conf             licenses  README.html  scripts     tools
bin               CONTRIBUTING.md  logs      README.md    temp        webapps

Step 4 - Copy the configurations from Bamboo 5.14.4.1

While using Bamboo, you’ve probably added some custom modifications to Bamboo files. These may include connection details, settings related to memory allocation, or other JVM arguments. In this step, you need to re-apply the same modifications to the new files by copying them from your backups.

All customisations made to the following files must be copied to the same files in new new installation folder:

/install_5.14.4.1/bin/setenv.bat

Common personalisations made to this file are as follows.

Java arguments, i.e:

#
#  Occasionally Atlassian Support may recommend that you set some specific JVM arguments.  You can use this variable below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS:="-Dbamboo.ec2.agent.endpoint=http://localhost:8085-XX:UseG1GC"
#

Java heap size, i.e:

#
# The following 2 settings control the minimum and maximum given to the Bamboo Java virtual machine.  In larger Bamboo instances, the maximum amount will need to be increased.
#
JVM_MINIMUM_MEMORY="2048m"
JVM_MAXIMUM_MEMORY="2048m"
#

There can be more, depending on you configuration of Bamboo 5.14.4.1.

/install_5.14.4.1/bin/server.xml

This file contains the configuration for the ports on which Bamboo will listen, other than SSL, reverse Proxy configuration, etc. that shuld be used for your new Bamboo 6.8.0.

/install_5.14.4.1/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties 

This file contains the location of the bamboo-home directory for your new Bamboo version.

bamboo@bamboo-VM:~/install_5.14.4.1/atlassian-bamboo/WEB-INF/classes$ cat bamboo-init.properties 
## You can specify your bamboo.home property here or in your system environment variables.

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

It's safe to just copy the file over from the previous version:

bamboo@bamboo-VM:~$ ls
atlassian-bamboo-6.8.0.tar.gz  bamboo-home  install  install_5.14.4.1
bamboo@bamboo-VM:~$ cp install_5.14.4.1/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties install/atlassian-bamboo/WEB-INF/classes/
bamboo@bamboo-VM:~$ 

Step 5 - Start your new Bamboo 6.8

Start Bamboo 6.8.0 as a Linux process by executing the /install/bin/start-bamboo.sh file

bamboo@bamboo-VM:~/install$ ./bin/start-bamboo.sh

To run Bamboo in the foreground, start the server with start-bamboo.sh -fg

Server startup logs are located in /home/bamboo/install/bin/logs/catalina.out

Bamboo Server Edition
   Version : 6.8.0
                  
If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo

Using CATALINA_BASE:   /home/bamboo/install
Using CATALINA_HOME:   /home/bamboo/install
Using CATALINA_TMPDIR: /home/bamboo/install/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /home/bamboo/install/bin/bootstrap.jar:/home/bamboo/install/bin/tomcat-juli.jar
Tomcat started.

You may wish to start Bamboo as a Linux service. Then do the following.

You can start it using the appropriate command taking in consideration how the service was configured.

Systemd Service Configuration

bamboo@bamboo-VM:/$ systemctl start bamboo

SysV Init Script

bamboo@bamboo-VM:/$ /etc/init.d/bamboo start

Either way, your new Bamboo 6.8 should be launched as service now.


Wait a little bit for the upgrade process to finish, access Bamboo via http://<Your Bamboo URL or IP>:8085 in one of our supported  WEB browsers, find the Installation Wizzard starting and check if everything is working as expected. If Bamboo did not start, please review the prerequisites and make sure you followed all the steps correctly.

If the problem persists, you can also create a support ticket. To help us address the issue, attach the the content of the <<Installation folder>>/logs/ folder to the ticket.

Post-upgrade tasks

After you finish Bamboo upgrade:

  1. Make sure everything is working as expected
  2. Double check if your remote agents are back online
  3. Double check if the application links with other tools are working
  4. Remove the folders created during the upgrade process:

    bamboo@bamboo-VM:~$ ls
    atlassian-bamboo-6.8.0.tar.gz  bamboo-home  install_5.14.4.1  install
    bamboo@bamboo-VM:~$ rm -rf ./install_5.14.4.1/ 
    bamboo@bamboo-VM:~$ rm -rf ./atlassian-bamboo-6.8.0.tar.gz 
    bamboo@bamboo-VM:~$ ls
    bamboo-home  install

Recovery Plan:

If something wrong happened during the upgrade:

  1. Stop the application (Step 1)
  2. Restore the backups created during the pre-upgrade tasks
  3. Restore Bamboo Database

If you could't rollback the upgrade, please create a support ticket. To help us address the issue, attach the the content of the <<Installation folder>>/logs/ folder to the ticket.



Last modified on Jun 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.