Wrong URL format fix 84/114284/13 guilin 7.0.1
authoryoonsoonjahng <yoonsoon.jahng@yoppworks.com>
Tue, 27 Oct 2020 17:14:37 +0000 (13:14 -0400)
committeryoonsoonjahng <yoonsoon.jahng@yoppworks.com>
Tue, 3 Nov 2020 14:50:19 +0000 (09:50 -0500)
1. Changed wrong url format
2. Fixed wrong host name
3. Updated REAME file more descriptive

Issue-ID: INT-1753

Change-Id: I5bd4e0247fdb2204b097da683f7b6bb4ffb6aefe
Signed-off-by: yoonsoonjahng <yoonsoon.jahng@yoppworks.com>
README.md
terragrunt/openlab/RegionOne/stage/compute/control/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/compute/nfsserver/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/compute/worker/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/env.hcl
terragrunt/openlab/RegionOne/stage/keypair/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/kubernetes/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/network/terragrunt.hcl
terragrunt/openlab/RegionOne/stage/rancher/terragrunt.hcl
terragrunt/openlab/account.hcl

index 5a23f82..bcefe88 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,8 +14,11 @@ This Terragrunt(Terraform) code provides the same infrastructure as you would cr
 ```
 openlab             # Terragrunt scripts to feed configuration into the Terraform modules 
  └ RegionOne        # For multi regions. e.g, us-east-1
-   └ stage          # Environment specific configuration. e.g, QA/Stage/Prod
-     └ resource
+ |  └ stage         # Environment specific configuration. e.g, QA/Stage/Prod
+ |    └ resource
+ └ RegionTwo        # For multi regions. e.g, us-east-1
+    └ Prod           # Environment specific configuration. e.g, QA/Stage/Prod
+      └ resource    
 ```
 
 Infrastrucuture is organized hierarchically in folders.
@@ -32,16 +35,35 @@ We deployed VMs and K8s with the scripts and after that we deployed ONAP Frankfu
 ### Usage
 #### Set up environment variables for your target cloud.
 
-1.a You need to export cloud storage credential.
+1. You need to export cloud storage credential.
 For instance, if you use Google Storage bucket, you can download the credentials from Google UI or the command-line tool.
 Go to Google Cloud project's `IAM & Admin` menu and choose the service account associated with the storage.
 You can export the credential as a JSON formatted file.  Then
 `export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credential-file`.
 Please, refer to the following [link](https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
 
-Second, you need to export Openstack credentials. You can use the openstack.rc file downloaded from your Openstack project.
+2. you need to export Openstack credentials. You can use the openstack.rc file downloaded from your Openstack project.
 Please, refer to the following [link](https://docs.openstack.org/ocata/user-guide/common/cli-set-environment-variables-using-openstack-rc.html) for details.
 
+3. expose your KUBECONFIG environmental variable. kube_config_cluster.yaml file will be created under the stage directory. This file contains 
+the login credential for the new Kubernetes cluster. You have to provide the full path of the kube_config_cluster.yaml file. 
+
+4. check all the environmental variables are set with the `env` command.
+For example,
+```
+GOOGLE_APPLICATION_CREDENTIALS=/path/to/google_credential
+
+password=OpenstackPassowrd
+
+user_name=OpenstackUser
+
+auth_url=http://x.x.x.x:..
+
+project_id=12345667
+
+KUBECONFIG=/path/to/terragrunt/openlab/RegionOne/stage/kube_config_cluster.yaml
+```
+
 #### Fill in files
  - `account.hcl`: Top-level configuration for a cloud account.
  - `region.hcl`: The second level configuration for a region within the cloud
@@ -56,6 +78,9 @@ Terraform version 0.13 is required.
 
 https://github.com/gruntwork-io/terragrunt-infrastructure-live-example#deploying-all-modules-in-a-region
 
+If you have multiple environments, you have to have a directory for it. Stage directory contains subdirectories for underlying infrastructure.
+You can simple copy the stage directory and paste it under RegionOne directory. If your cluster runs in a different region, you have to change the name of RegionOne into the region where your cluster runs.
+
 ####  Updating infrastructure version
 Infrastructure may evolve. You can use existing infrastructure as it is or updating the infrastructure to meet a new requirement.
 To deploy a different version of infrastructure, you can change a tag of `source` module version.
index 46a2c24..fadd4c9 100644 (file)
@@ -9,7 +9,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/openstack/compute"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/openstack/compute"
 }
 
 include {
@@ -25,7 +25,7 @@ inputs = {
   environment  = local.environment
   cluster_name = "${local.region}-${local.environment}"
 
-  node_name        = "worker-node"
+  node_name        = "control-node"
   image            = "ubuntu-18.04"
   flavor           = "m1.xlarge"
   floating_ip_pool = "external"
index 4e7f83f..9d0a213 100644 (file)
@@ -9,7 +9,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/openstack/compute"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/openstack/compute"
 }
 
 include {
index 8d33ae4..b57276a 100644 (file)
@@ -9,7 +9,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/openstack/compute"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/openstack/compute"
 }
 
 include {
index cb68eb2..0602dcf 100644 (file)
@@ -10,7 +10,7 @@ locals {
   ssh_public_key       = "" # OpenSSH formated string is required
   ssh_private_key_path = "" # e.g ~/.ssh/id_rsa
 
-  kubernetes_version      = "v1.15.11-rancher1-2"
+  kubernetes_version      = "v1.15.11-rancher1-2" # rke version. please, check the correct rke version at https://github.com/rancher/rke/releases/
   kubernetes_user         = "ubuntu"
   kubernetes_cluster_name = "rke_cluster"
 
index 35e02ee..fe6500c 100644 (file)
@@ -9,7 +9,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/openstack/keypair"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/openstack/keypair"
 }
 
 include {
index e6c0abb..ec6b60c 100644 (file)
@@ -20,7 +20,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/kubernetes/kubernetes"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/kubernetes/kubernetes"
 }
 
 include {
index 31ff4f7..eb50f3b 100644 (file)
@@ -9,7 +9,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/openstack/network"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/openstack/network"
 }
 
 include {
index 1d01e11..c0a762d 100644 (file)
@@ -18,7 +18,7 @@ locals {
 }
 
 terraform {
-  source = "git::https://gerrit.onap.org/r/integration/terraform/openlab/modules/kubernetes/rancher"
+  source = "git::https://gerrit.onap.org/r/integration/terraform//openlab/modules/kubernetes/rancher"
 }
 
 include {
index 27c5cf0..723c6f1 100644 (file)
@@ -2,7 +2,7 @@
 # terragrunt.hcl configuration.
 # For Openstack, please fill in the values below
 locals {
-  user_name     = "${get_env("user_name", "")}" # Expose environmental variables for your account
+  user_name     = "${get_env("user_name", "")}" # Expose environmental variables for your account. e.g. $>source openstack.rc
   password      = "${get_env("password", "")}"
   project_id    = "${get_env("project_id", "")}"
   auth_url      = "${get_env("auth_url", "")}"