Example on deploying Hasura on AWS EKS using Pulumi
- AWS VPC
- AWS ECR Container for Hasura (with Migrations)
- AWS EKS Kubeternetes Cluster
- AWS RDS PostgreSQL Instance
- No public access only access allowed from EKS Cluster using Securtiy Group.
- AWS ElasticCache Redis Instance
- No public access only access allowed from EKS Cluster using Securtiy Group.
- Namespace
- Hasura Instance
- Hasura Backend Plus
- Secrets Including Postgres and Redis Connection details
- Nginx Ingress (Using Helm)
- GitHub Actions
- Deployment of Dockerised Node App (using ECR) for Hasura Event Triggers
- Automatic SSL/certs
cd infrastructure
pulumi up
pulumi stack output kubeconfig > kubeconfigs/test.json
KUBECONFIG=./kubeconfigs/test.json kubectl get pods --namespace=`pulumi stack output namespace`
KUBECONFIG=./kubeconfigs/test.json kubectl scale deployment/hasura --replicas=2 --namespace=`pulumi stack output namespace`
KUBECONFIG=./kubeconfigs/test.json kubectl get ingresses --namespace=`pulumi stack output namespace`
curl -H 'Host: graphql.pulumi.demo.com' <YOUR_INGRESS_ADDRESS>/healthz
curl -H 'Host: auth.pulumi.demo.com' <YOUR_INGRESS_ADDRESS>/healthz
curl --location --request POST '<YOUR_INGRESS_ADDRESS>/auth/local/register' \
--header 'Host: auth.pulumi.demo.com' \
--header 'Content-Type: application/json' \
--header 'Cache-Control: no-cache' \
--data-raw '{
"username": "testuser",
"password": "testpassword"
}'
curl --location --request POST '<YOUR_INGRESS_ADDRESS>/auth/local/login' \
--header 'Host: auth.pulumi.demo.com' \
--header 'Content-Type: application/json' \
--header 'Cache-Control: no-cache' \
--data-raw '{
"username": "testuser",
"password": "testpassword"
}'
pulumi destroy --yes