You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/07/15 11:16:04 UTC

[incubator-dlab] branch DLAB-836 updated: [DLAB-792]: refactored DLab terraform

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-836
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-836 by this push:
     new 540c520  [DLAB-792]: refactored DLab terraform
540c520 is described below

commit 540c520ca61f241c6d25dfd29211b02643605ba6
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Mon Jul 15 14:15:54 2019 +0300

    [DLAB-792]: refactored DLab terraform
---
 .../terraform/aws/{modules/ami => ami/main}/ami.tf |   0
 .../aws/{modules/ami => ami/main}/variables.tf     |   0
 .../aws/{modules/common => common/main}/iam.tf     |   0
 .../aws/{modules/common => common/main}/network.tf |   0
 .../{modules/common => common/main}/variables.tf   |   0
 .../data_engine => data_engine/main}/instance.tf   |   0
 .../variables.tf => data_engine/main/main.tf}      |   3 +-
 .../data_engine => data_engine/main}/variables.tf  |   0
 .../aws/{modules/emr => emr/main}/instance.tf      |   0
 .../terraform/aws/emr/main/main.tf                 |   0
 .../aws/{modules/emr => emr/main}/variables.tf     |   0
 .../{modules/endpoint => endpoint/main}/README.md  |   0
 .../main}/files/assume-policy.json                 |   0
 .../main}/files/endpoint-policy.json               |   0
 .../aws/{modules/endpoint => endpoint/main}/iam.tf |   0
 .../endpoint => endpoint/main}/instance.tf         |   0
 .../terraform/aws/endpoint/main/main.tf            |   0
 .../{modules/endpoint => endpoint/main}/network.tf |   0
 .../endpoint => endpoint/main}/variables.tf        |   0
 .../terraform/aws/main/main.tf                     | 166 ---------------------
 .../terraform/aws/modules/nginx/variables.tf       |  28 ----
 .../terraform/aws/modules/ssn-k8s/variables.tf     |  62 --------
 .../notebook => notebooks/main}/instance.tf        |   0
 .../terraform/aws/notebooks/main/main.tf           |   0
 .../notebook => notebooks/main}/variables.tf       |   0
 .../main}/dlab-ui-chart/.helmignore                |   0
 .../main}/dlab-ui-chart/Chart.yaml                 |   0
 .../main}/dlab-ui-chart/templates/NOTES.txt        |   0
 .../main}/dlab-ui-chart/templates/_helpers.tpl     |   0
 .../main}/dlab-ui-chart/templates/deployment.yaml  |   0
 .../main}/dlab-ui-chart/templates/ingress.yaml     |   0
 .../main}/dlab-ui-chart/templates/service.yaml     |   0
 .../main}/dlab-ui-chart/values.yaml                |   0
 .../Chart.yaml => ssn-helm-charts/main/dlab-ui.tf} |  10 +-
 .../keycloak => ssn-helm-charts/main}/ingress.yaml |   0
 .../keycloak => ssn-helm-charts/main}/keycloak.tf  |   2 +-
 .../dlab-ui.tf => ssn-helm-charts/main/main.tf}    |   9 +-
 .../mongo => ssn-helm-charts/main}/mongo.tf        |  10 +-
 .../keycloak => ssn-helm-charts/main}/mysql.tf     |   0
 .../nginx => ssn-helm-charts/main}/nginx.tf        |   9 +-
 .../mongo => ssn-helm-charts/main}/variables.tf    |   9 ++
 .../{modules/ssn-k8s => ssn-k8s/main}/README.md    |   0
 .../main}/auto_scaling_groups.tf                   |   4 +-
 .../main}/files/assume-policy.json                 |   0
 .../main}/files/masters-user-data.sh               |   0
 .../main}/files/ssn-policy.json.tpl                |   0
 .../main}/files/workers-user-data.sh               |   0
 .../aws/{modules/ssn-k8s => ssn-k8s/main}/lb.tf    |   0
 .../terraform/aws/ssn-k8s/main/main.tf             |   5 +
 .../ssn-k8s => ssn-k8s/main}/role_policy.tf        |   4 +-
 .../aws/{modules/ssn-k8s => ssn-k8s/main}/s3.tf    |   0
 .../ssn-k8s => ssn-k8s/main}/security_groups.tf    |   0
 .../terraform/aws/{ => ssn-k8s}/main/variables.tf  |  90 +----------
 .../aws/{modules/ssn-k8s => ssn-k8s/main}/vpc.tf   |   0
 54 files changed, 31 insertions(+), 380 deletions(-)

