View on GitHub

core

Cloud Robotics Core: Kubernetes, Federation, App Management

Quickstart

Estimated time: 10 min

This page describes how to set up a Google Cloud Platform (GCP) project containing the Cloud Robotics Core (CRC) components. In particular, this creates a cluster with Google Kubernetes Engine and prepares it to accept connections from robots, which enables those robots to securely communicate with GCP. The commands were tested on machines running Debian (Stretch) or Ubuntu (16.04 and 18.04) Linux.

  1. In the GCP Console, go to the Manage resources page and select or create a project.
  2. Make sure that billing is enabled for your project.
  3. Install the Cloud SDK. When prompted, choose the project you created above.
  4. After installing the Cloud SDK, install the kubectl command-line tool:

     gcloud components install kubectl gke-gcloud-auth-plugin
    

    If you’re using Cloud Shell, Debian, or Ubuntu, you may need to use apt instead:

     apt-get install kubectl google-cloud-sdk-gke-gcloud-auth-plugin
    
  5. Install tools required for installation:

     sudo apt-get install curl tar xz-utils
    

Deploy the project

  1. Create application default credentials, which are used to deploy the cloud project.

     gcloud auth application-default login
    
  2. Create a directory for CRC installer.

     mkdir cloud-robotics
     cd cloud-robotics
    
  3. Set your GCP project ID as an environment variable.

     export PROJECT_ID=[YOUR_GCP_PROJECT_ID]
    
  4. Install the latest nightly build into your GCP project by running the install script. Accept the default configuration by hitting ENTER on all questions; you can change the settings later.

     curl -fS "https://storage.googleapis.com/cloud-robotics-releases/run-install.sh" >run-install.sh
     bash ./run-install.sh $PROJECT_ID
    

The install script created a Kubernetes cluster using Google Kubernetes Engine and used Synk to install the Cloud Robotics Core component helm charts. You can browse these components on the Workloads dashboard. Alternatively, you can list them from the console on your workstation:

$ kubectl get pods

NAME                READY   STATUS             RESTARTS   AGE
cert-manager-xxx    1/1     Running            0          1m
nginx-ingress-xxx   1/1     Running            0          1m
oauth2-proxy-xxx    0/1     CrashLoopBackOff   4          1m
token-vendor-xxx    1/1     Running            0          1m

Note Unless you already set up OAuth, the oauth2-proxy will show an error which we will ignore for now.

In addition to the cluster, the install script also created:

Update the project

To update your Cloud Robotics configuration, run the install script with the --set-config flag.

bash ./run-install.sh $PROJECT_ID --set-config

This command only updates the config but does not update your cloud project. To update the installation to the latest version and apply config changes, run the installer again.

bash ./run-install.sh $PROJECT_ID

If you deleted the install scipt or you want to run an update from another machine which has the Cloud SDK installed, simply run:

curl -fS "https://storage.googleapis.com/cloud-robotics-releases/run-install.sh"\
    | bash -s -- $PROJECT_ID

Clean up

The following command will delete:

This can be useful if the cluster is in a broken state. Be careful with this invocation, since you’ll have to redeploy the project and reconnect any robots afterwards.

curl -fS "https://storage.googleapis.com/cloud-robotics-releases/run-install.sh"\
    | bash -s -- $PROJECT_ID --delete

Known issue After deleting CRC from your project, the endpoint services will be in a “pending deletion” state for 30 days. If you want to reinstall CRC into the same project again, you have to undelete the services manually.

If you want to completely shut down the project, see the Resource Manager documentation.

Next steps