Upgrading single node Docker deployments
This topic provides the steps to upgrade a single node instance of Release using Docker.
- Make sure to read the documentation for upgrade and release notes for each version you want to upgrade to
- Stop the current running instances of the Docker container which have the old versions that need to be upgraded
- Start new Docker container with new tags which represents the version you want to upgrade to. Consider these points:
- Include all volumes already being used with old Docker images. In the case of the "conf" volume make sure also to update any configurations required by the new version "check release notes" before mounting it to new version of the container.
- Specify your database connection details to point to the old database, for example using environment variables such as
XL_DB_URL
- make sure to use
FORCE_UPGRADE
to be true in order to force upgrade by using flag-force-upgrades
Docker run
After stopping the old Release Docker container You can start the upgrade using a new version through tags in the docker run
command:
docker run -d \
-e FORCE_UPGRADE=true \
-p 5516:5516 \
-e XL_DB_URL="jdbc:postgresql://PsqlDbHost:5432/repo" \
-e XL_DB_USERNAME=postgres \
-e XL_DB_PASSWORD="password" \
-e XL_REPORT_DB_USERNAME=postgres \
-e XL_REPORT_DB_PASSWORD="password" \
-v ~/XebiaLabs/xl-release-server/conf:/opt/xebialabs/xl-release-server/conf \
-v ~/XebiaLabs/xl-release-server/hotfix/lib:/opt/xebialabs/xl-release-server/hotfix/lib
-v ~/XebiaLabs/xl-release-server/plugins:/opt/xebialabs/xl-release-server/plugins \
--name xl-release xebialabs/xl-release:9.5.2
This will start the Release container, print out the container ID and detect that there is old version of Release, then start the upgrade process, you can also find running containers using the docker ps
command.
You can stream the logs from the container using docker logs -f <container id>
.
Once the containers have started, you can access them at http://localhost:5516/
, you might want to wait for a minute for the service to be up and running.
Docker Compose
You can also use a Docker Compose file to run Release containers. See the following example:
version: "2"
services:
xl-release:
image: xebialabs/xl-release:24.3.0
container_name: xl-release
ports:
- "5516:5516"
volumes:
- ~/XebiaLabs/xl-release-server/conf:/opt/xebialabs/xl-release-server/conf
- ~/XebiaLabs/xl-release-server/hotfix/lib:/opt/xebialabs/xl-release-server/hotfix/lib
- ~/XebiaLabs/xl-release-server/hotfix/plugins:/opt/xebialabs/xl-release-server/hotfix/plugins
environment:
- FORCE_UPGRADE=true \
- XL_DB_URL="jdbc:postgresql://PsqlDbHost:5432/xl-release" \
- XL_DB_USERNAME=postgres \
- XL_DB_PASSWORD="password" \
- XL_REPORT_DB_USERNAME=postgres \
- XL_REPORT_DB_PASSWORD="password" \
Save the above content to a file named docker-compose.yml
in a folder and run docker-compose up -d
from the same folder. At startup, the process will detect that there is an older version of Release then start the upgrade process.
If you use a different file name, then run docker-compose -f <filename.yaml> up -d
Once the containers have started, you can access them at http://localhost:5516/
. You might want to wait for a minute for the service to be up and running.