diff --git a/infrastructure-provisioning/terraform/aws/modules/ami/ami.tf b/infrastructure-provisioning/terraform/aws/ami/main/ami.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ami/ami.tf
rename to infrastructure-provisioning/terraform/aws/ami/main/ami.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/ami/variables.tf b/infrastructure-provisioning/terraform/aws/ami/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ami/variables.tf
rename to infrastructure-provisioning/terraform/aws/ami/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/common/iam.tf b/infrastructure-provisioning/terraform/aws/common/main/iam.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/common/iam.tf
rename to infrastructure-provisioning/terraform/aws/common/main/iam.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/common/network.tf b/infrastructure-provisioning/terraform/aws/common/main/network.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/common/network.tf
rename to infrastructure-provisioning/terraform/aws/common/main/network.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/common/variables.tf b/infrastructure-provisioning/terraform/aws/common/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/common/variables.tf
rename to infrastructure-provisioning/terraform/aws/common/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/data_engine/instance.tf b/infrastructure-provisioning/terraform/aws/data_engine/main/instance.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/data_engine/instance.tf
rename to infrastructure-provisioning/terraform/aws/data_engine/main/instance.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/keycloak/variables.tf b/infrastructure-provisioning/terraform/aws/data_engine/main/main.tf
similarity index 98%
rename from infrastructure-provisioning/terraform/aws/modules/keycloak/variables.tf
rename to infrastructure-provisioning/terraform/aws/data_engine/main/main.tf
index 04cd33e..39191b2 100644
--- a/infrastructure-provisioning/terraform/aws/modules/keycloak/variables.tf
+++ b/infrastructure-provisioning/terraform/aws/data_engine/main/main.tf
@@ -17,4 +17,5 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# ******************************************************************************
\ No newline at end of file
+# ******************************************************************************
+
diff --git a/infrastructure-provisioning/terraform/aws/modules/data_engine/variables.tf b/infrastructure-provisioning/terraform/aws/data_engine/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/data_engine/variables.tf
rename to infrastructure-provisioning/terraform/aws/data_engine/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/emr/instance.tf b/infrastructure-provisioning/terraform/aws/emr/main/instance.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/emr/instance.tf
rename to infrastructure-provisioning/terraform/aws/emr/main/instance.tf
diff --git a/infrastructure-provisioning/terraform/aws/emr/main/main.tf b/infrastructure-provisioning/terraform/aws/emr/main/main.tf
new file mode 100644
index 0000000..e69de29
diff --git a/infrastructure-provisioning/terraform/aws/modules/emr/variables.tf b/infrastructure-provisioning/terraform/aws/emr/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/emr/variables.tf
rename to infrastructure-provisioning/terraform/aws/emr/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/README.md b/infrastructure-provisioning/terraform/aws/endpoint/main/README.md
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/README.md
rename to infrastructure-provisioning/terraform/aws/endpoint/main/README.md
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/assume-policy.json b/infrastructure-provisioning/terraform/aws/endpoint/main/files/assume-policy.json
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/assume-policy.json
rename to infrastructure-provisioning/terraform/aws/endpoint/main/files/assume-policy.json
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/files/endpoint-policy.json b/infrastructure-provisioning/terraform/aws/endpoint/main/files/endpoint-policy.json
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/files/endpoint-policy.json
rename to infrastructure-provisioning/terraform/aws/endpoint/main/files/endpoint-policy.json
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/iam.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/iam.tf
rename to infrastructure-provisioning/terraform/aws/endpoint/main/iam.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/instance.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/instance.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/instance.tf
rename to infrastructure-provisioning/terraform/aws/endpoint/main/instance.tf
diff --git a/infrastructure-provisioning/terraform/aws/endpoint/main/main.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/main.tf
new file mode 100644
index 0000000..e69de29
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/network.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/network.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/network.tf
rename to infrastructure-provisioning/terraform/aws/endpoint/main/network.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/variables.tf b/infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/variables.tf
rename to infrastructure-provisioning/terraform/aws/endpoint/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/main/main.tf b/infrastructure-provisioning/terraform/aws/main/main.tf
deleted file mode 100644
index 26ee5ec..0000000
--- a/infrastructure-provisioning/terraform/aws/main/main.tf
+++ /dev/null
@@ -1,166 +0,0 @@
-# *****************************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# ******************************************************************************
-
-provider "aws" {
-  region     = var.region
-  access_key = var.access_key_id
-  secret_key = var.secret_access_key
-}
-
-module "ssn-k8s" {
-  source                  = "../modules/ssn-k8s"
-  service_base_name       = var.service_base_name
-  vpc_id                  = var.vpc_id
-  vpc_cidr                = var.vpc_cidr
-  subnet_id_a             = var.subnet_id_a
-  subnet_id_b             = var.subnet_id_b
-  env_os                  = var.env_os
-  ami                     = var.ami
-  key_name                = var.key_name
-  region                  = var.region
-  zone                    = var.zone
-  ssn_k8s_masters_count   = var.ssn_k8s_masters_count
-  ssn_k8s_workers_count   = var.ssn_k8s_workers_count
-  ssn_root_volume_size    = var.ssn_root_volume_size
-  allowed_cidrs           = var.allowed_cidrs
-  subnet_cidr_a           = var.subnet_cidr_a
-  subnet_cidr_b           = var.subnet_cidr_b
-  subnet_cidr_c           = var.subnet_cidr_c
-  ssn_k8s_masters_shape   = var.ssn_k8s_masters_shape
-  ssn_k8s_workers_shape   = var.ssn_k8s_workers_shape
-  os_user                 = var.os_user
-}
-
-module "common" {
-  source        = "../modules/common"
-  project_tag   = "${var.project_tag}"
-  endpoint_tag  = "${var.endpoint_tag}"
-  user_tag      = "${var.user_tag}"
-  custom_tag    = "${var.custom_tag}"
-  notebook_name = "${var.notebook_name}"
-  region        = "${var.region}"
-  zone          = "${var.zone}"
-  product       = "${var.product_name}"
-  vpc           = "${var.vpc_id}"
-  cidr_range    = "${var.note_cidr_range}"
-  traefik_cidr  = "${var.traefik_cidr}"
-  instance_type = "${var.instance_type}"
-}
-
-module "notebook" {
-  source            = "../modules/notebook"
-  project_tag       = "${var.project_tag}"
-  endpoint_tag      = "${var.endpoint_tag}"
-  user_tag          = "${var.user_tag}"
-  custom_tag        = "${var.custom_tag}"
-  notebook_name     = "${var.notebook_name}"
-  subnet_id         = "${var.subnet_id_a}"
-  nb-sg_id          = "${var.nb-sg_id}"
-  note_profile_name = "${var.note_profile_name}"
-  product           = "${var.product_name}"
-  note_ami          = "${var.note_ami}"
-  instance_type     = "${var.instance_type}"
-  key_name          = "${var.key_name}"
-}
-
-module "data_engine" {
-  source            = "../modules/data_engine"
-  project_tag       = "${var.project_tag}"
-  endpoint_tag      = "${var.endpoint_tag}"
-  user_tag          = "${var.user_tag}"
-  custom_tag        = "${var.custom_tag}"
-  notebook_name     = "${var.notebook_name}"
-  subnet_id         = "${var.subnet_id_a}"
-  nb-sg_id          = "${var.nb-sg_id}"
-  note_profile_name = "${var.note_profile_name}"
-  product           = "${var.product_name}"
-  note_ami          = "${var.note_ami}"
-  instance_type     = "${var.instance_type}"
-  key_name          = "${var.key_name}"
-  cluster_name      = "${var.cluster_name}"
-  slave_count       = "${var.slave_count}"
-  ami               = "${var.ami}"
-}
-
-module "emr" {
-  source            = "../modules/emr"
-  project_tag       = "${var.project_tag}"
-  endpoint_tag      = "${var.endpoint_tag}"
-  user_tag          = "${var.user_tag}"
-  custom_tag        = "${var.custom_tag}"
-  notebook_name     = "${var.notebook_name}"
-  subnet_id         = "${var.subnet_id_a}"
-  nb-sg_id          = "${var.nb-sg_id}"
-  note_profile_name = "${var.note_profile_name}"
-  product           = "${var.product_name}"
-  note_ami          = "${var.note_ami}"
-  emr_template      = "${var.emr_template}"
-  master_shape      = "${var.master_shape}"
-  slave_shape       = "${var.slave_shape}"
-  key_name          = "${var.key_name}"
-  cluster_name      = "${var.cluster_name}"
-  instance_count    = "${var.instance_count}"
-  bid_price         = "${var.bid_price}"
-}
-
-module "ami" {
-  source             = "../modules/ami"
-  source_instance_id = "${var.source_instance_id}"
-  project_tag        = "${var.project_tag}"
-  notebook_name      = "${var.notebook_name}"
-}
-
-module "endpoint" {
-  source                  = "../modules/endpoint"
-  service_base_name       = var.service_base_name
-  region                  = var.region
-  zone                    = var.zone
-  product                 = var.product_name
-  subnet_cidr             = var.subnet_cidr_a
-  endpoint_instance_shape = var.endpoint_instance_shape
-  key_name                = var.key_name
-  ami                     = var.ami
-  vpc_id                  = var.vpc_id
-  subnet_id               = var.subnet_id_a
-  network_type            = var.network_type
-  vpc_cidr                = var.vpc_cidr
-  endpoint_volume_size    = var.endpoint_volume_size
-}
-
-module "nginx" {
-  source             = "../modules/nginx"
-}
-
-module "mongo" {
-  source             = "../modules/mongo"
-}
-
-module "keycloak" {
-  source             = "../modules/keycloak"
-}
-
-module "dlab-ui" {
-  source             = "../modules/dlab-ui"
-}
-
-output "ssn_k8s_masters_ip_addresses" {
-  value = module.ssn-k8s.ssn_k8s_masters_ip_addresses
-}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/nginx/variables.tf b/infrastructure-provisioning/terraform/aws/modules/nginx/variables.tf
deleted file mode 100644
index d6d6143..0000000
--- a/infrastructure-provisioning/terraform/aws/modules/nginx/variables.tf
+++ /dev/null
@@ -1,28 +0,0 @@
-# *****************************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# ******************************************************************************
-variable "nginx_http_port" {
-    default = "31080"
-    description = "Sets the nodePort that maps to the Ingress' port 80"
-}
-variable "nginx_https_port" {
-    default = "31443"
-    description = "Sets the nodePort that maps to the Ingress' port 443"
-}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/variables.tf b/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/variables.tf
deleted file mode 100644
index a9ef123..0000000
--- a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/variables.tf
+++ /dev/null
@@ -1,62 +0,0 @@
-# *****************************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# ******************************************************************************
-
-variable "service_base_name" {}
-
-variable "vpc_id" {}
-
-variable "vpc_cidr" {}
-
-variable "subnet_id_a" {}
-
-variable "subnet_id_b" {}
-
-variable "subnet_cidr_a" {}
-
-variable "subnet_cidr_b" {}
-
-variable "subnet_cidr_c" {}
-
-variable "env_os" {}
-
-variable "ami" {}
-
-variable "key_name" {}
-
-variable "region" {}
-
-variable "zone" {}
-
-variable "ssn_k8s_masters_count" {}
-
-variable "ssn_k8s_workers_count" {}
-
-variable "ssn_root_volume_size" {}
-
-variable "allowed_cidrs" {
-  type = list
-}
-
-variable "ssn_k8s_masters_shape" {}
-
-variable "ssn_k8s_workers_shape" {}
-
-variable "os_user" {}
diff --git a/infrastructure-provisioning/terraform/aws/modules/notebook/instance.tf b/infrastructure-provisioning/terraform/aws/notebooks/main/instance.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/notebook/instance.tf
rename to infrastructure-provisioning/terraform/aws/notebooks/main/instance.tf
diff --git a/infrastructure-provisioning/terraform/aws/notebooks/main/main.tf b/infrastructure-provisioning/terraform/aws/notebooks/main/main.tf
new file mode 100644
index 0000000..e69de29
diff --git a/infrastructure-provisioning/terraform/aws/modules/notebook/variables.tf b/infrastructure-provisioning/terraform/aws/notebooks/main/variables.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/notebook/variables.tf
rename to infrastructure-provisioning/terraform/aws/notebooks/main/variables.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/.helmignore
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/.helmignore
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/Chart.yaml
similarity index 100%
copy from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
copy to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/Chart.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/NOTES.txt
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/NOTES.txt
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/_helpers.tpl b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/_helpers.tpl
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/_helpers.tpl
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/_helpers.tpl
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/deployment.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/deployment.yaml
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/deployment.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/deployment.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/ingress.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/ingress.yaml
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/ingress.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/ingress.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/service.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/service.yaml
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/service.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/templates/service.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/values.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/values.yaml
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/values.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui-chart/values.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui.tf
similarity index 87%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui.tf
index 3e7800b..fd818e8 100644
--- a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/dlab-ui.tf
@@ -19,8 +19,8 @@
 #
 # ******************************************************************************
 
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for Kubernetes
-name: dlab-ui
-version: 0.1.0
+resource "helm_release" "dlab-ui" {
+    name      = "dlab-ui"
+    chart     = "./dlab-ui-chart"
+    depends_on = [helm_release.mongodb]
+}
diff --git a/infrastructure-provisioning/terraform/aws/modules/keycloak/ingress.yaml b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/ingress.yaml
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/keycloak/ingress.yaml
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/ingress.yaml
diff --git a/infrastructure-provisioning/terraform/aws/modules/keycloak/keycloak.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/keycloak.tf
similarity index 97%
rename from infrastructure-provisioning/terraform/aws/modules/keycloak/keycloak.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/keycloak.tf
index 7b8be2d..ada495a 100644
--- a/infrastructure-provisioning/terraform/aws/modules/keycloak/keycloak.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/keycloak.tf
@@ -73,5 +73,5 @@ resource "helm_release" "keycloak" {
     name = "keycloak.service.nodePort"
     value = "31088"
   }
