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:
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.
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$
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$