Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 976 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 976 Bytes

Managed Postgres Instance

In order to maintain state we use a managed Postgres instance in Google Cloud. You can create it here Our instance at Project EPIC had the following configuration:

  • Database version: PostgreSQL 9.6
  • Region:us-central1
  • Zone: us-central1-c
  • Instance ID: epic-event
  • Private and public IP enabled
  • Memory: 3.75 Gb
  • CPU: 1 vCPU
  • Storage: 10 GB in SSD
  • No backups
  • Single zone availability (reduces costs)

Remember to set the password and user (postgres by default) in the corresponding Kubernetes secret.

Connect to DB

gcloud sql connect epic-event --user=postgres --quiet

DB and table creation

  1. Create databases
CREATE DATABASE annotationsdb;
CREATE DATABASE eventsdb;
  1. Create annotations tables (see annotationsdb.sql)
  2. Create events tables (see eventsdb.sql)