gcloud container clusters create hilltop \
--num-nodes=3 --zone us-central1-a --machine-type g1-small
gcloud compute disks create pg-data-disk --size 50GB --zone us-central1-a
Relevant: https://stackoverflow.com/questions/59337139/crashloopbackoff-postgres-gcp
TLDR: the pv and pvc need to be created before the pod is deployed
kubectl apply -f ./postgres/k8s/dev/
kubectl get pods
kubectl exec -it <postgres pod> bash
createdb -U sample hilltop
kubectl apply -f ./postgres/k8s/dev/
kubectl get pods
kubectl exec -it <postgres pod> bash
psql -h localhost -U sample --password
export DATABASE_URL=postgres://sample:pleasechangeme@localhost:5432/hilltop prisma migrate save --experimental
kubectl get pods kubectl exec yarn migrate-up
kubectl get pods kubectl exec yarn seed
kubectl config get-contexts
kubectl config use-context CONTEXT_NAME
skaffold run
kubectl get pods
kubectl exec -it <postgres pod name> bash
psql -h localhost -U sample --password hilltop
brew install kubectl
brew install minikube
Latest installation instructions here: https://skaffold.dev/docs/install/
minikube start
skaffold dev --port-forward
If developing against specific services, can use skaffold dev -p slim --port-forward
(and update profile accordingly)
(port forwarding is off by default)
docker rmi $(docker images |grep 'gcr.io/hilltop-285223/hilltop-rest-api')
docker rmi $(docker images |grep 'gcr.io/hilltop-285223/hilltop-web')
bull-repl
connect -h ec2-54-243-74-201.compute-1.amazonaws.com -p 17669 --password p393a70f1ea5a26afb1e6ab8ff54e768c708a40e8e3b929ec5cdb421b91943114 -d 0 "flowQueue"
A separate auth0 application (hilltopTest) and API (https://hilltopTest) are used in jest tests. The 'Blue admin' user has authorized with this application and a token is fetched and set as an env variable on setup of the jest environment