Generating Versa Director Certificate and Copying to all VAN Nodes


Problem:

Generating Versa Director certificate and copying it to all the Analytics node manually is a tedious task.


Goal:

To automate the process of generating Versa Director certificate, both in active and standby modes, and copying it to all Analytics nodes.


Solution:

Follow these steps to generate the certificate and copy to all Analytics node:

  1. Enable Analytics cluster in Versa Director.
    You can configure Analytics cluster in a single cluster name or multiple cluster name.
  2. Enable Versa director HA if Versa Director is running in active and standby nodes.
  3. Ensure that hostname is properly enabled in Versa Director(s), and is reachable from Analytics cluster node.
    Check the hostname in cat /etc/hostname.
  4. Access /opt/versa/vnms/scripts directory of Versa Director.
    If HA is enabled, go to active Versa Directory directory.
  5. Run ./vnms-certgen.sh --cn versa-director --san versa-director2 --overwrite command to generate the Versa Director certificate.

    This will generate common certificate using ACT HA (hostname - versa-director) and STB HA (hostname - versa-director2) and overwrites existing certificate.

  6. Run ./vnms-cert-sync.sh --sync command to sync/copy the Director certificate to all the configured Analytics nodes.
    Enter the VAN Cluster name and ssh password in Analytics node.
    Example:
    admin@versa-director:/opt/versa/vnms/scripts$ ./vnms-cert-sync.sh --sync    
    Enter VAN Cluster Name:
    VAN2
    CMD_MAAPI is true [mtid = 0]
    Analytics Clusters Configured:10.192.71.76 10.192.71.77
    Enter password for Analytics clusteri For user versaversa123
    Connected to 10.192.71.76
    DEleted Existing Certificate
    SFTPed certificate File
    Certificate Installed
    Connected to 10.192.71.77
    DEleted Existing Certificate
    SFTPed certificate File
    Certificate Installed
    admin@versa-director:/opt/versa/vnms/scripts$
  7. Run ./vnms-cert-sync.sh --verify command to verify the certificate in Versa Director and Analytics nodes are correct.
    Enter the VAN Cluster name and ssh password in Analytics node.
    Example:
    admin@versa-director:/opt/versa/vnms/scripts$ ./vnms-cert-sync.sh --verify   
    Enter VAN Cluster Name:
    VAN1
    CMD_MAAPI is true [mtid = 0]
    Analytics Clusters Configured:10.192.71.71 10.192.71.72
    Enter password for Analytics clusteri For user versaversa123
    verifying certificates
    MD5 hash matches with Director certificate on 10.192.71.71
    MD5-Director:2c25f8696d68e4bd6cc6057b03b5fa2a
    MD5Remote:2c25f8696d68e4bd6cc6057b03b5fa2a
    MD5 hash matches with Director certificate on 10.192.71.72
    MD5-Director:2c25f8696d68e4bd6cc6057b03b5fa2a
    MD5Remote:2c25f8696d68e4bd6cc6057b03b5fa2a

Run ./vnms-certgen.sh --help command for help options.

Example:

admin@versa-director:/opt/versa/vnms/scripts$ ./vnms-certgen.sh --help
Usage: vnms-certgen
generate self signed certificate
echo "sample example : $./vnms-certgen.sh  --cn=exampel.com --san=test.sample.com]"
Options:
-h, --help           Show this help message and exit.
[--cn]             <Fully qualified domain name representing Designated Master Director>
[--san]          <Fully qualified domain name representing Slave Director>
[--overwrite]      <Overwrite existing certificates>
admin@versa-director:/opt/versa/vnms/scripts$