Skip to main content
Version: v23.0

Upgrading DxEMSSQL Containers

Summary

DxEMSSQL containers must be rebuilt to update the software. Depending on your platform, you'll either update the deployment or re-create the containers.

Information

DxEMSSQL containers are comprised of DxEnterprise and SQL Server installed in a single container. If either product needs to be updated, the container needs to be rebuilt. Instructions for building DxEMSSQL images can be found in the DxEnterprise guides section.

Kubernetes

After you've push a new image to your repository, you can update your StatefulSet by running the command kubectl rollout restart statefulset/dxemssql. There are other methods for updating pods, so be sure to reference Kubernetes documentation for more information.

info

Some Kubernetes configuration options affect how a deployment/StatefulSet updates its pods. Some of these configurations include:

Ensure that you take these configuration options into account when updating your cluster.

Docker

To update your DxEMSSQL image running in Docker, do the following:

  1. Gather the following information about the container using the command docker inspect.

    1. Execute docker inspect <CONTAINER_NAME>. This command will list information about the container's configuration, including mounted volumes and mapped ports.

    2. Under Config > Env, save the value of the DX_HOSTNAME variable. If this environment variable doesn't exist, save the value of Hostname under Config instead. DX_HOSTNAME takes precedence over Hostname.

    3. Under Mounts, save the name of any volume mounts, including the /etc/dh2i volume mount. This is the storage for DH2i's software configuration files, and will be reused by the new container.

    4. Under Network Settings, save the listed port mappings. These mappings must be included in the new docker run command so that pre-existing configurations will function correctly.

      caution

      Containers may have custom configurations that are necessary for the container to function, including settings for network adapters, custom entrypoints, and custom permissions. It is up to you to determine what (if any) additional configuration settings you need to save from your container configuration.

  2. Stop the container using the command docker stop <container_name>.

    info

    Your availability group will automatically failover to a synchronous secondary if this container is the primary. If you want to do this step manually, run the command docker exec <container_name> dxcli vhost-start-node <vhost_name> <container_name> before docker stop.

  3. Delete the container using the command docker rm <container_name>.

    danger

    Removing a container that has data stored in locations other than the volume mounts will destroy that data. If other applications in the container do not have volume mounts and have data that needs to be persisted, see step 2 of this section for instructions on using docker commit to save the container state.

  4. Pull the updated DxEMSSQL image from your repository using the command docker pull <image_name>.

  5. Start a new container using the same volume mounts, hostname, port mappings, and environment variables (along with any other necessary customizations) using the docker run command with the updated image's name.

Additional Information