===== Usage ===== VMTP Docker Image ----------------- In its Docker image form, VMTP is located under the /vmtp directory in the container and can either take arguments from the host shell, or can be executed from inside the Docker image shell. To run VMTP directly from the host shell (may require "sudo" up front if not root):: docker run python /vmtp/vmtp.py To run VMTP from the Docker image shell:: docker run /bin/bash cd /vmtp.py python vmtp.py (then type exit to exit and terminate the container instance) Docker Shared Volume to Share Files with the Container ------------------------------------------------------ VMTP can accept files as input (e.g. configuration and openrc file) and can generate json results into a file. It is possible to use the VMTP Docker image with files persisted on the host by using Docker shared volumes. For example, one can decide to mount the current host directory as /vmtp/shared in the container in read-write mode. To get a copy of the VMTP default configuration file from the container:: docker run -v $PWD:/vmtp/shared:rw cp /vmtp/cfg.default.yaml /vmtp/shared/mycfg.yaml Assume you have edited the configuration file "mycfg.yaml" and retrieved an openrc file "admin-openrc.sh" from Horizon on the local directory and would like to get results back in the "res.json" file, you can export the current directory ($PWD), map it to /vmtp/shared in the container in read/write mode, then run the script in the container by using files from the shared directory:: docker run -v $PWD:/vmtp/shared:rw -t python /vmtp/vmtp.py -c shared/mycfg.yaml -r shared/admin-openrc.sh -p admin --json shared/res.json cat res.json VMTP Usage ---------- .. code:: usage: vmtp.py [-h] [-c ] [-r ] [-m [:]] [-p ] [-t