How to use Environment Variables for vFunction Installation parameters
Overview
All values in the vFunction Viper’s installation.yaml can be set in an environment using Environment Variables instead of modifying the installation.yaml.
Linux Images - Implementation Workflow
- SSH to the environment where the vFunction Viper will be installed
- Add the Environment Variables. For example,
export VF_CONTROLLER_VIPERINST_CONTROLLER_HOST="https://vfunction.myorganization.com"
- Run the vFunction Installation / Upgrade script. For example,
bash /home/peter/vfunction/opt/vfunction/controller-installation/upgrade.sh -i viperinst
Windows Images - Environment Variable Workflow
- RDP to the environment where the vFunction Viper will be installed
- Open PowerShell as the user who will run the installation or upgrade script. For example, Run as Administrator.
- Add the Environment Variable. For example,
$env:VF_CONTROLLER_VIPERINST_CONTROLLER_TAGS=“prodWebApp,prod”
- Run the vFunction Installation / Upgrade script. For example,
powershell -NoProfile -ExecutionPolicy unrestricted -Command “C:\vfunction\controller-installation\install.ps1 -instance viperinst”
Syntax for Environment Variables
The name of an override Environment Variable for a value in the installation.yaml will be in the form of **VF_CONTROLLER_$instanceName_$keyName_$subKeyName=$value**. The underscore character will be used to replace hyphens and periods.
Installation.yaml Examples
VF_CONTROLLER_VIPERINST_CONTROLLER_NAME="prod-notification" | vFunction Instance = viperinst , installation.yaml's controller.name: prod-notification |
VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_ID="1111-11-11-1111" | vFunction Instance = viperinst , installation.yaml's controller.client_id: 1111-11-11-1111 |
VF_CONTROLLER_VIPERINST_VIPER_ASSEMBLIES="C:\vfunction\assemblies\" | vFunction Instance = viperinst , installation.yaml's viper.assemblies: C:\vfunction\assemblies\ |