Windows Docker image - SV Server and SVM

This topic describes how to run the Service Virtualization Server and Service Virtualization Management on Windows using a Docker image.

Run the SV Server

To run the SV Server Windows Docker Image, you need Docker for Windows installed, switched to Windows Containers.

Environment Variables

The Service Virtualization Server accepts the following optional environment variables:

SV_USER The username account which is created or updated before the server is started.
SV_PASSWORD The password of the above user.
SV_GROUPS The SV groups of the above user (for example, SVM Users, SV Server Administrators).
SV_DB_TYPE The database type: MSSQL, Oracle, or PostgreSQL.
SV_DB_RECREATE When set, the database schema is recreated before the server starts.
SV_DB_DATASOURCE The data source to be used. For MQSQL, the hostname of the database server.
SV_SERVER_AGENT_PORTS The port range the server uses for agent ports (for example, 7000-7019).
SV_LICENSE_SERVER_URL The license server URL.

Ports

The Service Virtualization Server uses the port 6085 - secure server management REST API.

The following example shows how to run the Service Virtualization Server with its parameters.

docker run ^
-e SV_DB_TYPE=mssql ^
-e SV_DB_RECREATE=true ^
-e SV_DB_DATASOURCE=sv-db-win ^
-e SV_DB_NAME=SvDb ^
-e SV_DB_USERNAME=sa ^
-e SV_DB_PASSWORD=Changeit123 ^
-e SV_USER=demo ^
-e SV_PASSWORD=Changeit123 ^
-e SV_GROUPS="SVM Users,SV Server Administrators" ^
-e SV_SERVER_AGENT_PORTS=7000-7019 ^
-e SV_LICENSE_SERVER_URL=https://license.server.com:5814 ^
-dt -p 6085:6085 -p 7000-7019: 7000-7019 ^
-t ^
--name sv-server-win --memory 4g ^
virtualization/sv-server-windows:latest

Back to top

Run the SV Server with the MS SQL Docker image

You can use a prepared docker image such as microsoft/mssql-server-windows-express, to run a database instance:

docker run -d --name sv-db-win ^
-p 1433:1433 -e ACCEPT_EULA=Y -e sa_password=Changeit123 ^
microsoft/mssql-server-windows-express

Create a database for the SV Server:

docker exec sv-db-win sqlcmd -U sa -P Changeit123 -Q "Create Database SvDb;"

The default MS SQL database configuration is:

userName: sa
userPass: Changeit123
dbDataSource: sv-db-win
databaseName: SvDb

Back to top

Run the SV Server with the Oracle Docker image

You can use a prepared docker image such as wnameless/oracle-xe-11g, to run a database instance:

docker run -d --name sv-db-win ^
-p 49161:1521 -e ORACLE_ALLOW_REMOTE=true ^
-v /u01/app/oracle/ ^
wnameless/oracle-xe-11g

The default MS SQL database configuration is:

userName: system
userPass: oracle
dbDataSource: DB_HOSTNAME:49161/xe

The following is an example of how to run an SV Server image using the Oracle database.

(DB_HOSTNAME is the name of the computer running the database image.)

docker run ^
-e SV_DB_TYPE=oracle ^
-e SV_DB_DATASOURCE= DB_HOSTNAME:49161/xe ^
-e SV_DB_USERNAME=system ^
-e SV_DB_PASSWORD=oracle ^
-e SV_USER=demo ^
-e SV_PASSWORD=Changeit123 ^
-e SV_GROUPS="SVM Users,SV Server Administrators" ^
-e SV_SERVER_AGENT_PORTS=7000-7019 ^
-e SV_LICENSE_SERVER_URL=https://license.server.com:5814 ^
-dt -p 6085:6085 -p 7000-7019: 7000-7019 ^
-t ^
--name sv-server-win --memory 4g ^ virtualization/sv-server-windows:latest

Back to top

Run the SV Server with the PostgreSQL Docker image

You can use a prepared docker image such as postgres, to run a database instance:

