kezhenxu94 commented on code in PR #20:
URL: 
https://github.com/apache/skywalking-terraform/pull/20#discussion_r1286535672


##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions

Review Comment:
   Can we double check this (tomorrow) is needed? AWS CLI is not the only way 
to configure the credentials, here are some other ways, where `aws` CLI is not 
explicitly mentioned.
   
   
https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables



##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions
+3. A working knowledge of Terraform and AWS resources
+
+## Instructions
+
+### 1. Initialization
+
+Before applying any Terraform script, initialize your Terraform working 
directory:
+
+```bash
+$ cd aws/
+$ terraform init

Review Comment:
   It's good idea to add `$` to indicate this is a shell script, but 
considering GitHub web has a convenient copy button in the code block, the `$` 
would be copied too so the users have to remove it after pasting it to their 
terminal, this seems to be an inconvenience. What do you think we remove the 
leading `$`s?



##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions
+3. A working knowledge of Terraform and AWS resources
+
+## Instructions
+
+### 1. Initialization
+
+Before applying any Terraform script, initialize your Terraform working 
directory:
+
+```bash
+$ cd aws/
+$ terraform init
+```
+
+### 2. Configuration
+
+The script is designed with modularity and reusability in mind. Various 
parameters like region, instance count, instance type, etc., are exposed as 
variables for easier customization.
+
+#### Variables:
+
+| Variable Name       | Description                                          | 
Default Value               |
+|---------------------|------------------------------------------------------|-----------------------------|
+| `oap_instance_count`| Number of SkyWalking OAP instances                   | 
`1`                         |
+| `ui_instance_count` | Number of SkyWalking UI instances                    | 
`1`                         |
+| `region`            | AWS region where resources will be provisioned       | 
`us-east-1`                 |
+| `instance_type`     | AWS instance type for SkyWalking OAP and UI          | 
`t2.medium`                 |
+| `public_key_path`   | Path where the SSH key for instances will be stored  | 
`~/.ssh`                    |
+| `extra_tags`        | Additional tags that can be applied to all resources | 
`{}`                        |
+
+To modify the default values, you can create a `terraform.tfvars` file in the 
same directory as your Terraform script:
+
+```bash
+oap_instance_count = 2
+ui_instance_count  = 2
+region             = "us-west-1"
+instance_type      = "t2.large"
+public_key_path    = "/path/to/your/desired/location"
+extra_tags         = {
+  "Environment" = "Production"
+}
+```
+
+### 3. Test and apply the outcomes of the Script
+
+After adjusting your configuration, test and apply the script:
+
+```bash
+$ terraform plan
+$ terraform apply
+```
+
+### 4. Accessing the Resources
+
+Once the resources are created:
+
+- **SkyWalking OAP and UI instances**: You can SSH into the instances using 
the generated key pair. The public IPs of these instances are stored in local 
files (`oap-server` and `ui-server` respectively) under the 
`ansible/inventory/` directory, relative to the module's path.

Review Comment:
   If possible we would like to also add these IPs as `output` of Terraform, 
that can be done in a separate PR.



##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions
+3. A working knowledge of Terraform and AWS resources
+
+## Instructions
+
+### 1. Initialization
+
+Before applying any Terraform script, initialize your Terraform working 
directory:
+
+```bash
+$ cd aws/
+$ terraform init
+```
+
+### 2. Configuration
+
+The script is designed with modularity and reusability in mind. Various 
parameters like region, instance count, instance type, etc., are exposed as 
variables for easier customization.
+
+#### Variables:
+
+| Variable Name       | Description                                          | 
Default Value               |
+|---------------------|------------------------------------------------------|-----------------------------|
+| `oap_instance_count`| Number of SkyWalking OAP instances                   | 
`1`                         |
+| `ui_instance_count` | Number of SkyWalking UI instances                    | 
`1`                         |
+| `region`            | AWS region where resources will be provisioned       | 
`us-east-1`                 |
+| `instance_type`     | AWS instance type for SkyWalking OAP and UI          | 
`t2.medium`                 |
+| `public_key_path`   | Path where the SSH key for instances will be stored  | 
`~/.ssh`                    |
+| `extra_tags`        | Additional tags that can be applied to all resources | 
`{}`                        |
+
+To modify the default values, you can create a `terraform.tfvars` file in the 
same directory as your Terraform script:
+
+```bash
+oap_instance_count = 2
+ui_instance_count  = 2
+region             = "us-west-1"
+instance_type      = "t2.large"
+public_key_path    = "/path/to/your/desired/location"
+extra_tags         = {
+  "Environment" = "Production"

Review Comment:
   👍 



##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions
+3. A working knowledge of Terraform and AWS resources
+
+## Instructions
+
+### 1. Initialization
+
+Before applying any Terraform script, initialize your Terraform working 
directory:
+
+```bash
+$ cd aws/
+$ terraform init
+```
+
+### 2. Configuration
+
+The script is designed with modularity and reusability in mind. Various 
parameters like region, instance count, instance type, etc., are exposed as 
variables for easier customization.
+
+#### Variables:
+
+| Variable Name       | Description                                          | 
Default Value               |
+|---------------------|------------------------------------------------------|-----------------------------|
+| `oap_instance_count`| Number of SkyWalking OAP instances                   | 
`1`                         |
+| `ui_instance_count` | Number of SkyWalking UI instances                    | 
`1`                         |
+| `region`            | AWS region where resources will be provisioned       | 
`us-east-1`                 |
+| `instance_type`     | AWS instance type for SkyWalking OAP and UI          | 
`t2.medium`                 |
+| `public_key_path`   | Path where the SSH key for instances will be stored  | 
`~/.ssh`                    |
+| `extra_tags`        | Additional tags that can be applied to all resources | 
`{}`                        |
+
+To modify the default values, you can create a `terraform.tfvars` file in the 
same directory as your Terraform script:
+
+```bash
+oap_instance_count = 2
+ui_instance_count  = 2
+region             = "us-west-1"
+instance_type      = "t2.large"
+public_key_path    = "/path/to/your/desired/location"
+extra_tags         = {
+  "Environment" = "Production"

Review Comment:
   👍 



##########
README.md:
##########
@@ -11,6 +11,88 @@ more cloud vendors:
 
 - Amazon Web Services (AWS): go to the [aws](aws) folder for more details.
 
+## Prerequisites
+
+1. Terraform installed
+2. AWS CLI set up with appropriate permissions
+3. A working knowledge of Terraform and AWS resources
+
+## Instructions
+
+### 1. Initialization
+
+Before applying any Terraform script, initialize your Terraform working 
directory:
+
+```bash
+$ cd aws/
+$ terraform init
+```
+
+### 2. Configuration
+
+The script is designed with modularity and reusability in mind. Various 
parameters like region, instance count, instance type, etc., are exposed as 
variables for easier customization.
+
+#### Variables:
+
+| Variable Name       | Description                                          | 
Default Value               |
+|---------------------|------------------------------------------------------|-----------------------------|
+| `oap_instance_count`| Number of SkyWalking OAP instances                   | 
`1`                         |
+| `ui_instance_count` | Number of SkyWalking UI instances                    | 
`1`                         |
+| `region`            | AWS region where resources will be provisioned       | 
`us-east-1`                 |
+| `instance_type`     | AWS instance type for SkyWalking OAP and UI          | 
`t2.medium`                 |
+| `public_key_path`   | Path where the SSH key for instances will be stored  | 
`~/.ssh`                    |
+| `extra_tags`        | Additional tags that can be applied to all resources | 
`{}`                        |
+
+To modify the default values, you can create a `terraform.tfvars` file in the 
same directory as your Terraform script:
+
+```bash
+oap_instance_count = 2
+ui_instance_count  = 2
+region             = "us-west-1"
+instance_type      = "t2.large"
+public_key_path    = "/path/to/your/desired/location"
+extra_tags         = {
+  "Environment" = "Production"
+}
+```
+
+### 3. Test and apply the outcomes of the Script
+
+After adjusting your configuration, test and apply the script:
+
+```bash
+$ terraform plan
+$ terraform apply

Review Comment:
   Same for the `$` sign



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to