pulumi-aws-backend
v1.0.1
Published
This template deploys an example Django backend api into EKS.
Downloads
8
Readme
Deploy backend app to EKS.
This template deploys an example Django backend api into EKS.
Following AWS products are being used:
- Amazon Elastic Kubernetes Service managed container service to run and scale Kubernetes applications
- Amazon Application Load balancer Load balance HTTP and HTTPS traffic with advanced request routing targeted at the delivery of modern applications.
- Amazon Elastic Container Registry is a fully managed Docker container registry that makes it easy to store, share, and deploy container images.
- Amazon Relational Database service is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud. Choose from seven popular engines
Following Kubernetes resources are being used:
TODO
Getting Started
Install prerequisites with:
npm install
Configuration
Configure the template using pulumi config set dirname:key value
Example:
pulumi config set backend-api-aws:clusterName david-eks
EKS config
| Name | Type | Required | Description |
|-------------------|---------|----------|---------------------------------------|
| clusterName
| string | Yes | Cluster name EKS |
| port
| number | Yes | Port number of the app being deployed
| imageUrl
| string | Yes | Image url that is located inside ECR
| replica
| number | Yes | Amount of replicas in k8s app |
| deployDashboard
| boolean | Yes | Enable kubernetes dashboard |
RDS config
| Name | Type | Required | Description |
| ------------------------- |--------|----------|-------------------------------------------------------------------------|
| dbName
| string | Yes | Database name (must begin with a letter and contain alphanumeric chars) |
| engine
| string | Yes | SQL engine, just try the default "postgres" havent tried others
| userName
| string | Yes | Database user
| password
| string | Yes | Database password |
TODO in future
- Swap out Helm chart for native pulumi ALB
- Fix A record for the ALB to make backend domain more nice
- Fix HTTPS so it can be connected to the deployed frontend from the other template
- ECR hardcoded, maybe fix in future?