Install - Java Viper Controller on Windows with Admin Access for Static Analysis



Installation Steps

Take the following steps to install the vFunction Java Controller on a Windows Server with Admin access:

  1. Ensure Prerequisites are met
  2. Download the vFunction Controller Windows Installation ZIP from the vFunction Portal
  3. Move the Controller ZIP package to the Windows Server
  4. Extract the ZIP to the desired directory, such as C:\vfunction\
  5. Open Powershell as an Administrator and unblock the files in the installation directory. Replace REPLACE_BASE_DIR with the actual value.
dir -Path "REPLACE_BASE_DIR" -Recurse | Unblock-File
  1. In Powershell, create the instance, set the environment variables and run the installation script. Replace the INSTANCE_NAME and REPLACE_BASE_DIR with the actual values.
# Replace REPLACE_BASE_DIR with the actual installation path
# Replace CHANGE_ME with the appropriate values using descriptions ...
# in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/windows as a guide

powershell -NoProfile -ExecutionPolicy unrestricted -Command "REPLACE_BASE_DIR\vfunction\controller-installation\create-instance.ps1 -instance viperinst -type java -viperMode true;$env:VF_CONTROLLER_VIPERINST_CONTROLLER_NAME='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_HOST='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_ORG_ID='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_APP_ID='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_ID='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_SECRET='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_INSTANCE_ID='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_TAGS='[`"CHANGE_ME`"]';$env:VF_CONTROLLER_VIPERINST_VIPER_JVM_MEMORY_PARAMS='CHANGE_ME';$env:VF_CONTROLLER_VIPERINST_VIPER_ARCHIVES='[`"CHANGE_ME`"]';REPLACE_BASE_DIR\vfunction\controller-installation\install.ps1 -instance viperinst"

### Sample Values
powershell -NoProfile -ExecutionPolicy unrestricted -Command "C:\vfunction\controller-installation\create-instance.ps1 -instance viperinst -type java -viperMode true;$env:VF_CONTROLLER_VIPERINST_CONTROLLER_NAME='prod-viper';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_HOST='http://172.31.15.51';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_ORG_ID='1111-11-11-1111';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_APP_ID='1111-11-11-1111';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_ID='1111-11-11-1111';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_SECRET='1111-11-11-1111';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_INSTANCE_ID='viper';$env:VF_CONTROLLER_VIPERINST_CONTROLLER_TAGS='[`"prod`"]';$env:VF_CONTROLLER_VIPERINST_VIPER_JVM_MEMORY_PARAMS='-Xms300m -Xmx4g -Xss50m';$env:VF_CONTROLLER_VIPERINST_VIPER_ARCHIVES='[`"C:\app\bin`"]';C:\vfunction\controller-installation\install.ps1 -instance viperinst"
  1. Restart the Application

Optional flags that can be used in the install.ps1 script

Flag Purpose
-instance Used to input the Instance Name as a String following the flag
-scriptMode Used to run the installation in script mode so that all no user prompts are displayed and console output is minimized
-runAsServices Used to define whether the installation should run in Admin-mode (Services true) or User-mode (Services false)
-noServices Used when the Viper Service or Process should not be started immediately. Typically used when the Install is happening in a Containerized Build and it is not desired to start the Service or Process until Runtime (-noServices true) in which case this flag is used in conjunction with the restart-controller.ps1 script at Runtime