Downloading the host attachment script for your location
To attach hosts to your location, you must download a host attachment script. After you download the script, you can run it on your hosts to attach them to your location. You can get the attachment script from the console or by running the sat host attach
command.
When you attach a host with a Red Hat CoreOS (RHCOS) operating system, the attachment script is an ignition (.ign
) file. When you attach a host with a RHEL operating system, the attachment script is a Shell script.
When you download the host attachment script for your location, it contains a unique token that expires after 1 year. Plan to regenerate this token by downloading a new host attachment script at least once per year. For more information, see
Why is my host attach failing with error message A0029 Access denied to specified controller
?
Download the host attachment script from the console
- Navigate to the Locations dashboard, select the location where you want to attach hosts.
- From the Hosts tab, click Attach host.
- Optional: Enter any labels that you want to add to your hosts so that you can identify your hosts more easily later. Labels must be provided as key-value pairs. For example, you can use
use=satcp
oruse=satcluster
to show that you want to use these hosts for your Satellite control plane or a Red Hat OpenShift cluster. By default, your hosts get acpu
, anos
, and amemory
label, but you might want to add more to control the auto assignment, such asenv=prod
orservice=database
. Note that the default value foros
isrhel
. - Enter a file name for your script or use the name that is generated for you.
- Select RHEL or RHCOS to download the host script for your host system.
- Click Download script to generate the host script and download the script to your local machine. Note that the token in the script is an API key, which must be treated and protected as sensitive information.
Download the host attachment script from the CLI
Generate the host attachment script to from the CLI with the sat host attach
command. You can specify the host operating system by using the --operating-system
command option. When you run the sat host attach
command to generate the script, you can include labels that identify the purpose of the hosts, such as use:satloc
. Your hosts are automatically assigned labels for the CPU and memory size if these values can be detected on the
host machine. For more information about labels, see Using host auto assignment.
The following example host attach
command downloads a script for an RHCOS host.
ibmcloud sat host attach --location <location_name> [-hl "use=satloc"] --operating-system RHCOS
The following example host attach
command downloads a script for a RHEL host.
ibmcloud sat host attach --location <location_name> [-hl "use=satloc"] --operating-system RHEL
Example output
Creating host registration script...
OK
The script to attach hosts to Satellite location 'mylocation' was downloaded to the following location:
<filepath_to_script>/register-host_mylocation_attach_hypershift.ign
If your hosts are RHEL hosts, you must update the required packages on your hosts before you can run the script. If your hosts are running the latest Red Hat CoreOS images, you do not need to update the packages.