Setup and deployment infrastructure using Terraform and Helm to manage volumes and Circles services with Kubernetes on DigitalOcean.
do-infra-setup: Terraform files to deploy Circles staging and production infrastructure on DigitalOceanhelm/circles-infra-suite: Helm chart and templates to deploy Circles services from Docker imagessecrets: Helpers to create secrets on Kubernetes cluster
- Use terraform
do-infra-setupto provision a Kubernetes cluster, PostgreSQL database, NFS Provisioner, Ingress controller and LetsEncrypt issuer on DigitalOcean - Create required secrets via
secretshelper tools - Use helm
helm/circles-infra-suiteto deploy Circles services on Kubernetes cluster
- Follow all steps to create new releases and docker images of
circles-apiandsafe-relay-service. - Make sure the docker images are uploaded and ready in the Digital Ocean registry, this might take a few minutes.
- Change the values in the regarding
imageTagfield forstagingandproductionto the versions you want to release. - Make sure you're using the right Kubernetes context (staging / production cluster) via
kubectl config current-context. You can switch the context viakubectl config use-context <name>. - Run
./helm-upgrade.sh <production|staging>to apply the changes on the Kubernetes cluster.
This setup requires the following Secret objects to be created on the Kubernetes cluster. Check secrets for further helper tools to maintain secrets:
relayer:
SAFE_FUNDER_PRIVATE_KEY: Wallet with funds to pay for Safe creationSAFE_TX_SENDER_PRIVATE_KEY: Wallet with funds to pay for transactionsDJANGO_SECRET_KEY: Hashing salt for Relayer Django app
aws:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
db:
POSTGRES_HOSTPOSTGRES_PASSWORDPOSTGRES_PORTPOSTGRES_USER
Circles repositories automatically build and upload Docker images of their latest versions. These images are available in our DigitalOcean registry and publicly on DockerHub.
In case you don't want to deploy Circles infrastructure with DigitalOcean and Kubernetes you can have a look at our circles-docker repository which allows a similar setup with docker-compose for local development and easier production server deployments.
GNU Affero General Public License v3.0 AGPL-3.0