Context:
We are currently in the process of migrating our Bamboo server hosted on CentOS 6.10 to RHEL 8.9. Our current Bamboo version is v7.0.4. We want to upgrade it to v9.2.6 or a later LTS version after migrating our server. Both the database and the app live within the same server. After migration, we will like to have a separate database server. Also, Bamboo is connected to other Atlassian products like Bitbucket and Jira (uses Jira authentication as well).
We referred to the following Atlassian documents:
Moving Bamboo Between Machines document recommends to use the UI utility tool to export the Bamboo instance to the new server. However, upon trying that approach, it took too long and we can't afford to have our Bamboo instance unavailable for that long.
Our Approach:
By referring to Cloning Bamboo Instance :
In order to test the migration and upgrades, we decided to clone our existing Bamboo instance (prod) and use it as a test instance. We will then try to migrate this test instance to a different server in order to test the migration.
In order to stand the test instance in the cloned server we did the following:
- Cloned our existing Bamboo server (prod).
- Modified the following bamboo.cfg.xml fields within the clone:
- "bamboo.jms.broker.client.uri" to point to cloned server
- "license.string" to our development license
NOTE:
- We tried to modify the "serverKey" property as well but then we ran into errors with regards to decryption of certain things in the database (mismatch of encryption/decryption).
- We didn't change the database connection string because we cloned the server so the existing bamboo database was also cloned (therefore, we still use localhost).
- Modified the following administration.xml fields within the clone:
- "myBaseUrl" to point to cloned server
- "myInstanceName" to "Cloned Bamboo Server"
- Start the service in from the installation directory: start-bamboo.sh (within the clone).
- Immediately configured app links to point to our test Bitbucket/Jira instances (including crowd server).
Once we successfully stand up the cloned instance (still a CentOS server), we will look to migrate it over to a new RHEL 8 server by using rsync to copy both the installation directory and the bamboo-home directory.
When migrating the database to a database server we will use pg_dump utility to export our test Bamboo database (from the cloned server) to the new database server.
We will then start up the Bamboo service in the new RHEL 8 server. If all works at this point, then we expect to have successfully migrated the Bamboo server. We will then perform upgrades as suggested in https://confluence.atlassian.com/bamboo/bamboo-upgrade-guide-720411366.html.
Problems:
- When we initially started the service in the cloned instance, Bamboo was connected to our production Bitbucket service, and so it caused some issues where PR builds were getting sent to the cloned Bamboo service (causing hanging builds). In the Cloning Bamboo Instance document, there is no note of this potential issue and how to avoid it.
- We were able to register a Bamboo agent to in our cloned Bamboo service. However, it seems like auto-trigger is not working. We expect it to auto-trigger upon PR creation. We checked/noted the following things:
- We checked the health of our linked repositories by going to Admin Setting > System Information > Linked Bitbucket Server instances and it was green (connected properly).
- We noticed that the branch was getting created within the plan however, no build is getting queued for that branch when PR was created.
- We looked at the following thread: https://community.atlassian.com/t5/Bamboo-questions/Bamboo-not-triggering-build-for-branches-when-code-is-pushed-to/qaq-p/1164364 but couldn't find anything in the log.
- In atlassian-bamboo.log, we notice that there are still references to the old ssh Bitbucket url.
- We couldn't find anything in particular within the atlassian-bamboo.log that would suggest a root cause of the issue.
- We made sure that the files within bamboo-home directory are all owned by the root user.
Questions:
- Is our approach correct? Or is there a better way?
- We are currently stuck at the part where we are trying to stand up the test Bamboo instance (after cloning existing Bamboo server) due to auto-trigger being broken. Is there a way solve this issue so that we can proceed with migrating the test instance to a new server?
- If possible, can someone from Atlassian provide clear steps to successfully migrating Bamboo server (like how there are clear steps when migrating Migrating Bitbucket Server)? Kind of getting confused since we are facing issues with auto-triggering of builds (this is just 1 of the issues, there could be several other issues).