A Parasoft Docker image is a template that includes the Parasoft Virtualize Server, Parasoft Continuous Testing Platform, Parasoft Data Repository Server, all required software dependencies (e.g., Apache Tomcat, JRE …), and default configuration settings for connecting to Parasoft License Server. In this section:
Ensure that you meet the system requirements for the following components:
See Deploying the SOAtest and Virtualize Server WAR File.
The machine ID used for licensing Parasoft products deployed in Docker is derived from the Docker container ID. If you clone the Docker container, the clone will have a different machine ID and require a new license unless you have a floating license. For floating license issued from License Server, we recommend using License Server on the network outside of Docker. Contact your Parasoft representative if you have any additional questions about licensing.
To deploy on Docker, you configure default connection details in a configuration file, build Docker images, then run the soavirt Docker image.
(Optional) Edit the default values for environment variables in the soavirt/Dockerfile file and ctp/Dockerfile file. The ENV command declares a new environment variable. The environment variable name and value should be separated by a space.
Variable | Description |
---|---|
ENV VIRTUALIZE_SERVER_NAME Docker | Specifies the name that should be used to label this server on Environment Manager. |
ENV CTP_HOST localhost | The host name or IP address of the CTP server where this Virtualize server should register when it starts up. If your CTP is running on localhost outside of the Docker container, specify the IP address (e.g., 10.10.255.47) rather than localhost. |
ENV CTP_PORT 8080 | The port that should be used to connect to CTP. |
ENV CTP_USERNAME admin | The username that should be used to connect to CTP (if authentication has been enabled). |
ENV CTP_PASSWORD admin | The password that should be used to connect to CTP (if authentication has been enabled). |
ENV CTP_NOTIFY true | If true, the Virtualize server notifies CTP when virtual assets are deployed. |
ENV LICENSE_EDITION custom_edition | The Virtualize license edition to request from the License Server. |
| The Virtualize license features to request from the License Server when using a custom edition license. |
ENV LICENSE_SERVER_HOST localhost | The host name or IP address of the License Server to use for requesting a Virtualize license. |
ENV LICENSE_SERVER_PORT 2002 | The port to use for connecting to License Server. |
If you do not want to include Data Repository in the Docker image, change the first line of the soavirt/Docker file from |
Build Docker images for each of the sub folders by executing the following commands in the Docker Terminal in this order:
docker build -t server-jre8 server-jre8/ docker build -t tomcat8 tomcat8/ docker build -t datarepository datarepository/ docker build -t soavirt soavirt/ docker build -t ctp ctp/ |
Execute a command to run the newly created Docker image using the following format:docker run -it --rm -p 8080:8080 -p 9080:9080 ctp
This will start up the Data Repository server, Virtualize server, and CTP.
If CTP is already running outside of the Docker container, run the soavirt Docker image instead:
The The Setting Setting Setting |
You should now see the Virtualize server listed in CTP and be able to use the CTP web interface (by default, at http://localhost:8080/) to create virtual assets or upload .pva files.
If you want to create a Docker image with just CTP and no Data Repository or Virtualize, change the first line of the ctp/Dockerfile from |
If you want to override the default configuration (for example, to use a different CTP or License Server) without rebuilding the soavirt and ctp images, do the following:
-e
option and environment variable name/value separated with an equals sign. docker run -it --rm -p 2424:2424 -p 9080:9080 -e CTP_HOST=em.acme.com -e CTP_PORT=8080 -e LICENSE_SERVER_HOST=ls.acme.com soavirt |
docker run -it --rm -p 2424:2424 -p 9080:9080 -e CTP_HOST=10.10.255.47 -e CTP_PORT=8080 -e LICENSE_SERVER_HOST=license.parasoft.com soavirt |
You should now see the Virtualize server listed in CTP and be able to use the CTP web interface (by default, at http://localhost:8080/) to create virtual assets or upload .pva files.
You can change the configuration defaults inside the Docker image, which involves rebuilding the ctp and soavirt images.
docker images
docker rmi ctp
docker rmi soavirt
docker images
docker build -t soavirt soavirt/
docker build -t ctp ctp/