Installing NPS toolkit Web API server and Redis containers in NPS toolkit VM

Prerequisites
  • Ensure that there is Internet connectivity.
  • Ensure the registry VM is up and running in case of offline mode of installation.

  • The default username and the default password for the NPS toolkit API server are provided in the /root/nps2/install/nps_secret.yaml file.
    NOTE:

    These default credentials are passed to the Kubernetes cluster using the nps_secret.yaml file. Hewlett Packard Enterprise recommends that you modify the default values before installing the NPS toolkit Web API server.

    For information about modifying the default username and password in the nps_secret.yaml file, see Modifying default credentials for NPS toolkit Web API server.

  • Ensure /root/nps2/install/utils/input.yaml has proper values for CA certificates.
    • If the certificate exists, update the section ca_signed with the absolute path of the certificate file.

    • If the certificate does not exist, update the section self_signed with appropriate values.

    • Ensure dns_ip and customer_ip are updated accordingly in input.yaml file.

Procedure
  1. Log in to NPS toolkit VM.

    The credentials are defined in source_input.rc file available in /var/nps/nps2/install/utils of host machine.

  2. Navigate to /root/nps2/install/utils/ and update input.yaml values according to the sample provided:
    • If the SSL certificate exists, update the section 'ca_signed' with the absolute path of the certificate file.

    • If the certificate does not exist, update the section 'self_signed' with appropriate values.

    • Ensure dns_ip and customer_ip are updated accordingly in input.yaml file.

    cd /root/nps2/install/utils/
    
    ###Please provide only either self_signed to generate new SSL certificates, or provide ca_signed details to use existing certificates ###
    # C in self_signed is Two letter code of your country
    # ST in self_signed is Two letter code of your state or province
    # L in sel_signed is Full name of your location
    # O in self_sgned is Full name of your organization
    # OU in self_signed is Full name of your unit, section, or group
    # CN in self_signed is Domain name of your server or the public IP address of your server
    
    self_signed:
        C: ""
        ST: ""
        L: ""
        O: ""
        OU: ""
        CN: ""
    ca_signed:
        key_file_path: ""
        crt_file_path: ""
        pem_file_path: ""
        
    #Mandatory   field
    #customer_ip is NPS Toolkit VM IP
    customer_ip: "10.x.x.x"
    #Enter the DNS IP address to be configured on the NPS toolkit VM. If no DNS is available enter any reachable IP address.
    dns_ip: "10.x.x.x"
    #IPALLOC range for deploying kubernetes pods. User can change this value, by default it is '172.16.0.0/24', 
    #make sure this network does not overlap with existing infrastructure networks.
    ipalloc_range_cidr: "172.16.0.0/24"
    
    #Supported vim_type are rhocp, rhosp and vmware. If VIM is not required, then give ""(empty string).
    vim_type: ""
    #mode_of_installation refers to the type of rhocp cluster installation on baremetal which can be either online or offline.If vim_type
    #is other than rhocp on baremetal, enter ""(empty string).
    mode_of_installation: ""
    #A fully qualified domain name of registry server.Provide reqistry_fqdn value only when vim_type is rhocp 
    #and mode_of_installation is offline, else give ""(empty string).
    registry_fqdn: ""
    #httpwebproxy in format http://<proxy_url>:<proxy_port> if proxy is required, else keep it empty("")
    httpwebproxy: ""
    
    #If proxy requires username and password update the below two fields else keep them empty("")
    proxy_user: ""
    proxy_password: ""

    For more information about the parameters, see Parameter descriptions in input.yaml file.

  3. If the RHOCP mode of installation is offline, perform the following steps:
    1. Login to the local registry VM.
    2. Navigate to the path /etc/pki/ca-trust/source/anchors/.
    3. Copy the registry server certificate domain.crt to the path /var/artifacts of the NPS toolkit VM.
  4. Install docker, build docker images, and bring up kubernetes nodes and pods using the following command:
    source install_nps.sh
    After the execution of this script, the following two parameters are appended in the input.yaml file:
    infrastructure: "baremetal"
    infrastructure_deployment: ""
    
    NOTE:

    After the execution of the script, verify that the nps-rhocp folder is created in the /root directory.

  5. Verify the status of docker, Kubernetes nodes, and pods.
    1. Verify that the status of docker is active (running) using the command:
      systemctl status docker
    2. Verify that the status of the nps nodes is displayed as READY and role is set to MASTER using the following command:
      kubectl get nodes -n nps
    3. Verify the pods npsweb-0 and redis-0 have the status as Running using the following command:
      kubectl get pods --all-namespaces
    4. Verify if the following repositories are enabled using the following command:
      yum repolist
      rhel-7-server-ansible-2.8-rpms/x86_64                     Red Hat Ansible Engine 2.8 RPMs for Red Hat Enterprise Linux 7     14
      rhel-7-server-extras-rpms/x86_64                          Red Hat Enterprise Linux 7 Server - Extras (RPMs)               1,233
      rhel-7-server-ose-4.3-rpms/x86_64                         Red Hat OpenShift Container Platform 4.3 (RPMs)                   311
      rhel-7-server-rh-common-rpms/7Server/x86_64               Red Hat Enterprise Linux 7 Server - RH Common (RPMs)              242
      rhel-7-server-rpms/7Server/x86_64                         Red Hat Enterprise Linux 7 Server (RPMs)                       27,215
      repolist: 29,493