Install Portefaix

Instructions for deploying Portefaix infrastructure on GCP


Create a Google Cloud Organization using Google Workspace or Cloud Identity



Authenticate on the Google Cloud Platform:

❯ gcloud auth application-default login

❯ gcloud organizations list
xxxxxxx  xxxxxx              xxxxxxxx

Bootstrap the organization:

❯ make -f hack/build/ gcp-organization-bootstrap GCP_ORG_ID=xxxxxxxxxxx GCP_USER=xxxxxxxxxxxxxxxxx

Then go to to creates groups and create the billing account.

Then create the bootstrap project:

❯ make -f hack/build/ gcp-organization-project GCP_ORG_NAME=xxxx GCP_ORG_ID=xxxxxxxxxxx

Associate this project to the Billing Account (on GCP console or using gcloud):

gcloud alpha billing accounts projects link my-project --billing-account=xxxxxxx

Then create the bucket for boostraping the organization:

❯ make -f hack/build/ gcp-bucket GCP_ORG_NAME=xxxxxxx

Enable APIs:

❯ make -f hack/build/ gcp-enable-apis ENV=dev

Create a bucket for the Terraform tfstates:

❯ make -f hack/build/ gcp-bucket ENV=dev

Create a service account for Terraform:

❯ make -f hack/build/ gcp-terraform-sa ENV=dev

And a key:

❯ make -f hack/build/ gcp-terraform-key ENV=dev

Configure Portefaix environment file ${HOME}/.config/portefaix/

And load environment :

❯ . ./ gcp

Terraform Cloud / Github Actions

Terraform Cloud is used as the remote backend. Github Actions perform tasks to deploy the GCP infrastructure.

Configure Terraform Cloud workspaces:

❯ make terraform-apply SERVICE=terraform/gcp/terraform-cloud ENV=dev
Portefaix GCP deployment

Gitops for Kubernetes

Next: Gitops

Last modified 19.10.2022: Update: gitops link (7524a42)