-
+  depends_on = [helm_release.keycloak-mysql]
 }
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/main.tf
similarity index 90%
rename from infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/main.tf
index 2cf2426..aa9282f 100644
--- a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/main.tf
@@ -18,16 +18,9 @@
 # under the License.
 #
 # ******************************************************************************
-
 provider "helm" {
     install_tiller  = true
     namespace       = "kube-system"
     service_account = "tiller"
     tiller_image    = "gcr.io/kubernetes-helm/tiller:v2.14.1"
-}
-
-
-resource "helm_release" "dlab-ui" {
-    name      = "dlab-ui"
-    chart     = "../modules/dlab-ui/dlab-ui-chart"
-}
+}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/mongo/mongo.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mongo.tf
similarity index 88%
rename from infrastructure-provisioning/terraform/aws/modules/mongo/mongo.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mongo.tf
index ead3e8e..ec9b400 100644
--- a/infrastructure-provisioning/terraform/aws/modules/mongo/mongo.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mongo.tf
@@ -18,15 +18,8 @@
 # under the License.
 #
 # ******************************************************************************
-provider "helm" {
-    install_tiller  = true
-    namespace       = "kube-system"
-    service_account = "tiller"
-    tiller_image    = "gcr.io/kubernetes-helm/tiller:v2.14.1"
-}
-
 
