generated from dabble-of-devops-bioanalyze/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.yaml
188 lines (162 loc) · 8.91 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-eks-bitnami-apache-airflow
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Copyrights
copyrights:
- name: "Dabble of DevOps, SCorp"
url: "https://www.dabbleofdevops.com"
year: "2020"
# Canonical GitHub repo
github_repo: dabble-of-devops-bioanalyze/terraform-aws-eks-bitnami-apache-airflow
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-example-module.svg"
url: "https://github.com/cloudposse/terraform-example-module/releases/latest"
- name: "Discourse Forum"
image: "https://img.shields.io/discourse/https/ask.sweetops.com/posts.svg"
url: "https://ask.sweetops.com/"
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: terraform-aws-eks-autoscaling
description: Terraform module to provision an Autoscaling EKS Cluster. Acts as a wrapper around cloudposse/terraform-aws-eks-cluster and cloudposse/terraform-aws-eks-node-groups
url: https://github.com/dabble-of-devops-bioanalyze/terraform-aws-eks-autoscaling
- name: terraform-aws-eks-cluster
description: Terraform module to deploy an AWS EKS Cluster.
url: https://github.com/cloudposse/terraform-aws-eks-workers
- name: terraform-aws-eks-node-group
description: Terraform module to provision an EKS Node Group
url: https://github.com/cloudposse/terraform-aws-eks-node-group
- name: Zero to Kubernetes
description: |
JupyterHub allows users to interact with a computing environment through a webpage. As most devices have access to a web browser, JupyterHub makes it is easy to provide and standardize the computing environment for a group of people (e.g., for a class of students or an analytics team).
This project will help you set up your own JupyterHub on a cloud/on-prem k8s environment and leverage its scalable nature to support a large group of users. Thanks to Kubernetes, we are not tied to a specific cloud provider.
url: https://zero-to-jupyterhub.readthedocs.io/
- name: Dask Gateway
description: |
Dask Gateway provides a secure, multi-tenant server for managing Dask clusters. It allows users to launch and use Dask clusters in a shared, centrally managed cluster environment, without requiring users to have direct access to the underlying cluster backend (e.g. Kubernetes, Hadoop/YARN, HPC Job queues, etc…).
url: https://gateway.dask.org/
- name: DaskHub
description: |
This chart provides a multi-user, Dask-Gateway enabled JupyterHub. It combines the JupyterHub and Dask Gateway helm charts.
url: https://github.com/dask/helm-chart/blob/main/daskhub/README.md
- name: Dask
description: |
Dask is a flexible library for parallel computing in Python.
url: https://docs.dask.org/en/latest/
- name: terraform-aws-ec2-autoscale-group
description: Terraform module to provision Auto Scaling Group and Launch Template
on AWS
url: https://github.com/cloudposse/terraform-aws-ec2-autoscale-group
- name: terraform-aws-ec2-instance
description: Terraform module for providing a general purpose EC2 instance
url: https://github.com/cloudposse/terraform-aws-ec2-instance
- name: terraform-aws-ec2-instance-group
description: Terraform module for provisioning multiple general purpose EC2 hosts
for stateful applications
url: https://github.com/cloudposse/terraform-aws-ec2-instance-group
- name: "terraform-null-label"
description: "Terraform module designed to generate consistent names and tags for resources. Use terraform-null-label to implement a strict naming convention."
url: "https://github.com/cloudposse/terraform-null-label"
# Short description of this project
description: |
Terraform module to deploy a multiuser Jupyterhub + Dask Cluster on an existing EKS cluster using the DaskHub helm chart. It deploys the DaskHub Helm chart, and optionally configures SSL for you if you are using a domain name on AWS hosted with Route53.
# List any resources helpful for someone to get started. For example, link to the hashicorp documentation or AWS documentation.
references:
- name: "Bitnami Tutorial: Secure Kubernetes Services with Ingress, TLS and Let's Encrypt"
description: "Set up the NGINX Ingress Controller in our cluster and create Ingress routes for an example application. You'll learn how Ingress objects are defined, including how to configure TLS and basic authentication."
url: "https://docs.bitnami.com/tutorials/secure-kubernetes-services-with-ingress-tls-letsencrypt"
- name: "Cert Manager Release Version Info"
description : ""
url: "https://cert-manager.io/docs/installation/supported-releases/"
- name: "Cert Manager Installation with Helm"
description: ""
url: "https://cert-manager.io/docs/installation/helm/"
- name: "Terraform Standard Module Structure"
description: "HashiCorp's standard module structure is a file and directory layout we recommend for reusable modules distributed in separate repositories."
url: "https://www.terraform.io/docs/modules/index.html#standard-module-structure"
- name: "Terraform Module Requirements"
description: "HashiCorp's guidance on all the requirements for publishing a module. Meeting the requirements for publishing a module is extremely easy."
url: "https://www.terraform.io/docs/registry/modules/publish.html#requirements"
- name: "Terraform `random_integer` Resource"
description: "The resource random_integer generates random values from a given range, described by the min and max attributes of a given resource."
url: "https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer"
- name: "Terraform Version Pinning"
description: "The required_version setting can be used to constrain which versions of the Terraform CLI can be used with your configuration"
url: "https://www.terraform.io/docs/configuration/terraform.html#specifying-a-required-terraform-version"
# Introduction to the project
introduction: |-
This module installs the [Bitnami Apache Airflow helm chart](https://bitnami.com/stack/apache-airflow/helm) to an AWS EKS cluster. It will optionally setup an NGINX ingress for SSL and create AWS Route53 records.
# How to use this module. Should be an easy example to copy and paste.
usage: |-
For a complete example, see [examples/complete](examples/complete).
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest)
(which tests and deploys the example on AWS), see [test](test).
```hcl
resource "random_string" "computed_values" {
length = 10
special = false
lower = true
upper = false
override_special = ""
}
locals {
helm_release_merged_values_file = abspath("helm_charts/airflow/computed-${random_string.computed_values.result}-values.yaml")
}
# If the computed-values file does not exist we must create it first
resource "null_resource" "create_merged_file" {
triggers = {
always_run = timestamp()
}
provisioner "local-exec" {
command = <<EOT
touch ${local.helm_release_merged_values_file}
EOT
}
}
module "helm_release_airflow" {
depends_on = [
null_resource.create_merged_file,
]
source = "dabble-of-devops-bioanalyze/eks-bitnami-apache-airflow/aws"
helm_release_name = var.airflow_release_name
helm_release_values_dir = abspath(var.airflow_helm_values_dir)
# this can be named whatever you like, including values.yaml, just make sure that the file exists before starting up the module
helm_release_merged_values_file = local.helm_release_merged_values_file
enable_ssl = true
letsencrypt_email = "hello@gmail.com"
# This must be a domain name registered with AWS
# And it must have a wildcard ACM
# The module will configure SSL and at the end you will have
# https://airflow.example.com
aws_route53_zone_name = "example.com."
aws_route53_record_name = "airflow"
context = module.this.context
}
output "helm_release_airflow" {
value = module.helm_release_airflow
}
```
# Example usage
examples: |-
Here is an example of using this module:
- [`examples/complete`](https://github.com/dabble-of-devops-bioanalyze/terraform-aws-eks-bitnami-apache-airflow/) - complete example of using this module
# How to get started quickly
#quickstart: |-
# Here's how to get started...
# Other files to include in this README from the project folder
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors:
- name: "Jillian Rowe"
github: "jerowe"