X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=docs%2Freport%2Fintroduction%2Fmethodology_aws%2Faws_terraform.rst;h=4d47b1e6d88156ebda736f3be8aef28f1a3347e0;hb=6809aeefd0f2b951cd4861f676ee2dff0df47ff2;hp=7c73e04b20de9fafc163735b6ef096fb67b6fe93;hpb=6899ba7eda3cbc707c1391affa6c8c2e57f1ba61;p=csit.git diff --git a/docs/report/introduction/methodology_aws/aws_terraform.rst b/docs/report/introduction/methodology_aws/aws_terraform.rst index 7c73e04b20..4d47b1e6d8 100644 --- a/docs/report/introduction/methodology_aws/aws_terraform.rst +++ b/docs/report/introduction/methodology_aws/aws_terraform.rst @@ -1,11 +1,10 @@ -Terraform-aws-csit modules --------------------------- +AWS Deployments +--------------- -Terraform-aws-csit module is IaaC - infrastructure as a code. Module uses the -Amazon Web Services (AWS) provider to interact with resources provided by AWS -to orchestrate virtual environment for running CSIT tests. - -- `aws `_. +CSIT performance testbed deployments in AWS rely on +Infrastructure-as-a-C (IaaC) Terraform AWS providers. Terraform +providers specified in CSIT interact with resources provided by AWS to +orchestrate virtual environment for running CSIT performance tests. Compatibility ~~~~~~~~~~~~~ @@ -21,85 +20,26 @@ Compatibility Requirements ~~~~~~~~~~~~ -Required modules and provider -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- `aws `_. -- `null `_. -- `tls `_. -- `vault `_. - -Required software -^^^^^^^^^^^^^^^^^ - -- `Vault `_ service available on - specified ip/port. - -Usage -~~~~~ - -- OPTIONAL: Enable logging - Terraform does not have logging enabled by default, to enable logging - to stderr, set up TF_LOG variable with specified loglevel: - Available loglevels: TRACE, DEBUG, INFO, WARN, ERROR - - :: - - export TF_LOG="LOGLEVEL" - - It is also possible to store logged output to a file by setting up - TF_LOG_PATH variable: - - :: - - export TF_LOG_PATH="path/to/logfile" - -- Run Terraform in a given root module folder depending on chosen testbed - topology. Terraform will deploy and configure instances and other resources, - all of these resources can be later identified on AWS via Environment tag. - By default, Environment tag "CSIT-AWS" is used. - Example: +- Required Modules and Providers - :: + - `Terraform Registry aws `_. + - `Terraform Registry null `_. + - `Terraform Registry tls `_. + - `Terraform Registry vault `_. - cd fdio.infra.terraform/2n_aws_c5n/ - terraform init - terraform plan - terraform apply +- Required software - This will deploy environment with default values, you can check the defaults - in ./2n_aws_c5n/main.tf and ./2n_aws_c5n/variables.tf files + - `Vault `_ service available + on specified ip/port. - If you would like to change some of these values, you can: - - 1. Set up TF_VAR_* environment variables prior to running 'terraform apply': - - :: - - export TF_VAR_testbed_name="testbed1" - - 2. Use '-var=varname=value' flag when running 'terraform apply': - - :: - - terraform apply -var=testbed_name=testbed1 - - Note: - Only variables defined in variables.tf file of the root module can be - changed using these methods. - -- To clean up the AWS environment and remove all used resources, run: - - :: - - terraform destroy - -Example usage -~~~~~~~~~~~~~ +Deployment Example +~~~~~~~~~~~~~~~~~~ -These are the default values for the AWS modules. The following example is -2n topology (3n topology variant is very similar). Few variables are defined in -a `variable.tf` file. +Following is an example of a +`Terraform deploy module `_ +for a CSIT 2-Node testbed topology with AWS variables set to default +values. A number of variables is also defined in a +`separate Terraform variable file `_. :: @@ -163,9 +103,10 @@ Secrets & Credentials Set credentials manually ^^^^^^^^^^^^^^^^^^^^^^^^ -To set the credentials manually you first need to tell the module to not fetch -credentials from Vault. To do that, set `provider "aws"` `access_key` and -`secret_key` to custom value or use credentials file as a source. +To set the credentials manually you first need to tell the module to not +fetch credentials from Vault. To do that, set `provider "aws"` +`access_key` and `secret_key` to custom value or use credentials file +as a source. ::