Skip to content

getcampo/campo-gcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Campo Gcloud

Campo Google Cloud deploy example.

Usage

Create Cluster

Create an independent Google Cloud Kubenetes Cluster, or you will need to add namespace config.

Creating a Container Cluster

Connect to cluster with kubectl.

Create Postgres Instance

Create Google Cloud SQL Postgres instance, Database user and password, and SQL service account. Put service account credential file at secrets/cloudsql/credentials.json.

Connecting from Kubernetes Engine

Create secret:

$ kubectl create secret generic cloudsql-secrets --from-file=secrets/cloudsql/credentials.json

Replace [INSTANCE_CONNECTION_NAME] with real connection name in web.yaml, and [DATABASE_URL] with real connection url in Campo .env.

Campo ENV

Edit Campo .env file, put it at secrets/app/env.

Create secret:

$ kubectl create secret generic app-secrets --from-file=secrets/app/env

TLS Certificate (Optional)

If you want to protect by TLS, add certificate to secrets/ingress/tls.crt and private key to secrets/ingress/tls.key.

Create secret:

$ kubectl create secret generic ingress-secrets --from-file=secrets/ingress/tls.crt --from-file=secrets/ingress/tls.key

Uncomment tls settings in ingress.yaml:

tls:
  - secretName: ingress-secrets

Push docker image

There is no official image now, so build and push Campo image to your own docker registry.

Replace [IMAGE_NAME] with real image path in web.yaml.

Create static IP

Create static IP and replace [STATIC_IP_NAME] in ingress.yaml.

Configuring a static IP address

Deploy

Run:

$ kubectl apply -f redis.yaml -f web.yaml -f ingress.yaml

About

Campo gcloud deploy example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published