Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowe committed Dec 8, 2021
1 parent 3db4f8c commit dce4de5
Show file tree
Hide file tree
Showing 97 changed files with 29,079 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ test.log
.kube

_templates/test/tests/__pycache__/

examples/**/tests/__pycache__/
pre-commit-terraform
Empty file added .nojekyll
Empty file.
Binary file added _build/.doctrees/README.doctree
Binary file not shown.
Binary file added _build/.doctrees/environment.pickle
Binary file not shown.
Binary file added _build/.doctrees/examples/examples.doctree
Binary file not shown.
1 change: 1 addition & 0 deletions _build/.doctrees/glue_cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 4 additions & 0 deletions _build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 85cfab65d0883ed4cd1004173b204fd1
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ The second method is to deploy each application with a service type LoadBalancer

```{include} ./quickstart.md
```

## More Tutorials Coming Soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="highlight"><pre><span></span><span class="nb">terraform</span> <span class="p">{</span>
<span class="na">required_version</span> <span class="o">=</span> <span class="s2">&quot;&gt;= 0.12.2&quot;</span>

<span class="kr">backend</span> <span class="nv">&quot;s3&quot;</span> <span class="p">{</span>
<span class="na">region</span> <span class="o">=</span> <span class="s2">&quot;us-east-1&quot;</span>
<span class="na">bucket</span> <span class="o">=</span> <span class="s2">&quot;bioanalyze-test-terraform-state&quot;</span>
<span class="na">key</span> <span class="o">=</span> <span class="s2">&quot;bioanalyze-test-helm-nginx&quot;</span>
<span class="na">dynamodb_table</span> <span class="o">=</span> <span class="s2">&quot;bioanalyze-test-terraform-state-lock&quot;</span>
<span class="na">profile</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="na">role_arn</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="na">encrypt</span> <span class="o">=</span> <span class="s2">&quot;true&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div class="highlight"><pre><span></span>
</pre></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<div class="highlight"><pre><span></span><span class="c1">##################################################</span>
<span class="c1"># Variables</span>
<span class="c1"># This file has various groupings of variables</span>
<span class="c1">##################################################</span>

<span class="c1">##################################################</span>
<span class="c1"># AWS</span>
<span class="c1">##################################################</span>

<span class="kr">variable</span> <span class="nv">&quot;region&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;us-east-1&quot;</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;AWS Region&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;aws_availability_zones_exclude&quot;</span> <span class="p">{</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;availability zones to exclude&quot;</span>
<span class="na">type</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span><span class="err">any</span><span class="p">)</span>
<span class="na">default</span> <span class="o">=</span> <span class="p">[]</span>
<span class="p">}</span><span class="c1"></span>

<span class="c1">##################################################</span>
<span class="c1"># AWS EKS</span>
<span class="c1">##################################################</span>

<span class="kr">variable</span> <span class="nv">&quot;eks_node_groups&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span><span class="kt">object</span><span class="p">({</span>
<span class="na">instance_types</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span><span class="kt">string</span><span class="p">)</span>
<span class="na">desired_size</span> <span class="o">=</span> <span class="kt">number</span>
<span class="na">min_size</span> <span class="o">=</span> <span class="kt">number</span>
<span class="na">max_size</span> <span class="o">=</span> <span class="kt">number</span>
<span class="na">disk_size</span> <span class="o">=</span> <span class="kt">number</span>
<span class="na">name</span> <span class="o">=</span> <span class="kt">string</span>
<span class="p">}))</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;EKS Node Groups&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="p">[</span>
<span class="p">{</span>
<span class="na">name</span> <span class="o">=</span> <span class="s2">&quot;node-group-1&quot;</span>
<span class="na">instance_types</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;t3a.medium&quot;, &quot;t3a.large&quot;, &quot;t3a.2xlarge&quot;, &quot;m4.10xlarge&quot;</span><span class="p">]</span>
<span class="na">desired_size</span> <span class="o">=</span> <span class="m">1</span>
<span class="na">min_size</span> <span class="o">=</span> <span class="m">0</span>
<span class="na">max_size</span> <span class="o">=</span> <span class="m">450</span>
<span class="na">disk_size</span> <span class="o">=</span> <span class="m">50</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span><span class="c1"></span>

<span class="c1">##################################################</span>
<span class="c1"># Helm Release Variables</span>
<span class="c1"># corresponds to input to resource &quot;helm_release&quot;</span>
<span class="c1">##################################################</span>

<span class="c1"># name = var.helm_release_name</span>
<span class="c1"># repository = &quot;https://charts.bitnami.com/bitnami&quot;</span>
<span class="c1"># chart = &quot;helm&quot;</span>
<span class="c1"># version = &quot;11.0.8&quot;</span>
<span class="c1"># namespace = var.helm_namespace</span>
<span class="c1"># create_namespace = true</span>
<span class="c1"># wait = false</span>
<span class="c1"># values = [file(&quot;helm_charts/helm/values.yaml&quot;)]</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_name&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release name&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;helm&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_repository&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release chart repository&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;https://charts.bitnami.com/bitnami&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_chart&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release chart&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;airflow&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_namespace&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release namespace&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;default&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_version&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release version&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;11.0.8&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_wait&quot;</span> <span class="p">{</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Tell terraform to wait until the service comes up.&quot;</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">bool</span>
<span class="na">default</span> <span class="o">=</span> <span class="no">true</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_create_namespace&quot;</span> <span class="p">{</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Create namespace if it does not exist&quot;</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">bool</span>
<span class="na">default</span> <span class="o">=</span> <span class="no">true</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_values_dir&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Directory to put rendered values template files or additional keys. Should be helm_charts/{helm_release_name}&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;helm_charts&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_values_files&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span><span class="kt">string</span><span class="p">)</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;helm release values files - paths values files to add to helm install --values {}&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="p">[]</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;helm_release_merged_values_file&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Path to merged helm files. This path must exist before the module is invoked.&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="p">}</span><span class="c1"></span>

