One-time Configuration Import Example
The following example shows how to perform a one-time configuration import within Docker, and additionally how to invoke the Configuration Importer on standard deployments.
Save the following sample YAML configuration document as the file "./import/config/example-config.yaml":
example-config.yaml |
|---|
|
Example Docker Deployment
When deploying the Traffic Manager container, mount the "import" directory as a volume and specify the mount path in the ZEUS_BASE_CONFIG environment variable. After installing the Traffic Manager, the container's startup script searches for configuration documents within the "config" subdirectory of the mounted volume and performs a one-time import of the configuration documents contained there.
To deploy a fully configured Traffic Manager inside a Docker container, use the following command:
# Assumes the sample configuration document is saved as
# /import/config/example-config.yaml
docker run --name=vtm-config-example \
-v `pwd`/import:/import \
-p 8080:80 \
-p 9090:9090 \
-e ZEUS_BASE_CONFIG=/import \
-e ZEUS_EULA=accept \
-e ZEUS_PASS=admin \
--privileged \
--init \
-t \
-d \
pulsesecure/vtm:<version>The above example launches a Traffic Manager container named "vtm-config-example" that is populated with the configuration specified in "/import/config/example-config.yaml". To verify that the deployment was successful, make an HTTP request to port 8080 on your Traffic Manager’s primary IP address or hostname. This should result in a "Hello World" response.
To see that the configuration has been correctly applied, access the Administration Interface (Admin UI) of the Traffic Manager instance on port 9090.
Example for Standard Deployments
Standard software or virtual appliance deployments of the Traffic Manager include the Configuration Importer tool as standard, but without built-in support for invoking it at install time.
An administrator can invoke the Configuration Importer manually from the command-line using the following command:
# Assumes the sample configuration document is saved as
# /import/config/example-config.yaml
$ZEUSHOME/zxtm/bin/config-import --chdir /import ./configIn this example, the Configuration Importer uses "/import" as its base directory and imports the configuration specified in any documents found in the "/import/config" directory.
