Attaching Google Cloud Platform (GCP) hosts
Learn how attach Google Cloud Platform (GCP) virtual instances to your IBM Cloud Satellite location.
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 hosts to Satellite in the GCP console
You can create your Satellite location by using hosts that you added from Google Cloud Platform (GCP).
If you want to use Red Hat CoreOS (RHCOS) hosts in your location, provide your RHCOS image file to your Google account. For more information, see Creating custom images. To find RHCOS images, see the list of available images. Note that you must use at least version 4.9.
Before you begin, create a Satellite location.
-
From the Satellite console, select the location where you want to add GCP hosts.
-
Retrieve the host registration script that you must run on your hosts to make them visible to your IBM Cloud Satellite location.
- From the Hosts tab, click Attach host.
- Optional: Enter any host labels that are used later to automatically assign hosts to Satellite-enabled IBM Cloud services in the location. Labels must be provided as key-value
pairs, and must match the request from the service. For example, you might have host labels such as
env=prod
orservice=database
. By default, your hosts get acpu
label, but you might want to add more to control the auto assignment, such asenv=prod
orservice=database
. - Enter a file name for your script or use the name that is generated for you.
- 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 should be treated and protected as sensitive information.
-
RHEL hosts only Open the registration script. After the
API_URL
line, add a section to pull the required RHEL packages with the subscription manager.# Enable GCP RHEL package updates yum update --disablerepo=* --enablerepo="*" -y yum repolist all yum install container-selinux -y yum install subscription-manager -y
-
From the GCP main menu, navigate to the Compute Engine dashboard and select Instance templates.
-
Click Create instance template.
-
Enter the details for your instance template as follows.
For an overview of available options when creating an instance template, see the GCP documentation.
- Enter a name for your instance template.
- In the Machine configuration section, select the Series and Machine type that you want to use. You can select any series that you want, but make sure that the machine type meets the minimum host requirements for CPU and memory.
- In the Boot disk section, click Change to change the default operating system and boot disk size. Make sure to select Red Hat Enterprise Linux 8 as your operating system for Red Hat Enterprise Linux or the Red Hat CoreOS image that you provided earlier and to change your boot disk size to a minimum of 100 GB.
- Optional: If you want your machines to allow HTTP and HTTPS traffic, select Allow HTTP traffic and Allow HTTPS traffic from the Firewall section of your instance template.
- Click Management, security, disks, networking, sole tenancy to view additional networking and security settings.
- In the Management tab, locate the Startup script field and enter the registration script that you modified earlier.
- In the Networking tab, choose the network that you want your instances to be connected to. This network must allow access to IBM Cloud Satellite as described in Firewall settings. You can check and change the firewall settings for your network in the next step.
- Click Create to save your instance template.
-
Optional: Update the firewall settings for the network that you assigned to your instance template. 9. From the GCP main menu, navigate to the VPC Network dashboard and select Firewall. 10. Verify that your network allows access as describe in the Network firewall settings. Make changes as necessary.
-
From the GCP Compute Engine dashboard, select Instance templates and find the instance template that you created.
-
From the actions menu, click Create VM to create an instance from your template. You can alternatively click Create Instance Group to create an instance group to add multiple instances at the same time. Make sure that you spread your instances across multiple zones for higher availability.
-
Wait for the instance to create. During the creation of your instance, the registration script runs automatically. This process takes a few minutes to complete. You can monitor the progress of the script by reviewing the logs for your instance. 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 ofUnassigned
as the hosts are not yet assigned to your Satellite location control plane or a Red Hat OpenShift on IBM Cloud cluster. -
Assign your GCP hosts to the Satellite location control plane or a Red Hat OpenShift on IBM Cloud cluster.
Manually ordering hosts with the gcloud
CLI
When you order your instances, pass the --metadata-from-file user-data
option and include your attach script. For more information, see the gcloud compute instances create
command reference.
Example command to order and attach GCP VMs to your Satellite location.
gcloud compute instances create INSTANCE-1 INSTANCE-2 INSTANCE-3 --machine-type=n2-standard-8 --source-instance-template INSTANCE-TEMPLATE --metadata-from-file user-data=ATTACH-SCRIPT-LOCATION --zone ZONE --image-family=IMAGE-FAMILY --image-project=IMAGE-PROJECT
Network firewall settings
As described in the host networking requirements, your GCP hosts must have access to connect to IBM Cloud Satellite. You might find that you need to update your firewall settings in GCP, similar to the following example.
Network default
Priority 1000
Direction Ingress
Action on match Allow
Targets
Target tags
satellite
Source filters
IP ranges
0.0.0.0/0
Protocols and ports
tcp:80
tcp:443
tcp:30000-32767
udp:30000-32767
For more information, see VPC firewall rules overview in the Google Cloud Platform documentation.
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.
- Assign hosts to the location control plane or to your IBM Cloud services.
- 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.
- Manage your applications with Satellite Config.
- Create Satellite cluster storage templates.
- 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.