Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronhayes/pulumi-hasura-aws-eks-example
Sample Pulumi Configuration to deploy Hasura to AWS EKS
https://github.com/aaronhayes/pulumi-hasura-aws-eks-example
aws aws-eks eks hasura kubernetes pulumi pulumi-kubernetes
Last synced: 26 days ago
JSON representation
Sample Pulumi Configuration to deploy Hasura to AWS EKS
- Host: GitHub
- URL: https://github.com/aaronhayes/pulumi-hasura-aws-eks-example
- Owner: aaronhayes
- License: mit
- Created: 2020-01-24T06:10:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T10:12:19.000Z (over 2 years ago)
- Last Synced: 2024-05-19T14:34:49.015Z (7 months ago)
- Topics: aws, aws-eks, eks, hasura, kubernetes, pulumi, pulumi-kubernetes
- Language: TypeScript
- Size: 315 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hasura - Pulumi AWS EKS Deployment Sample - A guide for deploying Hasura to AWS EKS using [Pulumi](https://www.pulumi.com/). (Templates and Examples)
README
# Demo Kubernetes AWS Deployment Using Pulumi
Example on deploying [Hasura](https://hasura.io/) on AWS EKS using [Pulumi](https://www.pulumi.com/)
## Requirements
1. Install [Pulumi](https://www.pulumi.com/docs/get-started/install/)
2. Install [Helm](https://helm.sh/docs/intro/install/)## Deployed Resources
- AWS VPC
- AWS ECR Container for [Hasura (with Migrations)](../hasura)
- 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.## Kubernetes Instances/Components
- Namespace
- Hasura Instance
- Hasura Backend Plus
- Secrets Including Postgres and Redis Connection details
- Nginx Ingress (Using Helm)## Planned Features
- GitHub Actions
- Deployment of Dockerised Node App (using ECR) for Hasura Event Triggers
- Automatic SSL/certs## Fun Instructions
1. `cd infrastructure`
2. `pulumi up`
3. `pulumi stack output kubeconfig > kubeconfigs/test.json`
4. `` KUBECONFIG=./kubeconfigs/test.json kubectl get pods --namespace=`pulumi stack output namespace` ``
5. `` KUBECONFIG=./kubeconfigs/test.json kubectl scale deployment/hasura --replicas=2 --namespace=`pulumi stack output namespace` ``## Accessing services
1. `` KUBECONFIG=./kubeconfigs/test.json kubectl get ingresses --namespace=`pulumi stack output namespace` ``
2. `curl -H 'Host: graphql.pulumi.demo.com' /healthz`
3. `curl -H 'Host: auth.pulumi.demo.com' /healthz`## Hasura Backend Plus Commands
### Register User
```bash
curl --location --request POST '/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"
}'
```### Login User
```bash
curl --location --request POST '/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"
}'
```## Bring Down Resources
1. `pulumi destroy --yes`