Early last week, I had published an article on how to automate the deployment of VUM's Update Manager Download Service (UMDS) in vSphere 6.5 for an Ubuntu 14.04 distribution. The interesting backstory to that script is that it started from a Docker Container that I had initially built for the VUM UMDS. I found that being able to quickly spin up UMDS instance using a Docker Container purely from a testing standpoint was much easier than needing to deploy a full VM, especially as I have Docker running on my desktop machines. Obviously, there are limitations with using a Docker Container, especially if you plan to use UMDS for a longer duration and need persistence. However, for quick lab purposes, it may just fit the bill and even with Docker Containers, you can use Docker Volumes to help persist the downloaded content.

You can find the Dockerfile and its respective scripts on my Github repo here: https://github.com/lamw/vum-umds-docker

Below are the instructions on how to use the VUM UMDS Docker Container.

Step 1 - Download and extract the VCSA 6.5 ISO which contains the VUM UMDS Installer. You will need to copy the VMware-UMDS-6.5.0-4540462.tar.gz (located under umds directory) to your system that has the Docker Client.

Step 2 - Download both the Dockerfile and install_umds.sh on to the same system as the UMDS installer.

Step 3 - Next, we need to build our Docker Container which accepts four build arguments as a way to pass in variables to the UMDS installer script. The following variables are as defined:

  • UMDS_DATABASE_NAME - The name of the UMDS DB (e.g. UMDSDB)
  • UMDS_DSN_NAME - The name of the UMSDS DSN (e.g. UMDS_DSN)
  • UMDS_USERNAME - The name of the user to run the UMDS Service (e.g. umdsuser)
  • UMDS_PASSWORD - The password to the UMDS user account (e.g. VMware123)

Here is an example of passing in the variable names to build the Docker Container which I have just named "umds" for simplicity purposes.

docker build --build-arg UMDS_DATABASE_NAME=UMDSDB --build-arg UMDS_DSN_NAME=UMDS_DSN --build-arg UMDS_USERNAME=umdsuser --build-arg UMDS_PASSWORD=VMware123 -t umds .

Step 4 - To start the Docker Container, run the following command:

docker run --rm -it umds

You can now use the vmware-umds CLI to add/remove patch repositories that UMDS can subscribe to. You would also use the utility to initiate the patch downloads by using the -D option. Once you have downloaded all of your content, you will need to setup an HTTP server to make it available to VUM instance in the vCenter Server Appliance (VCSA). You can configure any popular HTTP Server such as Nginx or Apache. For my lab environment, I actually just use the tiny HTTP server that Python can provide.

To make the content under /var/lib/vmware-umds available, just change into that directory and run the following command:

python -m SimpleHTTPServer

By default, port 8080 will be used, but you can also change it by simple appending a port number like: python -m SimpleHTTPServer 8081. Now if you open a browser to the IP Address and port of the UMDS Server, you should see directory listing of the files. You can take this URL and add that into your VUM instance. Be aware that once you stop the Docker Container, you will lose all downloaded content as it is not persisted.

If you wish to persist patch store which is located in /var/lib/vmware-umds, you could use a Docker Volume to mount a local directory on the Docker Client system and map that into the Docker Container. This would allow you to not have to download the files each time for testing purposes.

To do so, here is an example of starting the Docker Container and mounting /root from your local Docker Client system to /var/lib/vmware-umds:

docker run --rm -it -v /root:/var/lib/vmware-umds umds

Thanks for the comment!