This page provides information on setting up V-Ray Swarm through a silent installation and removing V-Ray Swarm through a silent uninstallation.
Overview
A silent installation allows you to complete V-Ray installation without user input during the process using a predefined set of options. To set up a silent installation, you need to perform two steps: creating an .xml file and running the installer.
You can remove V-Ray from your machine similarly through a silent uninstall.
Creating the .xml file
Run the installation file from the command prompt with the -gui=0 argument
vrswrm-installer-win.exe -gui=0
Follow the instructions of the install and set-up the installation the way you want to have it on all machines This will create a file named config.xml in the folder of the installation file.
Running the installer
In the second step you run the installer with the following command:
vrswrm-installer.exe -configFile="config.xml" -gui=0
This will cause the installer to read the variable values from the .xml file and do the installation without user input. If you do not specify the '-quiet=1' option, the installer will ask for a confirmation of each variable before proceeding.
Configuration File
The config.xml file holds configuration information about the settings of the installation. Below is an example of such a config file.
<DefValues> <Value Name="REVERT_INSTALL" DataType="value">1</Value> <Value Name="REVERT_UNINSTALL" DataType="value">0</Value> <Value Name="SWARM_PORT" DataType="value">24267</Value> <Value Name="TTL_DEFAULT_VALUE" DataType="value">1</Value> <Value Name="AUTO_DISCOVERY" DataType="value">1</Value> <Value Name="STDROOT" DataType="value">C:\Program Files\Chaos Group\V-Ray\Swarm 1.4</Value> <Value Name="CONFIG_ROOT" DataType="value">C:\Program Files\Chaos Group\V-Ray\Swarm 1.4/config</Value> <Value Name="SHORTCUTS" DataType="value">1</Value> <Value Name="FIREWALL_EXCEPTION" DataType="value">1</Value> <Value Name="DISCOVERY_COORDINATOR" DataType="value"></Value> <Value Name="DISCOVERY_ALTERNATE_COORDINATOR_1" DataType="value"></Value> <Value Name="DISCOVERY_ALTERNATE_COORDINATOR_2" DataType="value"></Value> <Value Name="INITIAL_CONFIGURATION_PATH" DataType="value"></Value> <LicServer> <Host>localhost</Host> <Port>30304</Port> <Host1></Host1> <Port1>30304</Port1> <Host2></Host2> <Port2>30304</Port2> <User></User> </LicServer> </DefValues>
Below is a description of the variables of the installer:
AUTO_DISCOVERY | When set to 1 V-Ray Swarm will try to discover other nodes automatically. When set to 0 the DISCOVERY_COORDINATOR variable should be set to the IP of the machine where the Coordinator will run. Defaults to 1 |
DISCOVERY_COORDINATOR | Specifies The IP address of the machine which will be used as a coordinator (required if AUTO_DISCOVERY is set to 0) |
DISCOVERY_ALTERNATE_COORDINATOR_1 | Specifies the IP address of a machine, which will be used as a fallback coordinator if the primary coordinator is not available (optional). |
DISCOERY_ALTERNATE_COORDINATOR_2 | Specifies the IP address of the second fallback coordinator. (optional) |
INITIAL_CONFIGURATION_PATH | Specifies the absolute path to a swarm-config.json file to be used as the initial configuration for the new Swarm installation. This allows discovery settings, tags, environment variables, V-Ray settings and other config options to be configured at installation time. See the example file below. |
SWARM_PORT | Specifies the port on which the Swarm nodes communicate. Defaults to 24267 |
TTL_DEFAULT_VALUE | Specifies the Multicast TTL value used when AUTO_DISCOVERY is turned on. Defaults to 1 (same subnet) |
Swarm-Config.json Silent uninstallation
Users can get this file from the working directory, which is:
- Unix: ~/.ChaosGroup/vray-swarm/work/vray-swarm/
- Windows: C:\Program Files\Chaos Group\V-Ray\Swarm 1.4\work\vray-swarm
If V-Ray Swarm is uninstalled, a copy of this file is stored in:
Example swarm-config.json file:
{ "vray": { "port": 20208, "numberOfThreads": 0, "overrideLicense": false, "envVars": { "var1": "var1value", "var2": "var2value" }, "licenseServer": { "host": "127.0.0.1", "port": 30304, "port1": 30304, "port2": 30304 } }, "tags": [ "Default", "Tag1", "Tag2" ], "discover": { "autoDiscover": false, "coordinators": ["10.10.10.10:24267"] } }
There is another config file, the config.yaml, which is in the install directory, is loaded when V-Ray Swarm loads. The discovery options and network settings are overridden if there is runtime configuration (swarm-config.json) or there is provided a path to configuration to load (configFilePath: some/path).
Once V-Ray Swarm is installed direct editing of config.yaml and swarm-config.json is discouraged, since this is not the intended workflow.
vray.port | The network port on which the V-Ray standalone should listen for a request. Equivalent to the portNumber command-line option. Defaults to 20208 |
vray.numberOfThreads | The number of threads that V-Ray Standalone should use. When set to 0 V-Ray will use the number of threads equal to the number of logical processors. Defaults to 0 |
vray.overrideLicense | If set to false the system-wide vrlclient.xml file will be used for license information. If set to true the licenseServer entry will be used to generate vrlclient.xml file for V-Ray Standalone to use. Defaults to false |
vray.envVars
| The entries listed here are environment variables that will be set for V-Ray Standalone when it starts. |
licenseServer | The entries listed here are the same as the ones in vrlclient.xml. Note the everything is in lower case and the port numbers are not surrounded by quotes. |
tags | A list of tags for the Swarm instance. This list should not be empty. Each tag should be surrounded with quotes. |
discover.autoDiscover
| If set to true the Swarm instance will try to discover other instances in the network automatically. If set to false then a list of coordinators should be provided. Defaults to true |
discover.coordinators | A list of IPs of machines where Swarm coordinators run. This list should not be empty if discover.autoDiscover is set to false. |
Silent uninstallation
You can use a command to perform a silent uninstall. In order to do that you need to know the full path of the folder containing V-Ray additional files and the exact name of the product, you want to uninstall. Then you can execute the following command:
"<STDROOT>\uninstall\installer.exe" -uninstall="<STDROOT>\uninstall\install.log" -uninstallApp="<PRODUCT_NAME>" -gui=0 -quiet=1
where <STDROOT> is the destination folder and <PRODUCT_NAME> is the product name i.e. “V-Ray Swarm”
For example, the following command will uninstall V-RaySwarm:
"C:\Program Files\Chaos Group\V-Ray Swarm\uninstall\installer.exe" -uninstall="C:\Program Files\Chaos Group\V-Ray Swarm\uninstall\\install.log" -uninstallApp="V-Ray Swarm" -gui=0 -quiet=1