-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into testing-101519
- Loading branch information
Showing
10 changed files
with
197 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
BINARY_DIR=./work | ||
BINARY_FILE="${BINARY_DIR}/terraform-docs" | ||
BINARY_VERSION=0.6.0 | ||
BINARY_URL_PREFIX="https://github.com/segmentio/terraform-docs/releases/download/v${BINARY_VERSION}/terraform-docs-v${BINARY_VERSION}" | ||
|
||
DOCS_CMDS="--sort-inputs-by-required --with-aggregate-type-defaults markdown table" | ||
DOCS_DIR=docs | ||
|
||
VARS_TF=variables.tf | ||
OUTS_TF=outputs.tf | ||
|
||
INS_MD=inputs.md | ||
OUTS_MD=outputs.md | ||
|
||
|
||
function setup { | ||
mkdir -p ${BINARY_DIR} | ||
if [[ ! -e "${BINARY_FILE}" ]]; then | ||
if [[ "$OSTYPE" == "linux-gnu" ]]; then | ||
BINARY_URL="${BINARY_URL_PREFIX}-linux-amd64" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
BINARY_URL="${BINARY_URL_PREFIX}-darwin-amd64" | ||
else | ||
echo "Please run this in either a Linux or Mac environment." | ||
exit 1 | ||
fi | ||
echo "Downloading ${BINARY_URL}" | ||
curl -L -o "${BINARY_FILE}" "${BINARY_URL}" | ||
chmod +x "${BINARY_FILE}" | ||
fi | ||
} | ||
|
||
function main_docs { | ||
if test ! -d "${DOCS_DIR}"; then | ||
mkdir "${DOCS_DIR}" | ||
fi | ||
|
||
echo -e "# Terraform Enterprise: Clustering\n" | tee "${DOCS_DIR}/${INS_MD}" "${DOCS_DIR}/${OUTS_MD}" &> /dev/null | ||
|
||
eval "${BINARY_FILE} ${DOCS_CMDS} ${VARS_TF}" >> "${DOCS_DIR}/${INS_MD}" | ||
eval "${BINARY_FILE} ${DOCS_CMDS} ${OUTS_TF}" >> "${DOCS_DIR}/${OUTS_MD}" | ||
|
||
} | ||
|
||
|
||
function module_docs { | ||
if test -d ./modules; then | ||
for dir in ./modules/*; do | ||
mkdir -p "${dir}/${DOCS_DIR}" | ||
|
||
echo -e "# Terraform Enterprise: Clustering\n" | tee "${dir}/${DOCS_DIR}/${INS_MD}" "${dir}/${DOCS_DIR}/${OUTS_MD}" &> /dev/null | ||
|
||
eval "${BINARY_FILE} ${DOCS_CMDS} ${dir}/${VARS_TF}" >> "${dir}/${DOCS_DIR}/${INS_MD}" | ||
eval "${BINARY_FILE} ${DOCS_CMDS} ${dir}/${OUTS_TF}" >> "${dir}/${DOCS_DIR}/${OUTS_MD}" | ||
done | ||
else | ||
echo "No modules directory, skipping." | ||
fi | ||
} | ||
|
||
|
||
setup | ||
main_docs | ||
module_docs | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.PHONY: docs | ||
docs: | ||
.scripts/doc-gen.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,32 @@ | ||
# Terraform Enterprise: High Availability for Google (BETA) | ||
# Terraform Enterprise: Clustering for Google | ||
|
||
![Terraform Logo](https://github.com/hashicorp/terraform-google-terraform-enterprise/blob/master/assets/TerraformLogo.png?raw=true) | ||
|
||
## Description | ||
|
||
This module installs Terraform Enterprise HA BETA onto 1 or more gcp instances in DEMO mode. All data is stored on the instance(s) and is not preserved. | ||
This module installs Terraform Enterprise Clustering onto one or more gcp instances. | ||
|
||
An Ubuntu Bionic (18.04 LTS) image is chosen by default, but this config supports previous version of Ubuntu as well as Red Hat Enterprise Linux 7.2-7.7 (v8 is not supported.) | ||
An Ubuntu Bionic (18.04 LTS) image is chosen by default, but this config supports previous version of Ubuntu as well as Red Hat Enterprise Linux 7.2-7.6 (v8 are not supported.) | ||
|
||
## Architecture | ||
|
||
![basic diagram](https://github.com/hashicorp/terraform-google-terraform-enterprise/blob/v0.0.1-beta/assets/gcp_diagram.jpg?raw=true) | ||
![basic diagram](https://github.com/hashicorp/terraform-google-terraform-enterprise/blob/master/assets/gcp_diagram.jpg?raw=true) | ||
_example architecture_ | ||
|
||
Please contact your Technical Account Manager for more information, and support for any issues you have. | ||
|
||
## Examples | ||
|
||
Please see the [examples directory](https://github.com/hashicorp/terraform-google-terraform-enterprise/tree/master/examples/) for more extensive examples. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| certificate | Path to Certificate file or GCP certificate link | string | n/a | yes | | ||
| credentials\_file | Path to credential file | string | n/a | yes | | ||
| dns\_zone | Managed DNS Zone name | string | n/a | yes | | ||
| domain | domain name | string | n/a | yes | | ||
| frontend\_dns | DNS name for load balancer | string | n/a | yes | | ||
| license\_file | License file | string | n/a | yes | | ||
| project | Name of the project to deploy into | string | n/a | yes | | ||
| public\_ip | the public IP for the load balancer to use | string | n/a | yes | | ||
| ssl\_policy | SSL policy for the cert | string | n/a | yes | | ||
| subnet | name of the subnet to install into | string | n/a | yes | | ||
| airgap\_installer\_url | URL to replicated's airgap installer package | string | `"https://install.terraform.io/installer/replicated-v5.tar.gz"` | no | | ||
| airgap\_package\_url | airgap url | string | `"none"` | no | | ||
| boot\_disk\_size | The size of the boot disk to use for the instances | string | `"40"` | no | | ||
| ca\_bundle\_url | URL to Custom CA bundle used for outgoing connections | string | `"none"` | no | | ||
| dns\_project | Name of project where the DNS zone resides | string | `""` | no | | ||
| encryption\_password | encryption password for the vault unseal key. save this! | string | `""` | no | | ||
| gcs\_bucket | Name of the gcp storage bucket | string | `""` | no | | ||
| gcs\_credentials | Base64 encoded credentials json to access your gcp storage bucket. Run base64 -i <creds.json> -o <credsb64.json> and then copy the contents of the file into the variable | string | `""` | no | | ||
| gcs\_project | Project name where the bucket resides, if left blank will use project provided above | string | `""` | no | | ||
| http\_proxy\_url | HTTP(S) proxy url | string | `"none"` | no | | ||
| image\_family | The image family, choose from ubuntu-1604-lts, ubuntu-1804-lts, or rhel-7 | string | `"ubuntu-1804-lts"` | no | | ||
| jq\_url | Location of the jq package | string | `"https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64"` | no | | ||
| postgresql\_address | Database connection url | string | `""` | no | | ||
| postgresql\_database | Database name | string | `""` | no | | ||
| postgresql\_extra\_params | Extra connection parameters such as ssl=true | string | `""` | no | | ||
| postgresql\_password | Base64 encoded database password | string | `""` | no | | ||
| postgresql\_user | Database username | string | `"none"` | no | | ||
| prefix | Resource and instance prefix | string | `"tfe"` | no | | ||
| primary\_count | Number of primary nodes to run, must be odd number - 3 or 5 recommended. | string | `"3"` | no | | ||
| primary\_machine\_type | Type of machine to use | string | `"n1-standard-4"` | no | | ||
| ptfe\_install\_url | Location of the ptfe install tool zip file | string | `"https://install.terraform.io/installer/ptfe.zip"` | no | | ||
| region | The region to install into. | string | `"us-central1"` | no | | ||
| release\_sequence | Replicated release sequence | string | `"latest"` | no | | ||
| repl\_cidr | Specify a non-standard CIDR range for the replicated services. The default is 10.96.0.0/12 | string | `""` | no | | ||
| secondary\_count | Number of secondary nodes to run | string | `"0"` | no | | ||
| secondary\_machine\_type | Type of machine to use for secondary nodes, if unset, will default to primary_machine_type | string | `"n1-standard-4"` | no | | ||
| weave\_cidr | Specify a non-standard CIDR range for weave. The default is 10.32.0.0/12 | string | `""` | no | | ||
| zone | Preferred zone | string | `"us-central1-a"` | no | | ||
Please see the [inputs documentation](https://registry.terraform.io/modules/hashicorp/terraform-enterprise/google/?tab=inputs) | ||
|
||
Repository versions of the inputs documentation can be found in [docs/inputs.md](docs/inputs.md) | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| application\_endpoint | The URI to access the Terraform Enterprise Application. | | ||
| application\_health\_check | The URI for the Terraform Enterprise Application health check. | | ||
| installer\_dashboard\_password | The password to access the installer dashboard. | | ||
| installer\_dashboard\_url | The URL to access the installer dashboard. | | ||
| primary\_public\_ip | The Public IP for the load balancer to use. | | ||
Please see the [outputs documentation](https://registry.terraform.io/modules/hashicorp/terraform-enterprise/google/?tab=outputs) | ||
|
||
Repository versions of the outputs documentation can be found in [docs/outputs.md](docs/outputs.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| certificate | Path to Certificate file or GCP certificate link | string | n/a | yes | | ||
| credentials\_file | Path to credential file | string | n/a | yes | | ||
| dns\_zone | Managed DNS Zone name | string | n/a | yes | | ||
| domain | domain name | string | n/a | yes | | ||
| frontend\_dns | DNS name for load balancer | string | n/a | yes | | ||
| license\_file | License file | string | n/a | yes | | ||
| project | Name of the project to deploy into | string | n/a | yes | | ||
| public\_ip | the public IP for the load balancer to use | string | n/a | yes | | ||
| ssl\_policy | SSL policy for the cert | string | n/a | yes | | ||
| subnet | name of the subnet to install into | string | n/a | yes | | ||
| airgap\_installer\_url | URL to replicated's airgap installer package | string | `"https://install.terraform.io/installer/replicated-v5.tar.gz"` | no | | ||
| airgap\_package\_url | airgap url | string | `"none"` | no | | ||
| boot\_disk\_size | The size of the boot disk to use for the instances | string | `"40"` | no | | ||
| ca\_bundle\_url | URL to Custom CA bundle used for outgoing connections | string | `"none"` | no | | ||
| dns\_project | Name of project where the DNS zone resides | string | `""` | no | | ||
| encryption\_password | encryption password for the vault unseal key. save this! | string | `""` | no | | ||
| external\_services | object store provider for external services. Allowed values: gcs | string | `""` | no | | ||
| gcs\_bucket | Name of the gcp storage bucket | string | `""` | no | | ||
| gcs\_credentials | Base64 encoded credentials json to access your gcp storage bucket. Run base64 -i <creds.json> -o <credsb64.json> and then copy the contents of the file into the variable | string | `""` | no | | ||
| gcs\_project | Project name where the bucket resides, if left blank will use project provided above | string | `""` | no | | ||
| image\_family | The image family, choose from ubuntu-1604-lts, ubuntu-1804-lts, or rhel-7 | string | `"ubuntu-1804-lts"` | no | | ||
| install\_type | Installation type, options are (poc or production). Switch to production for external services. | string | `"poc"` | no | | ||
| postgresql\_address | Database connection url | string | `""` | no | | ||
| postgresql\_database | Database name | string | `""` | no | | ||
| postgresql\_extra\_params | Extra connection parameters such as ssl=true | string | `""` | no | | ||
| postgresql\_password | Base64 encoded database password | string | `""` | no | | ||
| postgresql\_user | Database username | string | `""` | no | | ||
| prefix | Resource and instance prefix | string | `"tfe"` | no | | ||
| primary\_count | Number of primary nodes to run, must be odd number - 3 or 5 recommended. | string | `"3"` | no | | ||
| primary\_machine\_type | Type of machine to use | string | `"n1-standard-4"` | no | | ||
| region | The region to install into. | string | `"us-central1"` | no | | ||
| release\_sequence | Replicated release sequence | string | `"latest"` | no | | ||
| repl\_cidr | Specify a non-standard CIDR range for the replicated services. The default is 10.96.0.0/12 | string | `""` | no | | ||
| secondary\_count | Number of secondary nodes to run | string | `"0"` | no | | ||
| secondary\_machine\_type | Type of machine to use for secondary nodes, if unset, will default to primary_machine_type | string | `"n1-standard-4"` | no | | ||
| weave\_cidr | Specify a non-standard CIDR range for weave. The default is 10.32.0.0/12 | string | `""` | no | | ||
| zone | Preferred zone | string | `"us-central1-a"` | no | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| application\_endpoint | The URI to access the Terraform Enterprise Application. | | ||
| application\_health\_check | The URI for the Terraform Enterprise Application health check. | | ||
| installer\_dashboard\_password | The password to access the installer dashboard. | | ||
| installer\_dashboard\_url | The URL to access the installer dashboard. | | ||
| primary\_public\_ip | The Public IP for the load balancer to use. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| bootstrap\_token\_id | bootstrap token id | string | n/a | yes | | ||
| bootstrap\_token\_suffix | bootstrap token suffix | string | n/a | yes | | ||
| cluster\_endpoint | the cluster endpoint | string | n/a | yes | | ||
| image\_family | image family | string | n/a | yes | | ||
| install\_type | type of install - poc or production | string | n/a | yes | | ||
| prefix | Prefix for resource names | string | n/a | yes | | ||
| ptfe\_subnet | subnet to deploy into | string | n/a | yes | | ||
| region | The region to install into. | string | n/a | yes | | ||
| release\_sequence | Replicated release sequence | string | n/a | yes | | ||
| repl\_data | console | string | n/a | yes | | ||
| secondary\_machine\_type | Type of machine to use | string | n/a | yes | | ||
| setup\_token | setup token | string | n/a | yes | | ||
| boot\_disk\_size | The size of the boot disk to use for the instances | string | `"40"` | no | | ||
| ca\_bundle\_url | URL to CA certificate file used for the internal `ptfe-proxy` used for outgoing connections | string | `"none"` | no | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| secondary\_template | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| cert | certificate for the load balancer | string | n/a | yes | | ||
| domain | domain | string | n/a | yes | | ||
| frontenddns | front end url name | string | n/a | yes | | ||
| instance\_group | primary instance group | string | n/a | yes | | ||
| prefix | Prefix for resource names | string | n/a | yes | | ||
| primary\_instances | primary instances | list | n/a | yes | | ||
| publicIP | External-facing IP address for PTFE application | string | n/a | yes | | ||
| sslpolicy | SSL policy for the cert | string | n/a | yes | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Terraform Enterprise: Clustering | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| cluster\_endpoint | | | ||
|