From b4922421e6816b110551fb68711685a159b8155d Mon Sep 17 00:00:00 2001 From: Sandra Maria Peter Date: Tue, 21 May 2024 14:14:00 -0400 Subject: [PATCH] move to example --- examples/standalone-rhel-aurora/README.md | 54 +++++++++++++++++++ .../standalone-rhel-aurora/data.tf | 0 .../standalone-rhel-aurora/locals.tf | 0 .../standalone-rhel-aurora/main.tf | 0 .../standalone-rhel-aurora/outputs.tf | 0 .../standalone-rhel-aurora/provider.tf | 0 .../standalone-rhel-aurora/variables.tf | 0 .../standalone-rhel-aurora/versions.tf | 0 tests/standalone-rhel-aurora/README.md | 21 -------- 9 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 examples/standalone-rhel-aurora/README.md rename {tests => examples}/standalone-rhel-aurora/data.tf (100%) rename {tests => examples}/standalone-rhel-aurora/locals.tf (100%) rename {tests => examples}/standalone-rhel-aurora/main.tf (100%) rename {tests => examples}/standalone-rhel-aurora/outputs.tf (100%) rename {tests => examples}/standalone-rhel-aurora/provider.tf (100%) rename {tests => examples}/standalone-rhel-aurora/variables.tf (100%) rename {tests => examples}/standalone-rhel-aurora/versions.tf (100%) delete mode 100644 tests/standalone-rhel-aurora/README.md diff --git a/examples/standalone-rhel-aurora/README.md b/examples/standalone-rhel-aurora/README.md new file mode 100644 index 00000000..cba31cbe --- /dev/null +++ b/examples/standalone-rhel-aurora/README.md @@ -0,0 +1,54 @@ +# Example: Standalone with AWS Aurora RDS + +## About this example + +This example for Terraform Enterprise creates a TFE installation with the +following traits: + +- External mode +- a small VM machine type (m5.xlarge) +- Red Hat 7.9 as the VM image +- a publicly accessible HTTP load balancer with TLS termination +- an access key for accessing S3 +- AWS Aurora RDS with one reader and writer instance. + +## Pre-requisites + +This test assumes the following resources already exist: + +- Valid DNS Zone managed in Route53 +- Valid AWS ACM certificate +- a TFE license on a filepath accessible by tests + +## How to Use This Module + +### Deployment + + 1. Read the entire [README.md](../../README.md) of the root module. + 2. Ensure account meets module prerequisites from above. + 3. Clone repository. + 4. Change directory into desired example folder. + 5. Create a local `terraform.auto.tfvars` file and instantiate the required inputs as required in the respective `./examples/standalone-rhel-aurora/variables.tf` including the path to the license under the `license_file` variable value. + 6. Authenticate against the AWS provider. See [instructions](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration). + 7. Initialize terraform and apply the module configurations using the commands below: + + NOTE: `terraform plan` will print out the execution plan which describes the actions Terraform will take in order to build your infrastructure to match the module configuration. If anything in the plan seems incorrect or dangerous, it is safe to abort here and not proceed to `terraform apply`. + + ``` + terraform init + terraform plan + terraform apply + ``` + +## Post-deployment Tasks + +The build should take approximately 10-15 minutes to deploy. Once the module has completed, give the platform another 10 minutes or so prior to attempting to interact with it in order for all containers to start up. + +Unless amended, this example will not create an initial admin user using the IACT, but it does output the URL for your convenience. Follow the advice in this document to create the initial admin user, and log into the system using this user in order to configure it for use. + +### Connecting to the TFE Application + +1. Navigate to the URL supplied via the `login_url` Terraform output. (It may take several minutes for this to be available after initial deployment. You may monitor the progress of cloud init if desired on one of the instances) +2. Enter a `username`, `email`, and `password` for the initial user. +3. Click `Create an account`. +4. After the initial user is created you may access the TFE Application normally using the URL supplied via `login_url` Terraform output. diff --git a/tests/standalone-rhel-aurora/data.tf b/examples/standalone-rhel-aurora/data.tf similarity index 100% rename from tests/standalone-rhel-aurora/data.tf rename to examples/standalone-rhel-aurora/data.tf diff --git a/tests/standalone-rhel-aurora/locals.tf b/examples/standalone-rhel-aurora/locals.tf similarity index 100% rename from tests/standalone-rhel-aurora/locals.tf rename to examples/standalone-rhel-aurora/locals.tf diff --git a/tests/standalone-rhel-aurora/main.tf b/examples/standalone-rhel-aurora/main.tf similarity index 100% rename from tests/standalone-rhel-aurora/main.tf rename to examples/standalone-rhel-aurora/main.tf diff --git a/tests/standalone-rhel-aurora/outputs.tf b/examples/standalone-rhel-aurora/outputs.tf similarity index 100% rename from tests/standalone-rhel-aurora/outputs.tf rename to examples/standalone-rhel-aurora/outputs.tf diff --git a/tests/standalone-rhel-aurora/provider.tf b/examples/standalone-rhel-aurora/provider.tf similarity index 100% rename from tests/standalone-rhel-aurora/provider.tf rename to examples/standalone-rhel-aurora/provider.tf diff --git a/tests/standalone-rhel-aurora/variables.tf b/examples/standalone-rhel-aurora/variables.tf similarity index 100% rename from tests/standalone-rhel-aurora/variables.tf rename to examples/standalone-rhel-aurora/variables.tf diff --git a/tests/standalone-rhel-aurora/versions.tf b/examples/standalone-rhel-aurora/versions.tf similarity index 100% rename from tests/standalone-rhel-aurora/versions.tf rename to examples/standalone-rhel-aurora/versions.tf diff --git a/tests/standalone-rhel-aurora/README.md b/tests/standalone-rhel-aurora/README.md deleted file mode 100644 index c3443cac..00000000 --- a/tests/standalone-rhel-aurora/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Test: Standalone with AWS Aurora RDS - -## About this test - -This test for Terraform Enterprise creates a TFE installation with the -following traits: - -- External mode -- a small VM machine type (m5.xlarge) -- Red Hat 7.9 as the VM image -- a publicly accessible HTTP load balancer with TLS termination -- an access key for accessing S3 -- AWS Aurora RDS with one reader and writer instance. - -## Pre-requisites - -This test assumes the following resources already exist: - -- Valid DNS Zone managed in Route53 -- Valid AWS ACM certificate -- a TFE license on a filepath accessible by tests