-resource "helm_release" "my_mongo" {
+resource "helm_release" "mongodb" {
     name      = "mongo-ha"
     chart     = "stable/mongodb"
 
@@ -63,4 +56,5 @@ resource "helm_release" "my_mongo" {
         name = "persistence.enabled"
         value = "false"
     }
+    depends_on = [helm_release.nginx]
 }
diff --git a/infrastructure-provisioning/terraform/aws/modules/keycloak/mysql.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/keycloak/mysql.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/mysql.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/nginx/nginx.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/nginx.tf
similarity index 86%
rename from infrastructure-provisioning/terraform/aws/modules/nginx/nginx.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/nginx.tf
index 26466b8..9b51e84 100644
--- a/infrastructure-provisioning/terraform/aws/modules/nginx/nginx.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/nginx.tf
@@ -18,15 +18,8 @@
 # under the License.
 #
 # ******************************************************************************
-provider "helm" {
-    install_tiller  = true
-    namespace       = "kube-system"
-    service_account = "tiller"
-    tiller_image    = "gcr.io/kubernetes-helm/tiller:v2.14.1"
-}
-
 
-resource "helm_release" "my_mongo" {
+resource "helm_release" "nginx" {
     name      = "nginx-ingress"
     chart     = "stable/nginx-ingress"
 
diff --git a/infrastructure-provisioning/terraform/aws/modules/mongo/variables.tf b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
similarity index 85%
rename from infrastructure-provisioning/terraform/aws/modules/mongo/variables.tf
rename to infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
index 16342e5..1837993 100644
--- a/infrastructure-provisioning/terraform/aws/modules/mongo/variables.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-helm-charts/main/variables.tf
@@ -18,6 +18,15 @@
 # under the License.
 #
 # ******************************************************************************
+variable "nginx_http_port" {
+    default = "31080"
+    description = "Sets the nodePort that maps to the Ingress' port 80"
+}
+variable "nginx_https_port" {
+    default = "31443"
+    description = "Sets the nodePort that maps to the Ingress' port 443"
+}
+
 variable "mongo_root_pwd" {
     default = "$tr0ng_r00T-passworI)"
     description = "Password for MongoDB root user"
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/README.md b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/README.md
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/README.md
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/README.md
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/auto_scaling_groups.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/auto_scaling_groups.tf
similarity index 97%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/auto_scaling_groups.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/auto_scaling_groups.tf
index 0ee3f35..1e28509 100644
--- a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/auto_scaling_groups.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/auto_scaling_groups.tf
@@ -24,7 +24,7 @@ locals {
 }
 
 data "template_file" "ssn_k8s_masters_user_data" {
-  template = file("../modules/ssn-k8s/files/masters-user-data.sh")
+  template = file("./files/masters-user-data.sh")
   vars = {
     k8s-asg = "${var.service_base_name}-ssn-masters"
     k8s-region = var.region
@@ -36,7 +36,7 @@ data "template_file" "ssn_k8s_masters_user_data" {
 }
 
 data "template_file" "ssn_k8s_workers_user_data" {
-  template = file("../modules/ssn-k8s/files/workers-user-data.sh")
+  template = file("./files/workers-user-data.sh")
   vars = {
     k8s-bucket-name = aws_s3_bucket.ssn_k8s_bucket.id
     k8s_os_user = var.os_user
diff --git a/infrastructure-provisioning/terraform/aws/modules/endpoint/files/assume-policy.json b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/assume-policy.json
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/endpoint/files/assume-policy.json
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/assume-policy.json
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/masters-user-data.sh b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/masters-user-data.sh
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/masters-user-data.sh
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/masters-user-data.sh
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/ssn-policy.json.tpl b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/ssn-policy.json.tpl
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/workers-user-data.sh b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/workers-user-data.sh
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/files/workers-user-data.sh
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/workers-user-data.sh
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/lb.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/lb.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/lb.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/lb.tf
diff --git a/infrastructure-provisioning/terraform/aws/ssn-k8s/main/main.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/main.tf
new file mode 100644
index 0000000..a34a079
--- /dev/null
+++ b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/main.tf
@@ -0,0 +1,5 @@
+provider "aws" {
+  region     = var.region
+  access_key = var.access_key_id
+  secret_key = var.secret_access_key
+}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/role_policy.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/role_policy.tf
similarity index 92%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/role_policy.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/role_policy.tf
index 1e7f947..c6f9fc8 100644
--- a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/role_policy.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/role_policy.tf
@@ -20,7 +20,7 @@
 # ******************************************************************************
 
 data "template_file" "ssn_k8s_s3_policy" {
-  template = file("../modules/ssn-k8s/files/ssn-policy.json.tpl")
+  template = file("./files/ssn-policy.json.tpl")
   vars = {
     bucket_arn = aws_s3_bucket.ssn_k8s_bucket.arn
   }
@@ -34,7 +34,7 @@ resource "aws_iam_policy" "ssn_k8s_policy" {
 
 resource "aws_iam_role" "ssn_k8s_role" {
   name               = "${var.service_base_name}-ssn-role"
-  assume_role_policy = file("../modules/ssn-k8s/files/assume-policy.json")
+  assume_role_policy = file("./files/assume-policy.json")
   tags = {
     Name = "${var.service_base_name}-ssn-role"
   }
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/s3.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/s3.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/s3.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/s3.tf
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/security_groups.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/security_groups.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/security_groups.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/security_groups.tf
diff --git a/infrastructure-provisioning/terraform/aws/main/variables.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/variables.tf
similarity index 68%
rename from infrastructure-provisioning/terraform/aws/main/variables.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/variables.tf
index fc50cf2..1459959 100644
--- a/infrastructure-provisioning/terraform/aws/main/variables.tf
+++ b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/variables.tf
@@ -95,92 +95,4 @@ variable "ssn_k8s_masters_shape" {
 
 variable "ssn_k8s_workers_shape" {
   default = "t2.medium"
-}
-
-variable "endpoint_tag" {
-  default = ""
-}
-
-variable "user_tag" {
-  default = ""
-}
-
-variable "custom_tag" {
-  default = ""
-}
-
-variable "notebook_name" {
-  default = ""
-}
-
-variable "product_name" {
-  default = ""
-}
-
-variable "nb-sg_id" {
-  default = ""
-}
-
-variable "note_profile_name" {
-  default = ""
-}
-
-variable "note_cidr_range" {
-  default = ""
-}
-
-variable "traefik_cidr" {
-  default = ""
-}
-
-variable "note_ami" {
-  default = ""
-}
-
-variable "instance_type" {
-  default = ""
-}
-
-variable "cluster_name" {
-  default = ""
-}
-
-variable "slave_count" {
-  default = 1
-}
-
-variable "emr_template" {
-  default = ""
-}
-
-variable "master_shape" {
-  default = ""
-}
-
-variable "slave_shape" {
-  default = ""
-}
-
-variable "instance_count" {
-  default = 1
-}
-
-variable "bid_price" {
-  default = ""
-}
-
-variable "source_instance_id" {
-  default = ""
-}
-
-variable "endpoint_instance_shape" {
-  default = "t2.medium"
-}
-
-variable "network_type" {
-  default = "public"
-}
-
-variable "endpoint_volume_size" {
-  default = "30"
-}
+}
\ No newline at end of file
diff --git a/infrastructure-provisioning/terraform/aws/modules/ssn-k8s/vpc.tf b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/vpc.tf
similarity index 100%
rename from infrastructure-provisioning/terraform/aws/modules/ssn-k8s/vpc.tf
rename to infrastructure-provisioning/terraform/aws/ssn-k8s/main/vpc.tf


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org