Deployment upgrade for Docker Compose
Docker Compose should only be used to deploy DCT in an evaluation/testing capacity.
DCT versions 2.0.0 through 6.0.2 running on Docker Compose, that are being upgraded to DCT 7.0.0 or later, may experience potential failure to start post-upgrade, resulting in a "permission denied" error in the logs. Operations post-upgrade may also fail with internal errors.
The issue is due to the UID running the application containers changing from UID 1000 (in DCT 2.0.0 through 6.0.2) to UID 1010 (in DCT 7.0.0 and later). Resolving the issues requires the following one-time change and no container restart is required:
Change ownership of the volume associated to the gateway container to the new UID:
docker exec -u 0 -it <gateway-container-name> chown delphix:delphix /data
If bind mounts have been used to configure DCT, they must grant permission to the user with UID 1010 (GUID 1010) to read/write files, for example:
chown 1010:1010 /path/to/nginx/bind/mount
Starting from DCT 12.0.0 we have introduced one new service (container) named masking.
Memory and CPU requirement for this new container is 512Mi and 500m respectively.
This container creates a new volume mount masking-data
.
If you are using masking engines with self sign certificated and previously mounted the truststore to the gateway pod like:
volumes:
- gateway-data:/data
- /truststore/config/path/on/host:/etc/config/certs
Then please mount this old truststore to the masking service as well by keeping it in separate folder and uncomment below lined in docker-compose.yaml masking service section:
volumes:
- masking-data:/data
- /truststore/config/path/on/host:/etc/config/certs
Introduction
This article describes the procedure to upgrade the DCT version without losing any data. Docker Compose uses the concept of ‘project’ to create unique identifiers for all of a project’s containers and other resources (like volumes, etc.).
Get the current project name and note it down using the following command:
The volume name would be of the format {project-name}_gateway-data and {project-name}_gwdatabase-data. In the below example, the project name is delphix-dct.
docker volume ls
DRIVER VOLUME NAME
local delphix-dct_gateway-data
local delphix-dct_gwdatabase-data
local delphix-dct_masking-data
Bring down DCT services using the following command:
docker compose down
Refer to the Installation and Setup article to download and extract the new release tarball, then load Docker images.
Navigate to the extracted directory which contains the docker-compose.yaml file. By default, Docker Compose uses the extracted folder name as project-name.
Edit the docker-compose.yaml file. Changes made to the docker-compose.yaml prior to upgrade file must be applied to the newly extracted docker-compose.yaml file.
With that, either rename the extracted folder to match the project-name and run:
docker compose up -d
OR run the below command with the project-name noted above from step #1 above
docker compose -p <project-name> up -d
If the -p argument is used to deploy DCT services, then the corresponding command to bring down the DCT services would be:
docker compose -p <project-name> down