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 2020/01/30 13:25:06 UTC
[incubator-dlab] branch DLAB-1493 updated: [DLAB-1493]: Added
users_subnet_range functionality to GCP
This is an automated email from the ASF dual-hosted git repository.
omartushevskyi pushed a commit to branch DLAB-1493
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1493 by this push:
new 8c4934e [DLAB-1493]: Added users_subnet_range functionality to GCP
8c4934e is described below
commit 8c4934ec560567c7115fbd464715be7185f4d5f8
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Thu Jan 30 15:24:54 2020 +0200
[DLAB-1493]: Added users_subnet_range functionality to GCP
---
infrastructure-provisioning/scripts/deploy_dlab.py | 1 +
infrastructure-provisioning/src/general/conf/dlab.ini | 7 ++-----
.../src/general/scripts/aws/project_prepare.py | 2 +-
.../src/general/scripts/azure/edge_prepare.py | 2 +-
.../src/general/scripts/azure/project_prepare.py | 2 +-
.../src/general/scripts/gcp/edge_configure.py | 2 +-
.../src/general/scripts/gcp/project_prepare.py | 2 +-
7 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/infrastructure-provisioning/scripts/deploy_dlab.py b/infrastructure-provisioning/scripts/deploy_dlab.py
index 3064b97..33a5f6d 100644
--- a/infrastructure-provisioning/scripts/deploy_dlab.py
+++ b/infrastructure-provisioning/scripts/deploy_dlab.py
@@ -36,6 +36,7 @@ parser.add_argument('--conf_allowed_ip_cidr', type=str, default='', help='Comma-
parser.add_argument('--conf_user_subnets_range', type=str, default='', help='Range of subnets which will be using for '
'users environments. For example: '
'10.10.0.0/24 - 10.10.10.0/24')
+parser.add_argument('--conf_private_subnet_prefix', type=str, default='24', help='Private subnet prefix')
parser.add_argument('--conf_additional_tags', type=str, default='', help='Additional tags in format '
'"Key1:Value1;Key2:Value2"')
parser.add_argument('--conf_image_enabled', type=str, default='', help='Enable or Disable creating image at first time')
diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini b/infrastructure-provisioning/src/general/conf/dlab.ini
index e2055e0..baf2ce4 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -77,6 +77,8 @@ stepcerts_enabled = false
# stepcerts_kid_password =
### Step certificates CA URL
# stepcerts_ca_url =
+### Prefix of the private subnet
+private_subnet_prefix = 24
#--- [aws] section contains all common parameters related to Amazon ---#
[aws]
@@ -100,8 +102,6 @@ stepcerts_enabled = false
# iam_user =
### EC2 instance type for notebook
# notebook_instance_type =
-### Prefix of the private subnet
-private_subnet_prefix = 24
### EC2 instance type for SSN
ssn_instance_size = t2.large
### EC2 instance type for EDGE
@@ -138,8 +138,6 @@ redhat_image_name = RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2
ssn_instance_size = Standard_DS2_v2
### Instance type for EDGE
edge_instance_size = Standard_DS1_v2
-### Prefix of the private subnet
-private_subnet_prefix = 24
### Master node size for Data Engine
# dataengine_master_size =
### Slave node size for Data Engine
@@ -187,7 +185,6 @@ debian_image_name = /projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v
### GCP ami name based on RedHat conf_os_family for all dlab instances
redhat_image_name =
### Prefix of the private subnet
-private_subnet_prefix = 24
### Instance type for EDGE
ssn_instance_size = n1-standard-2
### Instance type for EDGE
diff --git a/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
index 019eace..e7fb4ed 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
@@ -83,7 +83,7 @@ if __name__ == "__main__":
.format(project_conf['service_base_name'].lower().replace('-', '_'), os.environ['project_name'])
project_conf['notebook_security_group_name'] = '{}-{}-nb-sg'.format(project_conf['service_base_name'],
os.environ['project_name'])
- project_conf['private_subnet_prefix'] = os.environ['aws_private_subnet_prefix']
+ project_conf['private_subnet_prefix'] = os.environ['conf_private_subnet_prefix']
project_conf['private_subnet_name'] = '{0}-{1}-subnet'.format(project_conf['service_base_name'],
os.environ['project_name'])
project_conf['dataengine_master_security_group_name'] = '{}-{}-dataengine-master-sg' \
diff --git a/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
index 0f00ce2..d0c36e2 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/edge_prepare.py
@@ -57,7 +57,7 @@ if __name__ == "__main__":
edge_conf['static_public_ip_name'] = edge_conf['service_base_name'] + "-" + edge_conf['user_name'] + '-edge-ip'
edge_conf['region'] = os.environ['azure_region']
edge_conf['vpc_cidr'] = os.environ['conf_vpc_cidr']
- edge_conf['private_subnet_prefix'] = os.environ['azure_private_subnet_prefix']
+ edge_conf['private_subnet_prefix'] = os.environ['conf_private_subnet_prefix']
edge_conf['instance_name'] = edge_conf['service_base_name'] + "-" + edge_conf['user_name'] + '-edge'
edge_conf['primary_disk_name'] = edge_conf['instance_name'] + '-disk0'
edge_conf['edge_security_group_name'] = edge_conf['instance_name'] + '-sg'
diff --git a/infrastructure-provisioning/src/general/scripts/azure/project_prepare.py b/infrastructure-provisioning/src/general/scripts/azure/project_prepare.py
index c485ff9..313d3f1 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/project_prepare.py
@@ -59,7 +59,7 @@ if __name__ == "__main__":
project_conf['static_public_ip_name'] = project_conf['service_base_name'] + "-" + project_conf['project_name'] + '-edge-ip'
project_conf['region'] = os.environ['azure_region']
project_conf['vpc_cidr'] = os.environ['conf_vpc_cidr']
- project_conf['private_subnet_prefix'] = os.environ['azure_private_subnet_prefix']
+ project_conf['private_subnet_prefix'] = os.environ['conf_private_subnet_prefix']
project_conf['instance_name'] = '{0}-{1}-{2}-edge'.format(project_conf['service_base_name'],
project_conf['project_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
index 45e0115..4c15986 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/edge_configure.py
@@ -54,7 +54,7 @@ if __name__ == "__main__":
edge_conf['region'] = os.environ['gcp_region']
edge_conf['zone'] = os.environ['gcp_zone']
edge_conf['vpc_selflink'] = GCPMeta().get_vpc(edge_conf['vpc_name'])['selfLink']
- edge_conf['private_subnet_prefix'] = os.environ['gcp_private_subnet_prefix']
+ edge_conf['private_subnet_prefix'] = os.environ['conf_private_subnet_prefix']
edge_conf['edge_service_account_name'] = '{}-{}-edge'.format(edge_conf['service_base_name'],
edge_conf['project_name'])
edge_conf['edge_role_name'] = '{}-{}-edge'.format(edge_conf['service_base_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
index b7f7833..3e7ba24 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
@@ -60,7 +60,7 @@ if __name__ == "__main__":
project_conf['region'] = os.environ['gcp_region']
project_conf['zone'] = os.environ['gcp_zone']
project_conf['vpc_selflink'] = GCPMeta().get_vpc(project_conf['vpc_name'])['selfLink']
- project_conf['private_subnet_prefix'] = os.environ['gcp_private_subnet_prefix']
+ project_conf['private_subnet_prefix'] = os.environ['conf_private_subnet_prefix']
project_conf['edge_service_account_name'] = '{}-{}-edge'.format(project_conf['service_base_name'],
project_conf['project_name'])
project_conf['edge_role_name'] = '{}-{}-edge'.format(project_conf['service_base_name'],
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org