<commit_before># Deploy Cloud Robotics Core from sources

Estimated time: 30 min

This page describes how to set up a Google Cloud Platform (GCP) project
containing the Cloud Robotics Core 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][resource-manager] page and
   select or create a project.
1. Make sure that [billing][modify-project] is enabled for your project.
1. [Install the Cloud SDK][cloud-sdk]. When prompted, choose the project that you created above.
1. After installing the Cloud SDK, install the `kubectl` command-line tool:

    ```shell
    gcloud components install kubectl
    ```

    If you're using Debian or Ubuntu, you may need to use `apt install kubectl` instead.

1. [Install the Bazel build system][install-bazel].

1. Install additional build dependencies:

    ```shell
    sudo apt-get install default-jdk git python-dev unzip xz-utils
    ```

[resource-manager]: https://console.cloud.google.com/cloud-resource-manager
[modify-project]: https://cloud.google.com/billing/docs/how-to/modify-project
[cloud-sdk]: https://cloud.google.com/sdk/docs/
[install-bazel]: https://github.com/bazelbuild/bazel/blob/0.22.0/site/docs/install-ubuntu.md

## Build and deploy the project

1. Clone the source repo.

    ```shell
    git clone https://github.com/googlecloudrobotics/core
    cd core
    ```

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

    ```shell
    gcloud auth application-default login<commit_msg>Add docker auth step to instructions.<commit_after># Deploy Cloud Robotics Core from sources

Estimated time: 30 min

This page describes how to set up a Google Cloud Platform (GCP) project
containing the Cloud Robotics Core 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][resource-manager] page and
   select or create a project.
1. Make sure that [billing][modify-project] is enabled for your project.
1. [Install the Cloud SDK][cloud-sdk]. When prompted, choose the project that you created above.
1. After installing the Cloud SDK, install the `kubectl` command-line tool:

    ```shell
    gcloud components install kubectl
    ```

    If you're using Debian or Ubuntu, you may need to use `apt install kubectl` instead.

1. [Install the Bazel build system][install-bazel].

1. Install additional build dependencies:

    ```shell
    sudo apt-get install default-jdk git python-dev unzip xz-utils
    ```

[resource-manager]: https://console.cloud.google.com/cloud-resource-manager
[modify-project]: https://cloud.google.com/billing/docs/how-to/modify-project
[cloud-sdk]: https://cloud.google.com/sdk/docs/
[install-bazel]: https://github.com/bazelbuild/bazel/blob/0.22.0/site/docs/install-ubuntu.md

## Build and deploy the project

1. Clone the source repo.

    ```shell
    git clone https://github.com/googlecloudrobotics/core
    cd core
    ```

1. Create application default credentials, which are used to deploy the cloud project and
   authorize access to the cloud docker registry.

    ```shell
    gcloud auth application-default login
    gcloud auth configure-docker
{'fraction_non_alphanumeric': 0.08807439824945296, 'fraction_numerical': 0.012035010940919038, 'mean_word_length': 3.941891891891892, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3291458', 'n_tokens_mistral': 1098, 'n_tokens_neox': 1008, 'n_words': 427}