Clear Linux* OS on Google Cloud Platform*

This page explains the steps to create a virtual machine instance of Clear Linux* OS on Google Cloud Platform (GCP).

Prerequisites

  • Set up a Google account and a GCP billing account.

  • Generate and install a user SSH key in the Linux PCs that will connect to the VMs in GCP.

Setup Clear Linux OS VM on GCP

  1. Sign in to your Google* account on the Google Cloud Console:

    Sign in to Google services

    Figure 1: Google sign in screen

  2. Google Cloud Platform uses Projects to manage resources. Select or create a new project for hosting the Clear Linux OS VM.

    Note

    Refer to the Quickstart Using a Linux VM guide to learn about the process of creating VM instances on GCP.

  3. Navigate to the latest Clear Linux OS release folder to view the currently released GCE image, and download the clear-<release number>-gce.tar.gz image archive.

    You don’t need to uncompress the image archive, the intact file will be uploaded to the Google Cloud Storage later.

  4. Create a Storage Bucket for hosting the Clear Linux OS image source archive downloaded in the previous step:

    • Click the Navigation menu icon on the upper left screen menu.

    • Select the Storage item from the sidebar on the left. You will be sent to the Storage Browser tool or the Cloud Storage overview page.

    Browse Google Cloud Storage

    Figure 2: Browse Google Cloud Storage

    Note

    You may need to create a billing account and link to this project before you create a bucket.

    Cloud Storage Browser tool

    Figure 3: Cloud Storage Browser tool

    • Click the CREATE BUCKET button to enter the bucket creation tool. The bucket name must be unique because buckets in the Cloud Storage share a single global namespace.

      Leave the remaining options set to the defaults, and click the Create button at the bottom to create a Bucket.

      Set a unique bucket name

      Figure 4: Set bucket name

  5. Once the bucket is created, click the Upload files button on the Bucket details page to upload the Clear Linux OS GCE image archive to the named bucket:

    Cloud Storage bucket is available for storing objects

    Figure 5: Cloud Storage bucket

    Uploading the image source archive file

    Figure 6: Uploading the image source archive file

    Image archive imported complete

    Figure 7: Importing complete

  6. Browse the Compute Engine Image library page:

    • Click the Navigation menu icon on the upper left screen menu.

    • Select the Compute Engine ‣ Images from the side bar on the left.

      Go to Google Compute Engine Image library

      Figure 8: Image library

  7. On the Compute Engine Image library page, click the [+] CREATE IMAGE menu item to create a custom image:

    Create a Google Compute Engine image

    Figure 9: Create image

  8. In the VM image creation page, change the image source type to Cloud Storage file.

  9. Under Source, select Browse.

  10. Locate the clear-<release number>-gce.tar.gz file, and click Select.

    Create the image using the imported image archive object

    Figure 10: Create image using imported object

    Accept all default options, and click the Create button at the bottom to import the Clear Linux GCE image to the image library.

    Clear Linux Compute Engine image is created

    Figure 11: Image is created

  11. After the Clear Linux OS image is imported, you can launch a VM instance running Clear Linux OS:

    • Click the Navigation menu icon on the upper left screen menu.

    • Select Compute Engine ‣ VM Instances from the side bar on the left.

    Go to VM instances catalog

    Figure 12: VM instances catalog

  12. If no VM instance was created in this project, you will be prompted to create one.

  13. Alternatively, click the CREATE INSTANCE button on the VM instances page to create a VM instance.

    Prompt for VM creation

    Figure 13: VM creation

    List of VM instances

    Figure 14: VM instances list

    • Under Region, choose a region based on the Best practices for Compute Engine regions selection.

    • Under Boot disk, click the Change button.

      Use custom image while creating Clear Linux VM instance

      Figure 15: Use custom image

    • Select the Custom images tab for using Clear Linux OS GCE image.

      Select Clear Linux boot disk to create a VM instance

      Figure 16: Select Clear Linux boot disk to create a VM instance

    • Scroll down to the bottom of the VM instance creation page, expand the Management, security, disks, networking, sole tenancy group.

      Clear Linux requires setting up SSH keys

      Figure 17: Set up SSH keys

      Note

      Clear Linux OS does not allow SSH login with a root account by default. As a result, you must configure the VM instance with your SSH public key, so that you are able to access it remotely.

      Refer to OS Security for more details.

    • Click the Security tab, copy and paste your SSH public key:

      Set SSH key for remote login

      Figure 18: Set SSH key for remote login

      Note

      The username is assigned from characters preceding @ in the email address, included in the SSH key.

    • Click the Create button to create the Clear Linux OS VM.

  14. The Clear Linux VM instance is created and assigned a public IP address:

    Clear Linux VM instance is created and started

    Figure 19: Clear Linux VM instance is created and started

  15. You can now SSH login to the VM using the IP address obtained in the previous step, and the username associated with the SSH public key:

    SSH login to the Clear Linux VM

    Figure 20: SSH login to Clear Linux VM