<span class="c1">##################################################</span>
<span class="c1"># Helm Release Variables - Enable SSL</span>
<span class="c1"># corresponds to input to resource &quot;helm_release&quot;</span>
<span class="c1">##################################################</span>

<span class="kr">variable</span> <span class="nv">&quot;enable_ssl&quot;</span> <span class="p">{</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Enable SSL Support?&quot;</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">bool</span>
<span class="na">default</span> <span class="o">=</span> <span class="no">true</span>
<span class="p">}</span><span class="c1"></span>

<span class="c1"># these variables are only needed if enable_ssl == true</span>

<span class="kr">variable</span> <span class="nv">&quot;letsencrypt_email&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Email to use for https setup. Not needed unless enable_ssl&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;hello@gmail.com&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;aws_route53_zone_name&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Name of the zone to add records. Do not forget the trailing &#39;.&#39; - &#39;test.com.&#39;&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;test.com.&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;aws_route53_record_name&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">string</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Record name to add to aws_route_53. Must be a valid subdomain - www,app,etc&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="s2">&quot;www&quot;</span>
<span class="p">}</span>

<span class="kr">variable</span> <span class="nv">&quot;run_tests&quot;</span> <span class="p">{</span>
<span class="na">type</span> <span class="o">=</span> <span class="kt">bool</span>
<span class="na">description</span> <span class="o">=</span> <span class="s2">&quot;Run pytests after install&quot;</span>
<span class="na">default</span> <span class="o">=</span> <span class="no">true</span>
<span class="p">}</span>
</pre></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="highlight"><pre><span></span><span class="nb">terraform</span> <span class="p">{</span>
<span class="na">required_version</span> <span class="o">=</span> <span class="s2">&quot;&gt;= 0.12.26&quot;</span>

<span class="nb">required_providers</span> <span class="p">{</span>
<span class="nb">local</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">source</span> <span class="o">=</span> <span class="s2">&quot;hashicorp/local&quot;</span>
<span class="na">version</span> <span class="o">=</span> <span class="s2">&quot;&gt;= 1.2&quot;</span>
<span class="p">}</span>
<span class="nb">http</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">source</span> <span class="o">=</span> <span class="s2">&quot;hashicorp/http&quot;</span>
<span class="na">version</span> <span class="o">=</span> <span class="s2">&quot;&gt;= 2.1.0&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ output "subnet_ids" {

# https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
module "eks" {
# source = "dabble-of-devops-bioanalyze/eks-autoscaling/aws"
# version = ">= 1.18.0"
source = "/root/terraform-recipes/terraform-aws-eks-autoscaling"
source = "dabble-of-devops-bioanalyze/eks-autoscaling/aws"
version = ">= 1.19.0"

region = var.region
vpc_id = local.vpc_id
Expand Down Expand Up @@ -176,7 +175,6 @@ module "nginx2" {
http = http
}

# source = "/root/terraform-recipes/terraform-aws-eks-helm"
source = "../.."
aws_route53_record_name = "nginx2"
aws_route53_zone_name = var.aws_route53_zone_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module_eks"></a> [eks](#module\_eks) | /root/terraform-recipes/terraform-aws-eks-autoscaling | n/a |
| <a name="module_eks"></a> [eks](#module\_eks) | dabble-of-devops-bioanalyze/eks-autoscaling/aws | >= 1.19.0 |
| <a name="module_nginx1"></a> [nginx1](#module\_nginx1) | ../.. | n/a |
| <a name="module_nginx2"></a> [nginx2](#module\_nginx2) | ../.. | n/a |
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |
Expand Down
Loading

0 comments on commit dce4de5

Please sign in to comment.