docker run -d --name sv-db-win  ^
-p 5432:5432 -e POSTGRES_PASSWORD=Changeit123 ^
-v /var/lib/postgresql/data ^
postgres

The default MS SQL database configuration is:

userName: postgres
userPass: Changeit123
dbDataSource: ;Host=DB_HOSTNAME;Database=postgres

The following is an example of how to run an SV Server image using the PostgreSQL database.

(DB_HOSTNAME is the name of the computer running the database image.)

docker run ^
-e SV_DB_TYPE= postgresql ^
-e SV_DB_DATASOURCE= ;Host=DB_HOSTNAME;Database=postgres ^
-e SV_DB_USERNAME= postgres ^
-e SV_DB_PASSWORD= Changeit123 ^
-e SV_USER=demo ^
-e SV_PASSWORD=Changeit123 ^
-e SV_GROUPS="SVM Users,SV Server Administrators" ^
-e SV_SERVER_AGENT_PORTS=7000-7019 ^
-e SV_LICENSE_SERVER_URL=https://license.server.com:5814 ^
-dt -p 6085:6085 -p 7000-7019: 7000-7019 ^
-t ^--name sv-server-win --memory 4g ^
virtualization/sv-server-windows:latest

Back to top

Run SV with Docker Compose

The following section describes how to run PostgreSQL DB, the Service Virtualization Server container, and the Service Virtualization Management container using the docker-compose tool. Create a docker-compose.yml file with the following content:

version: '3'
		volumes:
		db:
		services:
		sv-server:
		image: virtualization/sv-server-windows
		container_name: sv-server-win
		hostname: ${HOST_NAME}
		tty: true
		environment:
			- SV_SERVER_AGENT_PORTS=7000-7019
			- SV_USER=demo
			- SV_PASSWORD=Changeit123
			- SV_GROUPS=SV Server Administrators
			- SV_LICENSE_SERVER_URL=https://autopass.example.com:5814
			- SV_DB_TYPE=postgresql
			- SV_DB_DATASOURCE=;Host=sv-db-win;Database=postgres 
			- SV_DB_USERNAME=postgres
			- SV_DB_PASSWORD=Changeit123
			- SV_DB_RECREATE=true 
		ports:
			- 6085:6085 # secure REST
			- 7000-7019:7000-7019 # SV agents
		stop_grace_period: 2m
		depends_on:
			- sv-db-win
			sv-svm:
		image: virtualization/sv-svm
		container_name: sv-svm
		hostname: ${HOST_NAME}
		tty: true
		environment:
			- SV_USER=demo
			- SV_PASSWORD=Changeit123
			- SV_GROUPS=SVM Users
		ports:
			- 6086:6086 # secure web
		stop_grace_period: 2m
		sv-db-win:
		image: postgres:10
		container_name: sv-db-win
		stop_grace_period: 2m
		volumes:
			- db:/var/lib/postgresql/data
		environment:
			- POSTGRES_PASSWORD=Changeit123
		ports:
			- 5432:5432
			

Back to top

Service Virtualization Management environment variables

The Service Virtualization Management tool accepts the following optional environment variables:

SV_USER The username account which is created or updated before the server is started.
SV_PASSWORD The password of the above user.
SV_GROUPS The SV groups of the above user (such as Service Virtualization Management users, Service Virtualization Server administrators).

Ports

Service Virtualization Management uses port 6086 as its web secure endpoint port.

Back to top

Run Service Virtualization Management

The following section shows how to run Service Virtualization Management with all of its parameters:

docker run -dt ^
-e SV_USER=demo ^
-e SV_PASSWORD=Changeit123 ^
-e SV_GROUPS="SVM Users,SV Server Administrators" ^
-p 6086:6086 ^
-t ^
--hostname svm ^
--name sv-svm-win --memory 4g ^
virtualization/sv-svm-windows:latest

Back to top

Service Virtualization Management Web

The Service Virtualization Management is accessible on the Web at https://svm:6086/. When you access this URL, you are prompted to authenticate using the user name and password that was created (demo/Changeit123).

Back to top

See also: