diff --git a/.gitmudules b/.gitmodules similarity index 100% rename from .gitmudules rename to .gitmodules diff --git a/README.md b/README.md index 023f601bbbb831dfb74d9151f22e688308e08497..07c960909ea4f95e3982ea41d785ac51367c0a3c 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,67 @@ # Terraform Openstack -This will create: +### This will create: -dmznet and dmzsubnet +- dmznet and dmzsubnet -borderrouter that connects dmznet to bright-external-flat-externalnet +- borderrouter that connects dmznet to bright-external-flat-externalnet -a floating ip address, and an instance coming off of dmznet +- a floating ip address, and an instance coming off of dmznet -clusternet off of dmznet instance +- clusternet off of dmznet instance -clustersubnet -eill connect instance to ood through ohpc and download software +- clustersubnet +will connect instance to ood through ohpc and download software -Make a new directory for Terraform: +### Make a new directory for Terraform: -`$mkdir terraform-first-instance` +- `$mkdir terraform-first-instance` -Install Terraform: +### Install Terraform: -`$brew install terraform` +- `$brew install terraform` -Unzip the file and make a path to your new directory: +### Unzip the file and make a path to your new directory using: -`$export TERRAFORM_DIR="$(pwd)/terraform-first-instance"` +- `$export TERRAFORM_DIR="$(pwd)/terraform-first-instance` -`$cp $HOME/Downloads/terraform_0.6.16_linux_amd64/terraform $TERRAFORM_DIR` +- `$cp $HOME/Downloads/terraform_0.6.16_linux_amd64/terraform $TERRAFORM_DIR` -Create a new application credintial in Openstack: +### Create a new application credintial in Openstack: -In Openstack, go to Identity - Application Credentials +- In Openstack, go to **Identity** -> **Application Credentials** -Click "Create Application Credential" +- Click "**Create Application Credential**" -Name the credential and add a description(Leave the rest blank. It is important not to add an expiration date.) +- Name the credential, add a description, and check the box making it unrestricted (Leave the rest blank. It is important not to add an expiration date.) -Open the credential rc file you have created, and change all OS_ to TF_. This will allow terraform to read and use these values. +- Download the credentials as an RC file. -Save the credential in your terraform-first-instance directory. +- Edit variables in credentials RC file to TF_ from OS_. Everything else stays the same. -Download RC File from Openstack(V3) and save it in your terraform-first-instance directory. +- Save credentials RC file in your terraform-first-instance directory. -Clone this repo into your terraform-first-instance directory: -`$git clone --recursive https://gitlab.rc.uab.edu/rrand11/terraform-openstack.git` +### Clone this repo into your terraform-first-instance directory using: -Source the openrc file and enter your password for openstack (you will only need to do this the very first time): +- `$git clone --recursive https://gitlab.rc.uab.edu/rrand11/terraform-openstack.git` -$source OPENRCFILENAME +### Source the RC file and initialize terraform: -Source the credential rc file and initialize terraform: +- `$source CREDENTIALRCFILENAME` -`$source CREDENTIALRCFILENAME` +- `$cd terraform-openstack` -`$cd terraform-openstack` +- `$terraform init` -`$terraform init` +### Write Terraform Plan to your terraform-first-instance directory and run that plan: -Write Terraform Plan to your terraform-first-instance directory and run that plan: +- `$terraform plan -out $HOME/terraform-first-instance/terraform-plan.tf` -`$terraform plan -out $HOME/terraform-first-instance/terraform-plan.tf` +**_(Note)_** `$terraform plan -out` writes the plan to a file and then `terraform apply` runs that plan. -#terraform plan -out writes the plan to a file and then terraform apply runs that plan +- `$terraform apply "$HOME/terraform-first-instance/terraform-plan.tf"` -`$terraform apply "$HOME/terraform-first-instance/terraform-plan.tf"` +### Destroy Terraform Instance: -Destroy Terraform Instance: - -`$terraform destroy` +- `$terraform destroy` diff --git a/vars.tf b/vars.tf index 642a5dc936d65d1be5ed9559e3b73457af6eaa4a..e9b2a8f106d2126c3a0c110dcaa243a714bae778 100644 --- a/vars.tf +++ b/vars.tf @@ -9,4 +9,3 @@ variable "flavor" { variable "public-network-name" { default = "bright-external-flat-externalnet" } -