Upgrading Bamboo 5.0 - 5.13 to latest on Linux

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

This article provides an outline of the upgrade process for Bamboo Server 5.0+ to a recent version. For generic upgrade documentation, see Bamboo upgrade guide

Environment used in this document

Current Versionターゲット バージョン
  • Bamboo Server 5.9.7
  • Bamboo Server 6.8.0

For this example, we'll be upgrading to Bamboo 6.8.0. At the time of writing this document, the same procedure can be applied to all recent versions of Bamboo.

Prerequisites

  • Double check if your environment meets the supported platforms requirements for Bamboo 6.8.0: 

Checklist:

Java
  • JDK 1.8
データベース
  • MySQL 5.6.3 - 5.7
  • PostgreSQL 9.4 - 10
  • SQL Server 2012 - 2016
  • Oracle 12c
VCS
  • 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:


バックアップ

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 service

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 in 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 command to double check if Bamboo service is not running anymore:

i.e

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 --color=auto java

Bamboo process should not be listed at the command output.

Step 2 - Download Bamboo 5.14

You can use wget to download Bamboo binaries:

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

After the download finishes, you should see something similar to this:

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

Step 3 - Extract Bamboo files

Rename Bamboo 5.9.7 installation folder:

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

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

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

Expected results:

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

Step 4 - Copy the configurations from Bamboo 5.9.7

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 new new installation folder:

/install_5.9.7/bin/setenv.bat

Common personalisations made to this file are:

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"

#

Heap memory 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"

#
/install_5.9.7/bin/server.xml

This file contains the configuration for the ports where Bamboo service will be listening including ssl, reverse proxy configuration and so on.

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

This file contains the the location of the bamboo-home directory:

bamboo@bamboo-VM:~/install_5.9.7/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-5.14.4.1.tar.gz  bamboo-home  install  install_5.9.7
bamboo@bamboo-VM:~$ cp install_5.9.7/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties install/atlassian-bamboo/WEB-INF/classes/
bamboo@bamboo-VM:~$ 

Step 5 - Start Bamboo 5.14

Start Bamboo 5.14 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/logs/catalina.out

Bamboo Server Edition
   Version : 5.14.4.1
                  

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.

Wait a little bit for the upgrade process finish, access Bamboo 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.

Step 6 - Stop Bamboo 5.14

Let's Stop Bamboo 5.14 so we can proceed with the upgrade.

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 command to double check if Bamboo service is not running anymore:

i.e

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 --color=auto java

Bamboo process should not be listed at the command output.

Step 7 - Download Bamboo 6.5

You can use wget to download Bamboo binaries:

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

After the download finishes, you should see something similar to this:

bamboo@bamboo-VM:~$ ls
atlassian-bamboo-6.5.1.tar.gz  bamboo-home  install

Step 8 - Extract Bamboo files

Rename Bamboo 5.14 installation folder:

bamboo@bamboo-VM:~$ mv install/ install_5.14/
bamboo@bamboo-VM:~$ ls
atlassian-bamboo-6.5.1.tar.gz  bamboo-home  install_5.9.7  install_5.14

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

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

Expected results:

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

Step 9 - Copy the configurations from Bamboo 5.14

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 new new installation folder:

/install_5.14/bin/setenv.bat

Common personalisations made to this file are:

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"

#

Heap memory 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"

#
/install_5.14/bin/server.xml

This file contains the configuration for the ports where Bamboo service will be listening including ssl, reverse proxy configuration and so on.

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

This file contains the the location of the bamboo-home directory:

bamboo@bamboo-VM:~/install_5.14/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-5.14.4.1.tar.gz  bamboo-home  install  install_5.9.7  install_5.14
bamboo@bamboo-VM:~$ cp install_5.14/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties install/atlassian-bamboo/WEB-INF/classes/
bamboo@bamboo-VM:~$ 

Step 10 - Start Bamboo 6.5

Start Bamboo 6.5.1 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/logs/catalina.out

Bamboo Server Edition
   Version : 6.5.1
                  

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.

Wait a little bit for the upgrade process finish, access Bamboo 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.

Step 11 - Stop Bamboo 6.5

Let's Stop Bamboo 6.5.1 so we can proceed with the upgrade.

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 command to double check if Bamboo service is not running anymore:

i.e

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 --color=auto java

Bamboo process should not be listed at the command output.

Step 12 - Download 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 to this:

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

Step 8 - Extract Bamboo 6.8.0 files

Rename Bamboo 6.5.1 installation folder:

bamboo@bamboo-VM:~$ mv install install_6.5.1
bamboo@bamboo-VM:~$ ls
atlassian-bamboo-5.14.4.1.tar.gz  atlassian-bamboo-6.8.0.tar.gz  atlassian-bamboo-6.5.1.tar.gz  bamboo-home  install_5.14  install_5.9.7  install_6.5.1

Create a new ~/install folder and extract the content of the .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 results:

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 9 - Copy the configurations from Bamboo 6.5

All personalisations made to the following files must be copied to the new new installation folder:

/install_6.5.1/bin/setenv.bat

Common personalisations made to this file are:

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"

#

Heap memory 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"

#
/install_6.5.1/bin/server.xml

This file contains the configuration for the ports where Bamboo service will be listening including ssl, reverse proxy configuration and so on.

/install_6.5.1/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties 

This file contains the the location of the bamboo-home directory:

bamboo@bamboo-VM:~/install_6.5.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-5.14.4.1.tar.gz  atlassian-bamboo-6.8.0.tar.gz  atlassian-bamboo-6.5.1.tar.gz  install  bamboo-home  install_5.14  install_5.9.7  install_6.5.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 10 - Start Bamboo 6.8.0

Start Bamboo 6.8.0 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.

If Bamboo is installed as a service, 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

Wait a little bit for the upgrade process finish, access Bamboo 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 the 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-5.14.4.1.tar.gz  atlassian-bamboo-6.8.0.tar.gz  atlassian-bamboo-6.5.1.tar.gz  install  bamboo-home  install_5.14  install_5.9.7  install_6.5.1
    bamboo@bamboo-VM:~$ rm -rf ./install_5.9.7/
    bamboo@bamboo-VM:~$ rm -rf ./install_5.14/
    bamboo@bamboo-VM:~$ rm -rf ./install_6.5.1/
    bamboo@bamboo-VM:~$ rm -rf ./atlassian-bamboo-5.14.4.1.tar.gz
    bamboo@bamboo-VM:~$ rm -rf ./atlassian-bamboo-6.5.1.tar.gz 
    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.

最終更新日 2019 年 11 月 27 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.