This is an example of how to configure and deploy a development environment that includes polyglot microservices, an GCP pub/sub topic and subscription, and an GCP storage bucket.
-
Okteto CLI 2.14 or newer
-
A GCP account
-
An Okteto account (Sign-up for 30 day, self-hosted free trial)
-
Create a service account key with create/read/write/delete permissions to pub/sub and storage of IAM keys for your GCP accoun.
-
Create the following Okteto secrets:
GCP_SERVICE_KEY: The `base64` encoded service account key with permission to create, write, read, and delete the resources. GCP_PROJECT_ID: The project id you would like to use for the external resources
If you are using Okteto Self-Hosted, you can directly use a Workload Identity
Once this is configured, anyone with access to your Okteto instance will be able to deploy an development environment automatically, including the required cloud infrastructure.
$ git clone https://github.com/okteto/external-resources-gcp
$ cd external-resources-gcp
$ okteto context use $OKTETO_URL
$ okteto deploy
$ okteto up menu
$ okteto up kitchen
$ okteto up check
This isn't an example of a properly architected perfectly designed distributed app... it's a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Okteto.