IBM Cloud Docs
Attaching IBM Cloud hosts for tests

Attaching IBM Cloud hosts for tests

Test out an IBM Cloud Satellite® location with virtual instances that you created in IBM Cloud.

Testing only: Satellite is an extension of IBM Cloud into other infrastructure providers. As such, adding IBM Cloud infrastructure hosts to Satellite is supported only for testing, demo, or proof of concept purposes. For production workloads in your Satellite location, use on-premises, edge, or other cloud provider hosts. You can also create Red Hat OpenShift on IBM Cloud clusters in the public cloud and add them to a Satellite Config cluster group to deploy the same app across your Satellite and IBM Cloud clusters. At this time, Satellite Locations and Satellite Connectors are generally not recommended for use within IBM Cloud except for specific use cases. Contact your IBM account team if you believe you need this support for your solution.

To attach Red Hat CoreOS (RHCOS) hosts, your location must be enabled for Red Hat CoreOS. For more information, see Is my location enabled for Red Hat CoreOS?. Note that you can still attach Red Hat Enterprise Linux hosts to a location that is enabled for Red Hat CoreOS.

Before you begin, make sure that you create host machines that meet the minimum hardware requirements in your on-prem data center, in IBM Cloud, or in public cloud providers.

After you attach a host to your location, Satellite disables the ability to log in to the host as root with SSH for security purposes. You might see error messages if you try to SSH as root into a host that is attached successfully to a location. To restore the ability to SSH into the machine, you can remove the host and reload the operating system.

Not sure how many hosts to attach to your location? See Sizing your Satellite location.

Manually adding IBM Cloud RHEL hosts to Satellite

You can create your Satellite location by using hosts that you added from IBM Cloud.

All hosts that you want to add must meet the general host requirements, such as the RHEL 8 packages and networking setup. For more information, see Host requirements.

Before you begin, create a Satellite location.

  1. Follow the steps to create a classic public virtual server or a virtual server instance in a VPC. Make sure that you select a supported RHEL 8 operating system or a supported Red Hat CoreOS (RHCOS) image, configure the machine with at least 4 CPU and 16 RAM, and add a boot disk with a size of at least 100 GB.

  2. Wait for your virtual server instance to be provisioned.

  3. Get the registration script to attach hosts to your IBM Cloud Satellite location. Note that the token in the script is an API key, which should be treated and protected as sensitive information. Make a note of the location of the attach script. Also note that for RHEL-based hosts, the attach script is a Shell script.

    ibmcloud sat host attach --location <location_name_or_ID>
    
  4. Retrieve the IP address and ID of your machine.

    • Classic
      ibmcloud sl vs list
      
    • VPC
      ibmcloud is instances
      
  5. Retrieve the credentials to log in to your virtual machine.

    • Classic
      ibmcloud sl vs credentials <vm_ID>
      
    • VPC
      ibmcloud is instance-initialization-values <instance_ID>
      
  6. Copy the script from your local machine to the virtual server instance.

    scp <path_to_attachHost.sh> root@<ip_address>:/tmp/attach.sh
    

    If you use an SSH key to log in, make sure to convert the key to .key format and use the following command.

    scp -i <filepath_to_key_file.key> <filepath_to_script> <username>@<IP_address>:/tmp/attach.sh
    
  7. Log in to your virtual machine. If prompted, enter the password that you retrieved earlier.

    ssh root@<ip_address>
    

    If you use an SSH key to log in, use the following command.

    ssh -i <filepath_to_key_file.key> <username>@<IP_address>
    
  8. Refresh the Red Hat packages on your machine.

    subscription-manager refresh
    
  9. Enable the package repositories on your machine.

    • RHEL 7:
      subscription-manager repos --enable rhel-server-rhscl-7-rpms
      subscription-manager repos --enable rhel-7-server-optional-rpms
      subscription-manager repos --enable rhel-7-server-rh-common-rpms
      subscription-manager repos --enable rhel-7-server-supplementary-rpms
      subscription-manager repos --enable rhel-7-server-extras-rpms
      
    • RHEL 8 classic:
      subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms
      subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms
      
    • RHEL 8 VPC:
      subscription-manager release --set=8
      subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms 
      subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms
      subscription-manager repos --disable='*eus*'
      yum install container-selinux -y
      
  10. Run the registration script on your machine.

    nohup bash /tmp/attach.sh &
    
  11. Monitor the progress of the registration script.

    journalctl -f -u ibm-host-attach
    
  12. Exit the SSH session.

    exit
    
  13. Check that your hosts are shown in the Hosts tab of your Satellite console. All hosts show a Health status of Ready when a connection to the machine can be established, and a Status of Unassigned as the hosts are not yet assigned to your Satellite location control plane or a Red Hat OpenShift on IBM Cloud cluster.

  14. Assign your hosts to the Satellite control plane or a Red Hat OpenShift on IBM Cloud cluster.

