Prepare Alauda OS for Hosts
A host joins the platform by booting from an ISO. On this page, you build that ISO: one registration and one ISO for each OS and architecture of your hosts. One registration serves the hosts of its OS and architecture for every workload cluster. Do this before you register the hosts.
Meet the Bare Metal prerequisites first. Run the ac commands on this page from a machine where ac is logged in to the platform.
Find your case, and follow its sections:
TOC
Generate the CommandsPush the OS ImagesAdd the Image Catalog KeysCreate the Registration and the ISOVerify the ISORebuild the ISONext StepsGenerate the Commands
Fill in the generator below, once for each OS:
The generator prints these outputs:
- Push the OS images: see Push the OS Images.
- Add the image catalog keys: see Add the Image Catalog Keys.
- For each architecture, Registration file and Create the registration and build the ISO: see Create the Registration and the ISO.
For the registry of the global cluster, run ac config use-cluster global, then ac -n cpaas-system get secret public-registry-credential -o jsonpath='{.data.registry}' | base64 -d.
An OS image tag is the file name of its OS archive without .tar, and the tag of both images of the archive.
Push the OS images
Add the image catalog keys
Registration file
Create the registration and build the ISO
Push the OS Images
Download the OS archive of each architecture for the ACP version; see Downloading Alauda OS.
Run Push the OS images as root, one block for each architecture, on a Linux host that meets these conditions:
- It can reach the registry.
- It has the Core Package of the current platform version extracted. The
packtoolof this package also pushes the archives of earlier ACP versions. - It has at least as much free space in
/var/tmpas the archive size.
In the commands, <extract-dir> is the extracted installer/ directory, and <host-arch> is the architecture of the host, amd64 or arm64. Each block pushes the two images of one archive, and then lists the tags of both repositories in the registry.
- The
tkestackproject must exist in the registry. - Use a registry account that can push to the
tkestackproject. - Do not push with
docker pushor another tool that rewrites the image manifest, because the Alauda OS KU installer reads the manifest exactly as it is in the archive. - Take both images from the same archive. Do not pair images from different archives, and do not point cluster resources at a build registry.
- For a workload cluster with a dedicated registry (
cluster.registrySecretRef), push the images into that registry as well, with its address and account. Each time a host is reinstalled, it pulls the OS image that the image catalog names from the registry of the cluster; see Image Registry. - In a disaster recovery pair where the two
globalclusters use different registries, push the images into both registries.
Continue when each tags/list response includes the OS image tag. Otherwise, check the registry address, the credentials, the tkestack project, and the push output.
Add the Image Catalog Keys
The image catalog tells the provider which OS image to install on a host. Until the catalog has the key for the Kubernetes version, architecture, and OS of a host, the host waits and is not installed.
Select the global cluster, and run Add the image catalog keys:
The command adds the keys to the image catalog, keeps the existing keys, and prints the catalog. Continue when the printed catalog has the keys that you added. Otherwise, run the command again with the correct values.
In a disaster recovery pair, the image catalog is not synchronized. Run the command again for the standby global cluster: use export KUBECONFIG=<standby-kubeconfig> instead of ac config use-cluster global, and run unset KUBECONFIG afterwards.
Create the Registration and the ISO
For each architecture:
- Save the Registration file under the file name that the generator shows, for example
alaudaos-m55-amd64.yaml. Use the file as generated, with two exceptions:- For hosts of the
globalcluster, change it as described in Hosts for the global Cluster. - If the hosts need site-specific DNS settings to register on first boot, add them to
MachineRegistration.spec.config.cloud-config. Do not add/etc/resolv.conftoSeedImage.spec.cloud-config.
- For hosts of the
- Run Create the registration and build the ISO. It applies the file on the
globalcluster, waits until the ISO is built, and prints three lines: the result of the build, the download URL of the ISO, and the URL of its checksum.
Continue when the first line is SeedImageBuildSuccess and the two URLs are not empty. Then download the ISO, and verify it.
Verify the ISO
The checksum file holds the SHA-256 hash and the original file name of the ISO. The original name contains colons, which Windows does not allow in file names. The saved file therefore often has another name, and sha256sum -c cannot find it. Compare the hashes instead:
Continue when the two hashes are the same. Otherwise, download the ISO again. On Windows, certutil -hashfile <saved-iso-file> SHA256 prints the actual hash.
Rebuild the ISO
After cleanupAfterMinutes, the URLs are cleared, but SeedImageReady can stay True. Check the reason again before you download the ISO. To get a new URL, delete the SeedImage and apply the file again:
Then repeat the wait and get commands of Create the registration and build the ISO. If you no longer have <name>.yaml, generate it again as described in Generate the Commands, with the same ACP version and OS image tag.
Hosts that have already booted the old ISO continue to register. Boot the remaining hosts from the new ISO.