Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The BPA is part of the infra local controller which runs as a bootstrap k8s cluster in the ICN project. As described in Integrated Cloud Native Akraino project, the purpose of the BPA is to install packages that cannot be installed using kubectl. It will be called once the operating system (Linux) has been installed in the compute nodes by the baremetal operator. The Binary Provisioning Agent will carry out the following functions;

  1. Get site specific information containing information about compute nodes and their resource capabilities.
  2. Create the hosts.ini file required to install kubernetes on compute nodes in order to create a cluster using kubespray. It uses the roles specified in the provisionin provisioning custom resource
  3. Instantiate the binary package installation and get the status of the installation
  4. Get application-k8s kubeconfig file
  5. BPA is also expected to store any private key and secret information in CSM
  6. Install the packages on newly added compute nodes
  7. Update package versions in compute nodes that require the update
  8. Store private keys 

...

Workflow Summary/Description

  1. Create BPA Provisioning CRD (Created only once and just creates the BPA resource kind)and Software CRD
  2. Start the BPA controller (It then watches
  3. Create the BPA Custom Resource

  4. The BPA Operator continues to watch the k8s API server and once it sees that a new BPA CR object has been created, it queries the k8s API server for the Baremetal hosts lists. The baremetal hosts lists contains information about the compute nodes provisioned including the IP address, CPU, memory..etc of each host.

  5. The BPA operator looks into the baremetal hosts list and knows which hosts should be master and which should be workers. As the master and worker fields have various parameters, it can do this in various ways;

    1. If the MAC address is provided in the BPA CR object, it compares that value with the value in the hosts list and assigns the roles. For example if a mac address of 00:c5:16:05:61:b2 is specified for master in the BPA CR spec, it checks the baremetal list for a host that has that MAC address and gives it the role of master.
    2. If there is no MAC address specified but just resources, it checks the baremetal list for hosts that meet the resource requirements
    3. If both MAC address and resource requirements are provided, it finds the host with the specified MAC address and confirms that the host meets the resource requirement provided in the BPA CR and then assigns the role.
  6. Using the MAC address of the host, the BPA operator looks in the DHCP file of the DHCP server running on the same host it is running and determines the IP address that corresponds to that MAC address
  7. The BPA operator reads a file containing the default username and password for the various hosts, copies its public key to those hosts in order to use kubespray later.
  8. The BPA operator then creates the hosts.ini file using the assigned roles and their corresponding IP addresses.

  9. The BPA operator then installs kubernetes using kubespray on the compute nodes thus creating an active kubernetes cluster. During installation, it would continue to check the status of the installation

  10. On successful completion of the k8s cluster installation, the BPA operator would  save the application-k8s kubeconfig file in order to access the k8s cluster and make changes such as software updates or add a worker node for future purposes.

...