docs/doc/source/dist_cloud/kubernetes/installing-a-subcloud-witho...

11 KiB

Install a Subcloud Without Redfish Platform Management Service

For subclouds with servers that do not support Redfish Virtual Media Service, the ISO is installed locally at the subcloud. You can use the Central Cloud's CLI to bootstrap subclouds from the Central Cloud.

After physically installing the hardware and network connectivity of a subcloud, the subcloud installation process has two phases:

  • Installing the ISO on controller-0; this is done locally at the subcloud by using either, a bootable USB device, or a local boot server
  • Executing the dcmanager subcloud add command in the Central Cloud that uses Ansible to bootstrap on controller-0 in the subcloud

Note

After a successful remote installation of a subcloud in a Distributed Cloud system, a subsequent remote reinstallation fails because of an existing ssh key entry in the /root/.ssh/known_hosts on the System Controller. In this case, delete the host key entry, if present, from /root/.ssh/known_hosts on the System Controller before doing reinstallations.

partner

  • You must have downloaded update-iso.sh from .
  • In order to be able to deploy subclouds from either controller, all local files that are referenced in the bootstrap.yml file must exist on both controllers (for example, /home/sysadmin/docker-registry-ca-cert.pem).

  1. At the subcloud location, physically install the servers and network connectivity required for the subcloud.

    Note

    The servers require connectivity to a gateway router that provides IP routing between the subcloud management subnet and the System Controller management subnet, and between the subcloud subnet and the System Controller subnet.

  2. Update the ISO image to modify installation boot parameters (if required), automatically select boot menu options and add a kickstart file to automatically perform configurations such as configuring the initial IP Interface for bootstrapping.

    For subclouds, the initial IP Interface should be the planned IP Interface for the subcloud.

    Use the update-iso.sh script from . The script is used as follows:

    update-iso.sh -i <input bootimage.iso> -o <output bootimage.iso>
                    [ -a <ks-addon.cfg> ] [ -p param=value ]
                    [ -d <default menu option> ] [ -t <menu timeout> ]
         -i <file>: Specify input ISO file
         -o <file>: Specify output ISO file
         -a <file>: Specify ks-addon.cfg file
    
         -p <p=v>:  Specify boot parameter
                    Examples:
                    -p rootfs_device=nvme0n1
                    -p boot_device=nvme0n1
    
                    -p rootfs_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
                    -p boot_device=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0
    
         -d <default menu option>:
                    Specify default boot menu option:
                    0 - Standard Controller, Serial Console
                    1 - Standard Controller, Graphical Console
                    2 - AIO, Serial Console
                    3 - AIO, Graphical Console
                    4 - AIO Low-latency, Serial Console
                    5 - AIO Low-latency, Graphical Console
                    NULL - Clear default selection
         -t <menu timeout>:
                    Specify boot menu timeout, in seconds

    The following example ks-addon.cfg file, used with the -a option, sets up an initial IP interface at boot time by defining a on an Ethernet interface and has it use to request an IP address:

    #### start ks-addon.cfg
    OAM_DEV=enp0s3
    OAM_VLAN=1234
    
    cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$OAM_DEV
    DEVICE=$OAM_DEV
    BOOTPROTO=none
    ONBOOT=yes
    LINKDELAY=20
    EOF
    
    cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$OAM_DEV.$OAM_VLAN
    DEVICE=$OAM_DEV.$OAM_VLAN
    BOOTPROTO=dhcp
    ONBOOT=yes
    VLAN=yes
    LINKDELAY=20
    EOF
    #### end ks-addon.cfg

    After updating the ISO image, create a bootable USB with the ISO or put the ISO on a PXEBOOT server.

  3. At the subcloud location, install the software from a USB device or a Boot Server on the server designated as controller-0.

  4. At the subcloud location, verify that the interface on the subcloud controller has been properly configured by the kickstart file added to the ISO.

  5. Log in to the subcloud's controller-0 and ping the Central Cloud's floating IP Address.

  6. At the System Controller, create a /home/sysadmin/subcloud1-bootstrap-values.yaml overrides file for the subcloud.

    For example:

    system_mode: simplex
    name: "subcloud1"
    
    description: "test"
    location: "loc"
    
    management_subnet: 192.168.101.0/24
    management_start_address: 192.168.101.2
    management_end_address: 192.168.101.50
    management_gateway_address: 192.168.101.1
    
    external_oam_subnet: 10.10.10.0/24
    external_oam_gateway_address: 10.10.10.1
    external_oam_floating_address: 10.10.10.12
    
    systemcontroller_gateway_address: 192.168.204.101
    
    docker_registries:
      k8s.gcr.io:
        url: registry.central:9001/k8s.gcr.io
      gcr.io:
        url: registry.central:9001/gcr.io
      ghcr.io:
        url: registry.central:9001/ghcr.io
      quay.io:
        url: registry.central:9001/quay.io
      docker.io:
        url: registry.central:9001/docker.io
      docker.elastic.co:
        url: registry.central:9001/docker.elastic.co
      defaults:
        username: sysinv
        password: <sysinv_password>
        type: docker

    Where <sysinv_password> can be found by running the following command as 'sysadmin' on the Central Cloud:

    $ keyring get sysinv services

    This configuration uses the local registry on your central cloud. If you prefer to use the default external registries, make the following substitutions for the docker_registries and additional_local_registry_images sections of the file.

    docker_registries:
      defaults:
       username: <your_wrs-aws.io_username>
       password: <your_wrs-aws.io_password>

    Note

    If you have a reason not to use the Central Cloud's local registry you can pull the images from another local private docker registry.

  7. You can use the Central Cloud's local registry to pull images on subclouds. The Central Cloud's local registry's HTTPS certificate must have the Central Cloud's IP, registry.local and registry.central in the certificate's list. For example, a valid certificate contains a list "DNS.1: registry.local DNS.2: registry.central IP.1: <floating management\> IP.2: <floating OAM\>".

    If required, run the following command on the Central Cloud prior to bootstrapping the subcloud to install the new certificate for the Central Cloud with the updated list:

    ~(keystone_admin)]$ system certificate-install -m docker_registry path_to_cert
  8. At the Central Cloud / System Controller, monitor the progress of the subcloud bootstrapping and deployment by using the deploy status field of the dcmanager subcloud list command.

  9. You can also monitor detailed logging of the subcloud bootstrapping and deployment by monitoring the following log files on the active controller in the Central Cloud.

    /var/log/dcmanager/ansible/<subcloud_name>_playbook.output.log

    For example:

    controller-0:/home/sysadmin# tail /var/log/dcmanager/ansible/subcloud1_playbook.output.log
    k8s.gcr.io: {password: secret, url: null}
    quay.io: {password: secret, url: null}
    )
    
    TASK [bootstrap/bringup-essential-services : Mark the bootstrap as completed] ***
    changed: [subcloud1]
    
    PLAY RECAP *********************************************************************
    subcloud1                  : ok=230  changed=137  unreachable=0    failed=0

  • Provision the newly installed and bootstrapped subcloud. For detailed deployment procedures for the desired deployment configuration of the subcloud, see the post-bootstrap steps of the .

  • Check and update docker registry credentials on the subcloud:

    REGISTRY="docker-registry"
    SECRET_UUID='system service-parameter-list | fgrep
    $REGISTRY | fgrep auth-secret | awk '{print $10}''
    SECRET_REF='openstack secret list | fgrep $
    {SECRET_UUID} | awk '{print $2}''
    openstack secret get ${SECRET_REF} --payload -f value

    The secret payload should be username: sysinv password:<password>. If the secret payload is username: admin password:<password>, see, Updating Docker Registry Credentials on a Subcloud <updating-docker-registry-credentials-on-a-subcloud> for more information.

  • For more information on bootstrapping and deploying, see the procedure Install a subcloud, step 4.