Upgrading multi-node Docker deployments

Follow these steps to Upgrade Deploy active-active cluster setup,

Steps

  1. Make sure to read our docs for upgrade and release notes for each version you want to upgrade to.
  2. Stop the current running instances of Deploy docker containers which have an older version that needs to be upgraded. You do not need to stop the load balancer, mq and database containers. See the example below:

    # Shutdown deployments
    docker-compose  -f docker-compose-xld-ha.yaml -f docker-compose-xld-ha-workers.yaml stop xl-deploy-master xl-deploy-worker
  3. Update both files docker-compose-xld-ha.yaml and docker-compose-xld-ha-workers.yaml
  4. Update the image with the new tag which represents the version you want to upgrade to, for both master and worker, for example:

    xl-deploy-master:
     image: xebialabs/xl-deploy:9.5.1
  5. Specify your DB connection details, to point to an old DB for both master and worker for example using environment variables such as XL_DB_URL
  6. Include all volumes already being used with old docker images for both master and worker. In case of “conf” volume, make sure to also update any configurations required by new version “check release notes”, before mounting it to new version of the container.
  7. Update the environment variables to include FORCE_UPGRADE for master nodes, see below,

    environment:
         - FORCE_UPGRADE=true
  8. You can use the run.sh script that is provided, to bring up the setup or perform it manually by following the steps mentioned below. Update the passwords to represent Passwords used in previous version.
# Set passwords
export XLD_ADMIN_PASS=admin
export RABBITMQ_PASS=admin
export POSTGRES_PASS=admin

# upgrade master nodes only. You should not change the number of master nodes here, it must be 2
docker-compose -f docker-compose-xld-ha.yaml up --scale xl-deploy-master=2 -d

# get the IP of master nodes, change the container names if you are not inside a folder named "xl-deploy-ha"
export XLD_MASTER_1=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-ha_xl-deploy-master_1)
export XLD_MASTER_2=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-ha_xl-deploy-master_2)

# Deploy the worker nodes, you can change the number of nodes here if you wish
docker-compose -f docker-compose-xld-ha-workers.yaml up --scale xl-deploy-worker=2 -d

# Print out the status
docker-compose -f docker-compose-xld-ha.yaml -f docker-compose-xld-ha-workers.yaml ps
  1. You can view the logs of individual containers using the docker logs <container_name> -f command.
  2. You can access Deploy UI at http://localhost:8080