How to: Install Bamboo add-ons without using the UI
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
Summary
In some scenarios like when using automation tools, it might be required to install add-ons to Bamboo without using the UI.
Environment
Any Bamboo release
Solution
Manual install - requires downtime
To install a plugin in Bamboo without using the UI you just need to follow the steps below:
- Shut down Bamboo.
- Copy the plugin .jar file into:
- Bamboo 7 and earlier: <bamboo-home>/plugins
- Bamboo 8 and later: <bamboo-home>/shared/plugins (or the equivalent shared folder if running on a cluster)
- Make sure to set the file ownership and permissions to match the Bamboo service user
- Start-up Bamboo.
Some Apps are provided in OSGi Bundle Repository (OBR) file format due to dependencies. If that's your case, please unzip the ".obr" file – you may have to rename its extension to ".zip" first – and copy any resulting .jar files to the Bamboo plugins folder, including the ones located in the OBR's /dependencies folder
Semi-automated via a Script - no downtime
This solution will require you to copy the .jar or .obr file to the Server or any host that can reach the Bamboo Server and run a script that will push the App:
- Download the .jar or .obr file to a temporary location
- Create and run the following script. You will have to modify the URL, credentials and the APP_FILE_PATH for it to work:
#!/bin/bash # # Install an App in Bamboo via a script # This script requires curl and jq to work # BAMBOO_URL=https://bamboo.mydomain.net BAMBOO_CONTEXT_PATH=/ BAMBOO_BASE_URL=$BAMBOO_URL$BAMBOO_CONTEXT_PATH ADMIN_USER=admin ADMIN_PASS=adminpass # It can also be an .obr file APP_FILE_PATH=./plugin-file-to-be-installed.jar UPM_TOKEN=$(curl -k -I --user $ADMIN_USER:$ADMIN_PASS -H 'Accept: application/vnd.atl.plugins.installed+json' "${BAMBOO_BASE_URL}rest/plugins/1.0/?os_authType=basic" 2>/dev/null | grep 'upm-token' | cut -d " " -f 2 | tr -d '\r') curl --user ${ADMIN_USER}:${ADMIN_PASS} -k -H 'Accept: application/json' "${BAMBOO_BASE_URL}rest/plugins/1.0/?token=${UPM_TOKEN}" --compressed -F plugin=@${APP_FILE_PATH} 2>/dev/null | jq -r
For those apps that require a license, you will have to manually insert the license using the Bamboo UI.