From 1cc6192cd8068b300daaedc87c6a7ecff2e06e01 Mon Sep 17 00:00:00 2001 From: Ricardo Noriega Date: Thu, 30 Jan 2020 16:57:13 +0100 Subject: [PATCH] Add support for Google Cloud Platform deploys Signed-off-by: Ricardo Noriega Change-Id: I98755a45b8f07111938a692bfbfccb6ad05b3358 --- README.md | 17 +++++++++++++++++ pkg/site/site.go | 3 +++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index d7d4338..b62243a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,23 @@ aws_secret_access_key=xxxx Please look at [https://docs.openshift.com/container-platform/4.1/installing/installing_aws/installing-aws-account.html](https://docs.openshift.com/container-platform/4.1/installing/installing_aws/installing-aws-account.html) +In the case of Google Cloud Platform deployments, create a $HOME/.gcp directory, with a **service account** file on it. This file needs to be named as **osServiceAccount.json** and have something like: + +{ + "type": "service_account", + "project_id": "openshift-gce-devel", + "private_key_id": "xxxxxxxxxxx", + "private_key": "xxxxxxxxxxxxxx", + "client_email": "xxxxx@xxxx.xxx", + "client_id": "xxxxx", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxxxxxxx@xxxxxxxxx.xxx" +} + +To get this service account JSON file, you will need to create an account in GCP, and get it in the APIs & Services section. Take into account that a service account is always coupled to a specific project. That project name will have to be the same in this file as well as in the install-config that will be configured as part of our site configuration. + In the case of libvirt, a helper script can be executed to prepare the installer for acting as a virthost. You can execute **utils/prep_host.sh** script to properly configure your server to install OpenShift on libvirt. In the case of baremetal, please check [https://docs.openshift.com/container-platform/4.1/installing/installing_bare_metal/installing-bare-metal.html](https://docs.openshift.com/container-platform/4.1/installing/installing_bare_metal/installing-bare-metal.html) in order to prepare your environment for the deployment. diff --git a/pkg/site/site.go b/pkg/site/site.go index 29034ae..ff0c61f 100644 --- a/pkg/site/site.go +++ b/pkg/site/site.go @@ -642,6 +642,9 @@ func (s Site) getProfileType(profileName string) (string, error) { case "aws": profileType = "aws" break + case "gcp": + profileType = "gcp" + break case "libvirt": profileType = "libvirt" break -- 2.16.6