[ 
https://issues.apache.org/jira/browse/BEAM-13841?focusedWorklogId=739238&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739238
 ]

ASF GitHub Bot logged work on BEAM-13841:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Mar/22 01:54
            Start Date: 10/Mar/22 01:54
    Worklog Time Spent: 10m 
      Work Description: damondouglas commented on a change in pull request 
#16822:
URL: https://github.com/apache/beam/pull/16822#discussion_r823061143



##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground 
cluster deployment on GC
 
 # Deployment steps
 
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' > 
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
 ## 1. Provision infrastructure

Review comment:
       `## 2. Provision infrastructure`

##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground 
cluster deployment on GC
 
 # Deployment steps
 
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' > 
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
 ## 1. Provision infrastructure
 
-To deploy Playground infrastructure follow 
[README.md](./infrastructure/README.md) for infrastructure module.
+To deploy Playground infrastructure follow 
[README.md](./infrastructure/README.md) for infrastructure module or run
+gradle task:
+
+```bash
+./gradlew playground:terraform:InitInfrastructure 
-Pproject_environment="env-name" -Pdocker-tag="tag"
+```
+
+## 2. Deploy application

Review comment:
       `## 3. Deploy application`

##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground 
cluster deployment on GC
 
 # Deployment steps
 
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' > 
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.

Review comment:
       How would someone know the necessary variables?  When I use `*.tfvars` 
file in the same module as my terraform code by convention both visual studio 
code and IntelliJ parse the variables file and prompt a developer to fill out 
the right variables via auto completion.  By having this file in 
`env-name/terraform.tfvars` it makes it challenging for someone to know what to 
do unless they run through the solution and copy/paste variable names.

##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground 
cluster deployment on GC
 
 # Deployment steps
 
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:
+
+* New environment folder
+
+```bash
+mkdir environment/env-name
+```
+
+* Backend config
+
+```bash
+echo 'bucket = "put your state bucket name here"' > 
environment/env-name/state.tfbackend
+```
+
+* Terraform variables config and provide necessary variables
+
+```bash
+touch environment/env-name/terraform.tfvars
+```
+
+Then provide necesarry variables.
+
 ## 1. Provision infrastructure
 
-To deploy Playground infrastructure follow 
[README.md](./infrastructure/README.md) for infrastructure module.
+To deploy Playground infrastructure follow 
[README.md](./infrastructure/README.md) for infrastructure module or run
+gradle task:
+
+```bash
+./gradlew playground:terraform:InitInfrastructure 
-Pproject_environment="env-name" -Pdocker-tag="tag"

Review comment:
       I get the error:
   ```
   Error: Failed to get existing workspaces: querying Cloud Storage failed: 
storage: bucket doesn't exist
   ```

##########
File path: playground/terraform/README.md
##########
@@ -28,14 +28,64 @@ The following items need to be setup for the Playground 
cluster deployment on GC
 
 # Deployment steps
 
+## 0. Create GCS bucket for state
+
+```bash
+$ gsutil mb -p ${PROJECT_ID} gs://state-bucket-name
+$ gsutil versioning set on gs://state-bucket-name
+```
+
+## 1. Create new environment
+
+To provide informantion about terraform backend, please create:

Review comment:
       May we consider: 'To provide information about the terraform backend, 
run the following commands.'




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 739238)
    Time Spent: 13h  (was: 12h 50m)

> [Playground] Union application terraform modules to common submodule
> --------------------------------------------------------------------
>
>                 Key: BEAM-13841
>                 URL: https://issues.apache.org/jira/browse/BEAM-13841
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-playground
>            Reporter: Ilya Kozyrev
>            Assignee: Andrey Kustov
>            Priority: P2
>              Labels: beam-playground-devops, beam-playground-sprint-8
>          Time Spent: 13h
>  Remaining Estimate: 0h
>
> Currently, all applications services for different SDK and router is 
> independent terraform modules, to deploy all of them requires applying 
> resources from different folders. 
> Goal - make all application deployment a common sub-module.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to