This topic provides a guide for upgrading single-node Docker deployments.
If you want to upgrade a single node instance of Deploy using Docker, follow these steps:
- Make sure to read our docs for upgrade and release notes for each version you want to upgrade to.
- Stop the current running instances of the docker container having the old versions that need to be upgraded.
- Start a new docker container with a new tag which represents the version you want to upgrade to. Consider these points:
- Include all volumes already being used with old docker images. In case of "conf" volume, make sure to update any configurations required by new version "check release notes", before mounting it to new version of the container.
- Specify your DB connection details to point to the old DB for example using env 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
Upgrade Single node Deploy deployment
Docker run
After stopping the old Deploy docker container instance, you can start the upgrade process using a new version through a tag, with the docker run
command as follows:
docker run -d \
-e FORCE_UPGRADE=true \
-p 4516:4516 \
-e XL_DB_URL="jdbc:postgresql://PsqlDbHost:5432/repo" \
-e XL_DB_USERNAME=postgres \
-e XL_DB_PASSWORD="password" \
-v ~/XebiaLabs/xl-deploy-server/conf:/opt/xebialabs/xl-deploy-server/conf \
-v ~/XebiaLabs/xl-deploy-server/plugins:/opt/xebialabs/xl-deploy-server/plugins \
--name xl-deploy xebialabs/xl-deploy:9.5.1
This will start the Deploy container, print out the container ID and detect that if there is an older version of Deploy, and 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:4516/
, 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 XLD containers, see the below file for example:
version: "2"
services:
xl-deploy:
image: xebialabs/xl-deploy:10.2.0
container_name: xl-deploy
ports:
- "4516:4516"
volumes:
- ~/XebiaLabs/xl-deploy-server/conf:/opt/xebialabs/xl-deploy-server/conf
- ~/XebiaLabs/xl-deploy-server/hotfix/lib:/opt/xebialabs/xl-deploy-server/hotfix/lib
- ~/XebiaLabs/xl-deploy-server/hotfix/plugins:/opt/xebialabs/xl-deploy-server/hotfix/plugins
environment:
- FORCE_UPGRADE=true \
- XL_DB_URL="jdbc:postgresql://PsqlDbHost:5432/xl-deploy" \
- XL_DB_USERNAME=postgres \
- XL_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, it will detect that there is old version of Deploy then start upgrade.
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:4516/
, you might want to wait for a minute for the service to be up and running