Google Cloud

This chapter depicts how to Set-Up Google Cloud Source Repositories and Google Cloud Artifact Registry.

Create Service Key file

Before proceeding, ensure that you have received a Service Account Key file in JSON format from the OCS.io support team. This key file contains the credentials required to authenticate your Service Account.

Create a keyfile.json file in your deployment environment. You can use a text editor like vi to create this file:

vi keyfile.json
<< paste content of the obtained Service Account Key >>

Activate Service Account

Activating your Service Account is necessary to grant it the permissions required for accessing Google Cloud services. This step ensures that your Service Account can interact with the necessary resources.

Use the following command to activate your Service Account, replacing [SERVICE-ACCOUNT] with the email address of your Service Account and specifying the path to the Service Key file you created:

gcloud auth activate-service-account [SERVICE-ACCOUNT] --key-file=./keyfile.json

Configure Docker

To securely pull container images from Google Cloud Artifact Registry, you must configure Docker with your Google Cloud credentials.

Use the following command, replacing [REGISTRY-URL] with the URL of your Docker registry (usually provided by the OCS.io support team):

gcloud auth configure-docker [REGISTRY-URL]

These steps collectively enable secure access to your container images stored in Google Cloud. Ensure that you’ve correctly replaced placeholders like [SERVICE-ACCOUNT] and [REGISTRY-URL] with your actual Service Account details and Docker registry URL.