Manually adding IBM Cloud RHCOS hosts to Satellite

You can create your Satellite location with hosts that you added from IBM Cloud.

All hosts that you want to add must meet the general host requirements, such as the RHEL 8 packages and networking setup. For more information, see Host requirements.

Before you begin, create a Satellite location.

  1. Get the registration script to attach hosts to your IBM Cloud Satellite location. Note that the token in the script is an API key, which should be treated and protected as sensitive information. Make a note of the location of the attach script. Also note that for RHCOS hosts, the attach script is a RHCOS ignition file.

    ibmcloud sat host attach --location <location_name_or_ID>
    
  2. Download the Red Hat CoreOS image that you want to use. Use IBM Cloud Object Storage to store your custom image. If you don't already have an instance, create one and create at least one bucket.

  3. Upload the RHCOS image that you downloaded earlier to a bucket in your Object Storage instance. You can use the Minio command-line client to copy your image from a directory on your local machine to your bucket. First, create a set of HMAC service credentials and make a note of the access_key_id and secret_access_key. Then, install the Minio client and configure it to use your credentials.

  4. Grant access to Object Storage.

  5. Import your custom RHCOS image in VPC. You can create custom images in the VPC console.

  6. Give your image a Name, select the Resource group where you want to create the image and select Cloud Object Storage

  7. In the Cloud Object Storage instances section, select your instance, location, and the bucket where you uploaded your image.

  8. In the Operating system section, select Red Hat Enterprise Linux, then select fedora-coreos-stable-amd64.

  9. Select the Encryption that you want to use and click Create custom image.

  10. Using your custom image, create VPC Gen 2 instances and attach them to your RHCOS enabled location. Note that the ATTACH-SCRIPT-LOCATION parameter is the location of the ignition file you retrieved earlier by running the ibmcloud sat host attach command. Make sure to include the @ sign before the path to your ignition file.

    ibmcloud is instance-create INSTANCE-NAME VPC VPC-ZONE-NAME VPC-PROFILE-NAME VPC-SUBNET --image VPC-RHCOS-IMAGE-ID --user-data @ATTACH-SCRIPT-LOCATION --keys SSH-KEY-ID
    

    Example command to create VPC Gen 2 instances and attach hosts to Red Hat CoreOS enabled location. For more information, about the instance create command, see the VPC Gen 2 command line reference.

    ibmcloud is instance-create instance-1 my-vpc us-south-1 bx2d-4x16 0111-11e11111-1c11-1111-11aa-ba1a1d1cd111 —-keys my-key --image r001-a1f111b1-11bc-1e1e-b11c-1d11c1111111 --user-data @/var/register-host_coreos.ign
    
  11. Repeat the previous step to create VPC Gen 2 instances for each host that you want to attach. Plan to attach at least 3 hosts to use in the control plane, and attach additional hosts for any services that you want to use.

  12. Check that your hosts are shown in the Hosts tab of your Satellite console. All hosts show a Health status of Ready when a connection to the machine can be established, and a Status of Unassigned as the hosts are not yet assigned to your Satellite location control plane or a Red Hat OpenShift on IBM Cloud cluster.

  13. Assign your hosts to the Satellite control plane or a Red Hat OpenShift on IBM Cloud cluster.

I added hosts to my location, what's next?

Now that you added hosts to your location, you can assign them to your location control plane or to your IBM Cloud services.

  1. Assign hosts to the location control plane or to your IBM Cloud services.
  2. Create a Satellite-enabled IBM Cloud service, such as a Red Hat OpenShift cluster. You can even register existing Red Hat OpenShift clusters to your location to use as deployment targets.
  3. Manage your applications with Satellite Config.
  4. Create Satellite cluster storage templates.
  5. Learn more about the Satellite Link component and how you can use endpoints to manage the network traffic between your location and IBM Cloud.

Need help? Check out Getting support where you can find information about cloud status, issues, and logging; contacting support; and setting your email notification preferences for IBM Cloud platform-related items.