Deploy the Deployer VM, Cisco Operations Hub, and Cisco Smart PHY Application
Deploy the Deployer
From the staging server, run the deployer
script to deploy the clusters using the following command:
$ ./deploy
Usage ./deploy -c <config_file> [-v]
-c <config_file> : Configuration File, <Mandatory Argument>
-v : Config Validation Flag, [Optional]
-f : Day0: Force VM Redeploy Flag [Optional]
: Day1: Force RPD Update Flag [Optional]
-u : Cluster chart Upgrade Flag [Optional]
-s : Skip Compare Flag [Optional]
-sc : Skip Compatibility check during upgrade Flag [Optional]
-D : Enable Debug Logs [Optional]
The following options are available in the deployer
script:
-
-c <config_file>
: Configuration file (Mandatory Argument). This option is the first option in the command. -
-u
: Cluster chart Update Flag [Optional] -
-v
: Config Validation Flag, [Optional] -
-f
: Redeploy the cluster. If you redeploy the cluster, cluster VM's will be rebooted and the data persisted on disk will be retained. You can use this option to modify some of the cluster parameters.
The -u
flag is for updating CNF/charts in cluster.
The deployer
script triggers the docker command that requires root permission to run. Depending on your setting, you can use the sudo to the deploy command.
The deployer
script does the following operations:
-
If you are running the
deployer
script for the first time, it prompts you to enter all passwords required for installation.-
For vCenter environment: vCenter password for the user specified in the environment configuration.
-
For deployer: SSH password of the user admin for the deployer's Operation Center.
-
For Cisco Smart PHY cluster: SSH password for all VMs in the cluster (or user-specified in the cluster's configuration file). Also, the SSH passwords for the three Operation Centers (Cisco Smart PHY, Operations Hub, and CEE); for user admin.
You are prompted twice to enter each password. The password is saved inside the staging directory in encrypted form for future use.
-
-
Passwords for the deployer, the cluster, and the Operation Centers must be eight characters long, and must have a lowercase letter, uppercase letter, a digit, and a special character.
-
The
deployer
script generates an SSH key pair when theprivate-key-file
line is missing for the deployer or the cluster in the configuration file. The generated private key files are in the.sec
sub directory under the staging directory, with<cluster-name>_auto.pem
filename. -
The root user owns the generated private keys. When logging in using SSH and these private key files, make sure that you run it with
sudo
. -
If the deployer VM is not running, the
deployer
script installs the deployer VM. -
The
deployer
script checks if the deployer VM is missing any of the product packages that are found in theoffline-images
directory, and if it finds any missing, it uploads them to the deployer VM. -
The script also generates the configuration for each cluster and pushes them to the deployer VM.
-
The
deployer
script triggers the deployer VM to perform the sync operation for the cluster. The sync operation applies the configuration to the cluster. If you have not set up the cluster, it installs the cluster. Or the sync operation updates the cluster with the configuration. -
If the sync operation times out, the
deployer
script triggers the sync operation again. The script waits for the sync operation to complete, and then continues to monitor the cluster to make sure that all helm charts are deployed and all pods are created.
You can repeat the deployer
script to deploy more than one cluster by providing the corresponding configuration files. Alternatively, you can run this
command appending a -v
flag. The -v
flag forces the deployer
script to skip the synchronizing operation. Use this option to push the configuration of a cluster to the deployer without
deploying or updating the cluster.
Wait for the installation process to complete. Following is a sample output after the process is complete:
Friday 22 October 2021 07:53:52 +0000 (0:00:00.123) 0:12:22.518 ********
install-cm-offline : Extract cluster manager file into /data ---------- 545.16s
vm-vsphere-iso : Wait for ssh ------------------------------------------ 88.51s
install-cm-offline : Deploy cluster manager ---------------------------- 85.14s
install-ntp-iso : force_time_sync --------------------------------------- 7.34s
vm-vsphere-iso : Create VM ---------------------------------------------- 3.85s
vm-vsphere-iso : Get VM Update needed ----------------------------------- 1.65s
install-ntp-iso : Cleaning cache ---------------------------------------- 1.53s
Gathering Facts --------------------------------------------------------- 1.34s
vm-vsphere-iso : Check if ISO file exists ------------------------------- 0.79s
vm-vsphere-iso : Test vCenter credentials are valid --------------------- 0.60s
install-ntp-iso : apt_update -------------------------------------------- 0.55s
vm-vsphere-iso : Create user data ISO ----------------------------------- 0.52s
install-ntp-iso : Remove "ntp" package ---------------------------------- 0.47s
install-cm-offline : Ensure /data/cm-install folder NOT exists ---------- 0.36s
install-ntp-iso : Install offline APT repo GPG key ---------------------- 0.34s
install-cm-offline : Ensure /data folder exists ------------------------- 0.33s
install-ntp-iso : restart_chrony ---------------------------------------- 0.28s
install-ntp-iso : enable chrony ntp ------------------------------------- 0.28s
download-iso : download base image ISO file ----------------------------- 0.28s
vm-vsphere-iso : Create netplan Template -------------------------------- 0.18s
Create deployers completed
Deploy the Cluster with CA signed certificate using deploy command
When you deploy the Cisco SmartPHY cluster, the cluster is configured with a self-signed certificate by default. You can deploy the cluster with a CA signed certificate by performing the following steps before running deploy script.
-
Generate a CA signed certificate with a common name as
ingress-hostname
used in the day 0 configuration YAML file. -
On the stanging server, create a directory with the cluster name as the directory name under
<staging directory>/certs/client_certificates
. For example, if you use cluster nametestcluster
, the created directory will be<staging directory>/certs/client_certificates/testcluster
. This directory is called cluster ingress certificates directory. -
Create
cert-api-ingress
anddefault-ssl-certificate
directories under cluster ingress certificates directory. -
Place the CA Signed certificate and keys under
cert-api-ingress
directory. The CA signed certificate file has.crt
extension and key file has.key
extension.
Deploy the Cluster
Run the following sync
command to deploy a new cluster or to update an existing cluster.
clusters <cluster> actions sync run
Enter yes
at the prompt to start the deployment as a background synchronization job.
Important |
The sync command does not support updating network or node configurations. For such changes, redeploy the cluster. |
Redeploy Cisco Operations Hub Cluster
clusters <cluster> actions sync run force-vm-redeploy true purge-data-disks true
This command removes the VMs of the cluster and its data disks, before deploying the cluster.
Note |
Back up the configuration data before redeploying the cluster. Configuration data of the Cisco Operations Hub cluster is deleted after the process. |