In certain scenarios, the Versa Director startup script is required to run without any manual user intervention. 

For such use-cases, the vnms-startup.sh script provides a non-interactive mode. 

The following steps describe how Versa Director initialization can be fully automated without having the need for any manual intervention.

To execute the script, it needs to be executed in non-interactive mode
 
sudo /opt/versa/vnms/scripts/vnms-startup.sh --non-interactive

Versa Director services need to be restarted for the changes to be effective
 
vsh restart

The configuration required to run the startup script needs to be provided as a json file /opt/versa/etc/setup.json

Sample configuration file:


{

   "input":{

       "version":"1.0",

       "north-bound-interface":[

          "eth0"

      ],

       "south-bound-interface":[

          "eth1"

      ],

       "secure-ha-ports":{

          "mode":"enable"

      },

       "secure-ha-channel":{

          "mode":"enable",

          "psk":"versa123"

      },

       "disable-reset-password-for-first-time-user-login":"true",

      "hostname":"versa-director-automated"

   }

 

}



Description of fields in /opt/versa/etc/setup.json

 

File Name

Description

Required

south-bound-interface

Setup the south-bound interface by providing an interface name

Mandatory

north-bound-interface

Setup the north-bound interface by providing an interface name

Optional

secure-ha-ports

Secure HA ports by using iptables rules. This will ensure that port 4566, 4570, 5432 are open only for communication between the nodes

Optional

secure-ha-channel

Secure HA channels using IPSec for communication between nodes

Optional

disable-reset-password-for-first-time-user-login

Option to disable password reset during initial login

Optional

hostname

Setup Versa Director hostname

Optional