Deploy the Deployer VM, Cisco Operations Hub, and Cisco Smart PHY Application

This section explains how to use the deployer script to deploy the deployer virtual machine (VM), Cisco Operations Hub, and the Cisco Smart PHY application.

In some environments, the default docker IP subnet (172.17.0.0/16) of the deployer VM may overlap with IP networks in your environment. For deploying the Cisco Smart PHY application in such environments, contact Cisco support.

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 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 Update Flag [Optional]

  • -v: Config Validation Flag, [Optional]

  • -f: Redeploy the cluster. If you redeploy the cluster, you will lose all data available in the original cluster.

The -u flag is for updating the deployer. When this flag is present, the script processes all deployers in the deployers section in the configuration file. Also, ignores clusters in the clusters section.

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 the private-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 the offline-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

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

To remove and redeploy a cluster, run the following command:
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.


Verify Installation

After successfully deploying the Cisco Smart PHY application using the deployer script, the console shows a success message.

Log in to one of the control-plan nodes and make sure that all the pods are in the Running state.
kubectl get pod --all-namespaces

A few internal services and pods may need more time to complete the startup tasks and successfully establish communication with other services within the cluster. After a few minutes, you can initiate all operations from the Cisco Smart PHY web UI page.