[incubator-dlab] branch DLAB-594 deleted (was 4900f52)
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a change to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. was 4900f52 [DLAB-594]: Fixed typo The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #88 from apache/DLAB-594
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit f74984add985e3c8b5b24d848e2716b505e932dd Merge: e66a70a 4900f52 Author: i.oleksandr AuthorDate: Mon Apr 8 18:36:42 2019 +0300 Merge pull request #88 from apache/DLAB-594 [DLAB-594]: Added tags for resources README.md | 3 +- .../src/general/files/aws/ssn_policy.json | 3 +- .../src/general/lib/aws/actions_lib.py | 28 +++- .../scripts/aws/common_create_role_policy.py | 5 +- .../general/scripts/aws/common_create_subnet.py| 8 +-- .../scripts/aws/edge_associate_elastic_ip.py | 7 +- .../src/general/scripts/aws/edge_prepare.py| 26 --- .../scripts/aws/ssn_associate_elastic_ip.py| 7 +- .../src/general/scripts/aws/ssn_configure.py | 48 + .../src/general/scripts/aws/ssn_create_vpc.py | 5 ++ .../src/general/scripts/aws/ssn_prepare.py | 81 ++ 11 files changed, 173 insertions(+), 48 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (e66a70a -> f74984a)
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from e66a70a Merge pull request #87 from apache/DLAB-593 add 4c04431 [DLAB-594]: added tags for Elastic IPs add 2cad14f [DLAB-594]: added tags for VPCs,subnets, Route tables, SGs and IAM roles add e506e4b [DLAB-594]: fixed issue with creating IAM role and added tag for peering connection add 4348401 [DLAB-594]: fixed issue with creating IAM role add 6c7a30a [DLAB-594]: fixed issue with removing peering connection during rolling back add e2b5f80 debugging add 74788b1 [DLAB-594]: Fixed issue second VPC add b8bec80 [DLAB-594]: Fixed typo add 4900f52 [DLAB-594]: Fixed typo new f74984a Merge pull request #88 from apache/DLAB-594 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: README.md | 3 +- .../src/general/files/aws/ssn_policy.json | 3 +- .../src/general/lib/aws/actions_lib.py | 28 +++- .../scripts/aws/common_create_role_policy.py | 5 +- .../general/scripts/aws/common_create_subnet.py| 8 +-- .../scripts/aws/edge_associate_elastic_ip.py | 7 +- .../src/general/scripts/aws/edge_prepare.py| 26 --- .../scripts/aws/ssn_associate_elastic_ip.py| 7 +- .../src/general/scripts/aws/ssn_configure.py | 48 + .../src/general/scripts/aws/ssn_create_vpc.py | 5 ++ .../src/general/scripts/aws/ssn_prepare.py | 81 ++ 11 files changed, 173 insertions(+), 48 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: Fixed typo
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new 4900f52 [DLAB-594]: Fixed typo 4900f52 is described below commit 4900f52ab80d59139278582e1e87e5508b4e0137 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 18:20:52 2019 +0300 [DLAB-594]: Fixed typo --- infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py index 6ce00ec..b87e347 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py @@ -60,7 +60,7 @@ if __name__ == "__main__": pre_defined_vpc = False pre_defined_subnet = False pre_defined_sg = False -biling_enabled = True +billing_enabled = True dlab_ssh_user = os.environ['conf_os_user'] network_type = os.environ['conf_network_type'] if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and \ - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: Fixed typo
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new b8bec80 [DLAB-594]: Fixed typo b8bec80 is described below commit b8bec802e8c0424f177d002df9b232503d5226e2 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 18:18:52 2019 +0300 [DLAB-594]: Fixed typo --- README.md| 3 ++- infrastructure-provisioning/src/general/files/aws/ssn_policy.json| 3 ++- infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py | 2 +- infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 433dc19..08fb730 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,8 @@ Prerequisites: "iam:GetInstanceProfile", "iam:ListInstanceProfilesForRole" "iam:RemoveRoleFromInstanceProfile", - "iam:DeleteInstanceProfile" + "iam:DeleteInstanceProfile", + "iam:TagRole" ], "Effect": "Allow", "Resource": "*" diff --git a/infrastructure-provisioning/src/general/files/aws/ssn_policy.json b/infrastructure-provisioning/src/general/files/aws/ssn_policy.json index 1d43c00..89f28c5 100644 --- a/infrastructure-provisioning/src/general/files/aws/ssn_policy.json +++ b/infrastructure-provisioning/src/general/files/aws/ssn_policy.json @@ -29,7 +29,8 @@ "iam:ListInstanceProfilesForRole", "iam:ListRoles", "iam:ListPolicies", -"iam:ListRolePolicies" +"iam:ListRolePolicies", +"iam:TagRole" ], "Effect": "Allow", "Resource": "*" diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py index 3c5c55f..f66b0dc 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py @@ -79,7 +79,7 @@ if __name__ == "__main__": edge_conf['notebook_security_group_name'] = '{}-{}-nb-SG'.format(edge_conf['service_base_name'], os.environ['edge_user_name']) edge_conf['private_subnet_prefix'] = os.environ['aws_private_subnet_prefix'] -edge_conf['private_subnet_name'] = '{0}-{1}-subnet'.format(os.environ['aws_private_subnet_prefix'], +edge_conf['private_subnet_name'] = '{0}-{1}-subnet'.format(edge_conf['service_base_name'], os.environ['edge_user_name']) edge_conf['dataengine_master_security_group_name'] = '{}-{}-dataengine-master-sg' \ .format(edge_conf['service_base_name'], os.environ['edge_user_name']) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py index 6bd253d..6ce00ec 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py @@ -60,7 +60,7 @@ if __name__ == "__main__": pre_defined_vpc = False pre_defined_subnet = False pre_defined_sg = False -billing_enabled = True +biling_enabled = True dlab_ssh_user = os.environ['conf_os_user'] network_type = os.environ['conf_network_type'] if 'ssn_hosted_zone_id' in os.environ and 'ssn_hosted_zone_name' in os.environ and \ @@ -177,7 +177,7 @@ if __name__ == "__main__": print('[INSTALLING PREREQUISITES TO SSN INSTANCE]') params = "--hostname {} --keyfile {} --pip_packages 'boto3 backoff argparse fabric==1.14.0 awscli pymongo " \ "pyyaml jinja2' --user {} --region {}". \ -fformat(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", dlab_ssh_user, +format(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", dlab_ssh_user, os.environ['aws_region']) try: - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: Fixed issue second VPC
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new 74788b1 [DLAB-594]: Fixed issue second VPC 74788b1 is described below commit 74788b1b50cf0694ca0e340b2d2778d2a1012aa3 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 17:58:29 2019 +0300 [DLAB-594]: Fixed issue second VPC --- .../src/general/scripts/aws/ssn_configure.py | 24 + .../src/general/scripts/aws/ssn_prepare.py | 40 ++ 2 files changed, 64 insertions(+) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py index a8983f2..6bd253d 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py @@ -164,6 +164,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -200,6 +204,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -241,6 +249,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -290,6 +302,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -394,6 +410,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -475,6 +495,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py index 3b91746..b4ec9d7 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py @@ -165,6 +165,10 @@ if __name__ == "__main__": print("Subnet hasn't been created.") remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -193,6 +197,10 @@ if __name__ == "__main__": remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: remove_peering('*') +try: +remove_vpc_endpoints(os.environ['aws_vpc2_id']) +except: +print("There are no VPC Endpoints") remove_route_tables(tag2_name, True) remove_vpc(o
[incubator-dlab] branch DLAB-594 updated: debugging
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new e2b5f80 debugging e2b5f80 is described below commit e2b5f80dbf1308d1e452aa52a39b9c3007c896d3 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 17:45:03 2019 +0300 debugging --- infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py index 5033955..a8983f2 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py @@ -173,7 +173,7 @@ if __name__ == "__main__": print('[INSTALLING PREREQUISITES TO SSN INSTANCE]') params = "--hostname {} --keyfile {} --pip_packages 'boto3 backoff argparse fabric==1.14.0 awscli pymongo " \ "pyyaml jinja2' --user {} --region {}". \ -format(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", dlab_ssh_user, +fformat(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", dlab_ssh_user, os.environ['aws_region']) try: - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: fixed issue with removing peering connection during rolling back
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new 6c7a30a [DLAB-594]: fixed issue with removing peering connection during rolling back 6c7a30a is described below commit 6c7a30a25182806b490a9ee2b6ecba2b049c3e2d Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 17:23:02 2019 +0300 [DLAB-594]: fixed issue with removing peering connection during rolling back --- .../src/general/scripts/aws/ssn_configure.py | 24 ++ .../src/general/scripts/aws/ssn_prepare.py | 12 +++ 2 files changed, 36 insertions(+) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py index dcb4442..5033955 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_configure.py @@ -162,6 +162,10 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) try: @@ -194,6 +198,10 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) try: @@ -231,6 +239,10 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) try: @@ -276,6 +288,10 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) try: @@ -376,6 +392,10 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) try: @@ -453,4 +473,8 @@ if __name__ == "__main__": remove_vpc_endpoints(os.environ['aws_vpc_id']) remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) +if pre_defined_vpc2: +remove_peering('*') +remove_route_tables(tag2_name, True) +remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py index 10c81cc..3b91746 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py @@ -192,6 +192,7 @@ if __name__ == "__main__": print("Subnet hasn't been created.") remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: +remove_peering('*') remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -265,6 +266,7 @@ if __name__ == "__main__": remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: +remove_peering('*') remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -291,6 +293,7 @@ if __name__ == "__main__": remove_route_tables(tag_name, True) remove_vpc(os.environ['aws_vpc_id']) if pre_defined_vpc2: +remove_peering('*') remove_route_tables(tag2_name, True) remove_vpc(os.environ['aws_vpc2_id']) sys.exit(1) @@ -318,6 +321,7 @@ if __name__ == "__main
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: fixed issue with creating IAM role
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new 4348401 [DLAB-594]: fixed issue with creating IAM role 4348401 is described below commit 43484015e3174421cfc7936e587a5b8f337447a1 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 17:14:51 2019 +0300 [DLAB-594]: fixed issue with creating IAM role --- infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 1 + .../src/general/scripts/aws/common_create_role_policy.py| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index 0a41509..2f21233 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -515,6 +515,7 @@ def create_iam_role(role_name, role_profile, region, service='ec2', tag=None): '.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}') if tag: conn.tag_role(RoleName=role_name, Tags=[tag]) +conn.tag_role(RoleName=role_name, Tags=[{"Key": "Name", "Value": role_name}]) except botocore.exceptions.ClientError as e_role: if e_role.response['Error']['Code'] == 'EntityAlreadyExists': print("IAM role already exists. Reusing...") diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py index d52c43f..15e8e87 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py +++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py @@ -45,7 +45,7 @@ if __name__ == "__main__": if role_name == '': tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value} print("Creating role {0}, profile name {1}".format(args.role_name, args.role_profile_name)) -create_iam_role(args.role_name, args.role_profile_name, args.region, tag) +create_iam_role(args.role_name, args.role_profile_name, args.region, tag=tag) else: print("ROLE AND ROLE PROFILE ARE ALREADY CREATED") print("ROLE {} created. IAM group {} created".format(args.role_name, args.role_profile_name)) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: fixed issue with creating IAM role and added tag for peering connection
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new e506e4b [DLAB-594]: fixed issue with creating IAM role and added tag for peering connection e506e4b is described below commit e506e4bce2e2618ab051cbef4e781be98aed645d Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 17:05:26 2019 +0300 [DLAB-594]: fixed issue with creating IAM role and added tag for peering connection --- infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index 9d10c5a..0a41509 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -338,6 +338,7 @@ def create_peering_connection(vpc_id, vpc2_id, service_base_name): ec2 = boto3.resource('ec2') client = boto3.client('ec2') tag = {"Key": service_base_name + '-Tag', "Value": service_base_name} +tag_name = {"Key": 'Name', "Value": "{0}-peering-connection".format(service_base_name)} peering = ec2.create_vpc_peering_connection(PeerVpcId=vpc_id, VpcId=vpc2_id) client.accept_vpc_peering_connection(VpcPeeringConnectionId=peering.id) client.modify_vpc_peering_connection_options( @@ -350,6 +351,7 @@ def create_peering_connection(vpc_id, vpc2_id, service_base_name): VpcPeeringConnectionId=peering.id ) create_tag(peering.id, json.dumps(tag)) +create_tag(peering.id, json.dumps(tag_name)) return peering.id except Exception as err: logging.info("Unable to create peering connection: " + str(err) + "\n Traceback: " + traceback.print_exc( @@ -513,7 +515,6 @@ def create_iam_role(role_name, role_profile, region, service='ec2', tag=None): '.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}') if tag: conn.tag_role(RoleName=role_name, Tags=[tag]) -conn.tag_role(RoleName=role_name, Tags=[{"Key": "Name", "Value": role_name}]) except botocore.exceptions.ClientError as e_role: if e_role.response['Error']['Code'] == 'EntityAlreadyExists': print("IAM role already exists. Reusing...") - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-594 updated: [DLAB-594]: added tags for VPCs, subnets, Route tables, SGs and IAM roles
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-594 by this push: new 2cad14f [DLAB-594]: added tags for VPCs,subnets, Route tables, SGs and IAM roles 2cad14f is described below commit 2cad14f67d7ced63ece795a3540640413e3458bd Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 16:56:08 2019 +0300 [DLAB-594]: added tags for VPCs,subnets, Route tables, SGs and IAM roles --- .../src/general/lib/aws/actions_lib.py | 10 +- .../scripts/aws/common_create_role_policy.py| 5 - .../src/general/scripts/aws/common_create_subnet.py | 8 .../src/general/scripts/aws/edge_prepare.py | 21 + .../src/general/scripts/aws/ssn_create_vpc.py | 5 + .../src/general/scripts/aws/ssn_prepare.py | 21 ++--- 6 files changed, 45 insertions(+), 25 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index b6978c8..9d10c5a 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -244,9 +244,11 @@ def create_subnet(vpc_id, subnet, tag): def create_security_group(security_group_name, vpc_id, security_group_rules, egress, tag): try: ec2 = boto3.resource('ec2') +tag_name = {"Key": "Name", "Value": security_group_name} group = ec2.create_security_group(GroupName=security_group_name, Description='security_group_name', VpcId=vpc_id) time.sleep(10) create_tag(group.id, tag) +create_tag(group.id, tag_name) try: group.revoke_egress(IpPermissions=[{"IpProtocol": "-1", "IpRanges": [{"CidrIp": "0.0.0.0/0"}], "UserIdGroupPairs": [], "PrefixListIds": []}]) @@ -446,6 +448,7 @@ def create_instance(definitions, instance_tag, primary_disk_size=12): "error_message": str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout)})) traceback.print_exc(file=sys.stdout) + def tag_intance_volume(instance_id, node_name, instance_tag): try: print('volume tagging') @@ -474,6 +477,7 @@ def tag_intance_volume(instance_id, node_name, instance_tag): file=sys.stdout)})) traceback.print_exc(file=sys.stdout) + def tag_emr_volume(cluster_id, node_name, billing_tag): try: client = boto3.client('emr') @@ -492,7 +496,8 @@ def tag_emr_volume(cluster_id, node_name, billing_tag): file=sys.stdout)})) traceback.print_exc(file=sys.stdout) -def create_iam_role(role_name, role_profile, region, service='ec2'): + +def create_iam_role(role_name, role_profile, region, service='ec2', tag=None): conn = boto3.client('iam') try: if region == 'cn-north-1': @@ -506,6 +511,9 @@ def create_iam_role(role_name, role_profile, region, service='ec2'): RoleName=role_name, AssumeRolePolicyDocument= '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":["' + service + '.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}') +if tag: +conn.tag_role(RoleName=role_name, Tags=[tag]) +conn.tag_role(RoleName=role_name, Tags=[{"Key": "Name", "Value": role_name}]) except botocore.exceptions.ClientError as e_role: if e_role.response['Error']['Code'] == 'EntityAlreadyExists': print("IAM role already exists. Reusing...") diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py index 06739f3..d52c43f 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py +++ b/infrastructure-provisioning/src/general/scripts/aws/common_create_role_policy.py @@ -33,6 +33,8 @@ parser.add_argument('--policy_name', type=str, default='') parser.add_argument('--policy_arn', type=str, default='') parser.add_argument('--policy_file_name', type=str, default='') parser.add_argument('--region', type=str, default='') +parser.add_argument('--infra_tag_name', type=str, default='') +parser.add_argument('--infra_tag_value', type=str, default='') args = parser.parse_args() @@ -41,8 +43,9 @@ if __name__ == "__main__": try: role_name = get_role_by_name(args.role_name) if role_name == '': +tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value} print("Creating role {0}, profile name {1}".format(args.role_name, args.role_profile_name)) -create_iam_
[incubator-dlab] 01/01: [DLAB-594]: added tags for Elastic IPs
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 4c04431dd8c164db29ab3e8c6157f9d31befe761 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 15:46:36 2019 +0300 [DLAB-594]: added tags for Elastic IPs --- .../src/general/lib/aws/actions_lib.py | 16 .../src/general/scripts/aws/edge_associate_elastic_ip.py | 7 ++- .../src/general/scripts/aws/edge_prepare.py | 5 - .../src/general/scripts/aws/ssn_associate_elastic_ip.py | 7 ++- .../src/general/scripts/aws/ssn_prepare.py | 12 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index b31b104..b6978c8 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -189,22 +189,6 @@ def create_tag(resource, tag, with_tag_res_id=True): Tags=tags_list ) -def create_product_tag(resource): -print('Tag product for the resource {} will be created'.format(resource)) -tags_list = list() -ec2 = boto3.client('ec2') -if type(resource) != list: -resource = [resource] -tags_list.append( -{ -'Key': os.environ['conf_billing_tag_key'], -'Value': os.environ['conf_billing_tag_value'] -} -) -ec2.create_tags( -Resources=resource, -Tags=tags_list -) def remove_emr_tag(emr_id, tag): try: diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py b/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py index b23e4f7..bfc2df9 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py +++ b/infrastructure-provisioning/src/general/scripts/aws/edge_associate_elastic_ip.py @@ -31,6 +31,8 @@ import argparse parser = argparse.ArgumentParser() parser.add_argument('--elastic_ip', type=str, default='') parser.add_argument('--edge_id', type=str) +parser.add_argument('--infra_tag_name', type=str, default='') +parser.add_argument('--infra_tag_value', type=str, default='') args = parser.parse_args() if __name__ == "__main__": @@ -44,7 +46,10 @@ if __name__ == "__main__": if args.elastic_ip == 'None': print("Allocating Elastic IP") allocation_id = allocate_elastic_ip() -create_product_tag(allocation_id) +tag = {"Key": args.infra_tag_name, "Value": args.infra_tag_value} +tag_name = {"Key": "Name", "Value": args.infra_tag_value} +create_tag(allocation_id, tag) +create_tag(allocation_id, tag_name) else: allocation_id = get_allocation_id_by_elastic_ip(args.elastic_ip) diff --git a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py index 71423cd..2e5380a 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py @@ -88,6 +88,8 @@ if __name__ == "__main__": edge_conf['allowed_ip_cidr'].append({"CidrIp": cidr.replace(' ','')}) edge_conf['network_type'] = os.environ['conf_network_type'] edge_conf['all_ip_cidr'] = '0.0.0.0/0' +edge_conf['elastic_ip_name'] = '{0}-{1}-edge-EIP'.format(edge_conf['service_base_name'], + os.environ['edge_user_name']) if 'aws_user_predefined_s3_policies' not in os.environ: os.environ['aws_user_predefined_s3_policies'] = 'None' @@ -532,7 +534,8 @@ if __name__ == "__main__": edge_conf['elastic_ip'] = os.environ['edge_elastic_ip'] except: edge_conf['elastic_ip'] = 'None' -params = "--elastic_ip {} --edge_id {}".format(edge_conf['elastic_ip'], edge_conf['edge_id']) +params = "--elastic_ip {} --edge_id {} --infra_tag_name {} --infra_tag_value {}".format( +edge_conf['elastic_ip'], edge_conf['edge_id'], edge_conf['tag_name'], edge_conf['elastic_ip_name']) try: local("~/scripts/{}.py {}".format('edge_associate_elastic_ip', params)) except: diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py index f86b1cd..55bb37d 100644 --- a/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py +++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_associate_elastic_ip.py @@ -31,6 +31,8 @@ import argparse parser = argparse.Argumen
[incubator-dlab] branch DLAB-594 created (now 4c04431)
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a change to branch DLAB-594 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 4c04431 [DLAB-594]: added tags for Elastic IPs This branch includes the following new commits: new 4c04431 [DLAB-594]: added tags for Elastic IPs The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
svn commit: r33510 - /release/incubator/dlab/KEYS
Author: bhliva Date: Mon Apr 8 12:24:48 2019 New Revision: 33510 Log: Added KEYS file for DLab Added: release/incubator/dlab/KEYS Added: release/incubator/dlab/KEYS == --- release/incubator/dlab/KEYS (added) +++ release/incubator/dlab/KEYS Mon Apr 8 12:24:48 2019 @@ -0,0 +1,37 @@ +pub rsa2048 2019-01-28 [SC] [expires: 2021-01-27] + 9975E9CE9413605D0DF35ED3322F873E5C3C66D1 +uid [ultimate] bhliva +sig 3322F873E5C3C66D1 2019-01-28 bhliva +sub rsa2048 2019-01-28 [E] [expires: 2021-01-27] +sig 322F873E5C3C66D1 2019-01-28 bhliva + +-BEGIN PGP PUBLIC KEY BLOCK- + +mQENBFxO39ABCADneCEhV46oiZeHcKXwcU87rySCJhFQPutSN79l1kkk15nCKAEg +V3dmT68ViSl4axsuq9n+rldWEH4IMNjgDQOmaX/jEHKcV5D8rx5y5dgbJ9DxaiL5 +SGWAVq1quKqEenNXp63UivDHXwLDeol+GailafMnJVgNlxf6xNIhbzlhrwLTeKvt +f3pCI3K7ZeSIOAJS1gTAVrC7TvgLKyau8NZe7E3pIQt2bueZRVgGNYdNOexH6pha +LsawIc4FgQQqZgqmejI2C2eAhXGjXWjN1L+IUKI2rirvT5dt4b8wQ41ehf0o0Q5u +60LUzsFPclUBR/x1+mWuCdmbc4Y4kRHdZkO9ABEBAAG0GmJobGl2YSA8YmhsaXZh +QGFwYWNoZS5vcmc+iQFUBBMBCAA+FiEEmXXpzpQTYF0N817TMi+HPlw8ZtEFAlxO +39ACGwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQMi+HPlw8ZtEJ +Vwf+MPhwgFmYX3VjHEOGMeUE/XdFCSDQy9s6w01AX7Q6jI1uHXSF28ZQ1yQEzZGX +0I0rnRHRbAV4IWMUkPWhXrNAiNMFhu+0apuQFLl3PUZdSsQR8DbZ6BXVVd7fEjdN +LB/S2sev1nF0zzfq3XlLcR0vLKkaiAv5o5YG5Wo0UibIW7cETcKe+Si3LrorpmSI +JEqrP96DUOCK+4JK+rrHrFlxwIkwJBN4YPBxTN70Sre9rfUfQMqCH5q7YYN67Jaj +JnRY4I74e1F+fV59KLf4lwYMezjSxFxo14kLvEBR9vJYcfXpu7xf1sf+kfkSDUkU +BJYdl2U6+behD4VqCY8pODVT5LkBDQRcTt/QAQgAuD5UH1EIboYm5XeUATBXpomU +GKyKVdgF9obr4lK+zZ0MKjdkgnCrp4rpanAiCZ3yzb4HlFa8Vad3XTn+8dB+CRMW +Kv6Q6Zizc8qkQhjQebYEZHxHH/T+a/RsjHfpy4nyhXMbJyzu2SmjTnMVLd3mqGeR +oQ9ONrn6l4c05I3Uzquo1dysFa+xTjeBoy4fYvpCCiiTOqNd70xnYPcqUo2ffRJu +7Y0CcVBKKbOKkuoUC++ElU1vJ0jXva8fVNk2D0YnlPvnEDyHwYptc5pLrFSCH2HK +uH3CMcqUtnBqxNYM9VwfjF87YkdAhrfOvDuL90U+RxDEVT+BIIvvE3UbsJMysQAR +AQABiQE8BBgBCAAmFiEEmXXpzpQTYF0N817TMi+HPlw8ZtEFAlxO39ACGwwFCQPC +ZwAACgkQMi+HPlw8ZtGbwwgAxVLfE7O2B+q3aw7CB6fSIFtfi6CyJeihV+cfns9Z +oN9MUKSDKQZwbdU5O/Q3rmWHDG0Dq/LPQWIOLsEDHTUX+zu+SEBrKxnl2hdVir5F +X+/nYIYvuDQZ2+UCz6577n+4Vz2ZepahFkMu74j9QmMSxR+tFqrwclySgd5d1WmD +qhOzh4mwO3MvpqyTxYnu5yxFh/OXlMmU+wSPWmYb2EMaYQ/MiioJe12MMmYyFNkF +9eG9PxG0Y/8TuD30DjxqfbiHDjyddH022/AMX+VggjQ+Li0nSWAGAF20w4TFUm5F +Do7cCYMmnkAl2raQsl7//p4O13crbAC1wEwtwVMUskBMMA== +=rpUE +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
svn commit: r33509 - /release/incubator/dlab/
Author: bhliva Date: Mon Apr 8 12:15:39 2019 New Revision: 33509 Log: Added directory for Apache DLab(incubating) Added: release/incubator/dlab/ - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-593 deleted (was 583cf02)
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a change to branch DLAB-593 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. was 583cf02 [DLAB-593]: Fixed issue with removing IAM resources The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (3e3c33a -> e66a70a)
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 3e3c33a Merge pull request #86 from apache/DLAB-456 add 583cf02 [DLAB-593]: Fixed issue with removing IAM resources new e66a70a Merge pull request #87 from apache/DLAB-593 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/general/lib/aws/actions_lib.py| 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #87 from apache/DLAB-593
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit e66a70a09524c7b6639ebcb28086db8e9b1f024f Merge: 3e3c33a 583cf02 Author: i.oleksandr AuthorDate: Mon Apr 8 15:04:17 2019 +0300 Merge pull request #87 from apache/DLAB-593 [DLAB-593]: Fixed issue with removing IAM resources .../src/general/lib/aws/actions_lib.py| 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch inactivity_integration updated (121ffc5 -> 7ca2e08)
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a change to branch inactivity_integration in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 121ffc5 DLAB-000 Licence headers updated new 635251d [DLAB-480]: fixed action buttons overlapping in case of not selected hours new 3c975be [DLAB-480]: added scheduler.calculations; setDefault for week selections model new eef52dd [DLAB-480]: prevent float and negative numbers; inactivity validation fixes new 7ca2e08 [DLAB-480]: error handling labeling fixes The 5782 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../scheduler/scheduler.calculations.ts} | 33 ++- .../resources/scheduler/scheduler.component.html | 11 ++-- .../resources/scheduler/scheduler.component.scss | 19 +++ .../app/resources/scheduler/scheduler.component.ts | 65 +- .../src/app/resources/scheduler/scheduler.model.ts | 6 +- 5 files changed, 76 insertions(+), 58 deletions(-) copy services/self-service/src/main/resources/webapp/src/app/{core/util/fileUtils.ts => resources/scheduler/scheduler.calculations.ts} (53%) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-593 created (now 583cf02)
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a change to branch DLAB-593 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 583cf02 [DLAB-593]: Fixed issue with removing IAM resources This branch includes the following new commits: new 583cf02 [DLAB-593]: Fixed issue with removing IAM resources The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: [DLAB-593]: Fixed issue with removing IAM resources
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch DLAB-593 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 583cf02b0b070d67a268afab3f3fb315d289e876 Author: Oleh Martushevskyi AuthorDate: Mon Apr 8 13:39:17 2019 +0300 [DLAB-593]: Fixed issue with removing IAM resources --- .../src/general/lib/aws/actions_lib.py| 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index f6f37d0..f7ff407 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -862,7 +862,7 @@ def remove_roles_and_profiles(role_name, role_profile_name): def remove_all_iam_resources(instance_type, scientist=''): try: client = boto3.client('iam') -service_base_name = os.environ['conf_service_base_name'] +service_base_name = os.environ['conf_service_base_name'].lower().replace('-', '_') roles_list = [] for item in client.list_roles(MaxItems=250).get("Roles"): if item.get("RoleName").startswith(service_base_name + '-'): @@ -872,14 +872,15 @@ def remove_all_iam_resources(instance_type, scientist=''): for iam_role in roles_list: if '-ssn-Role' in iam_role and instance_type == 'ssn' or instance_type == 'all': try: -client.delete_role_policy(RoleName=iam_role, PolicyName=service_base_name + '-ssn-Policy') +client.delete_role_policy(RoleName=iam_role, PolicyName='{0}-ssn-Policy'.format( +service_base_name)) except: print('There is no policy {}-ssn-Policy to delete'.format(service_base_name)) role_profiles = client.list_instance_profiles_for_role(RoleName=iam_role).get('InstanceProfiles') if role_profiles: for i in role_profiles: role_profile_name = i.get('InstanceProfileName') -if role_profile_name == service_base_name + '-ssn-Profile': +if role_profile_name == '{0}-ssn-Profile'.format(service_base_name): remove_roles_and_profiles(iam_role, role_profile_name) else: print("There is no instance profile for {}".format(iam_role)) @@ -888,8 +889,7 @@ def remove_all_iam_resources(instance_type, scientist=''): if '-edge-Role' in iam_role: if instance_type == 'edge' and scientist in iam_role: remove_detach_iam_policies(iam_role, 'delete') -role_profile_name = os.environ['conf_service_base_name'] + '-' + '{}'.format(scientist) + \ -'-edge-Profile' +role_profile_name = '{0}-{1}-edge-Profile'.format(service_base_name, scientist) try: client.get_instance_profile(InstanceProfileName=role_profile_name) remove_roles_and_profiles(iam_role, role_profile_name) @@ -912,8 +912,7 @@ def remove_all_iam_resources(instance_type, scientist=''): if '-nb-de-Role' in iam_role: if instance_type == 'notebook' and scientist in iam_role: remove_detach_iam_policies(iam_role) -role_profile_name = os.environ['conf_service_base_name'] + '-' + "{}".format(scientist) + \ -'-nb-de-Profile' +role_profile_name = '{0}-{1}-nb-de-Profile'.format(service_base_name, scientist) try: client.get_instance_profile(InstanceProfileName=role_profile_name) remove_roles_and_profiles(iam_role, role_profile_name) @@ -937,7 +936,7 @@ def remove_all_iam_resources(instance_type, scientist=''): print("There are no IAM roles to delete. Checking instance profiles...") profile_list = [] for item in client.list_instance_profiles(MaxItems=250).get("InstanceProfiles"): -if item.get("InstanceProfileName").startswith(service_base_name + '-'): +if item.get("InstanceProfileName").startswith('{}-'.format(service_base_name)): profile_list.append(item.get('InstanceProfileName')) if profile_list: for instance_profile in profile_list: - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #86 from apache/DLAB-456
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 3e3c33aca3ddee6a53c8ae811cf179d396ec9de0 Merge: 6cfbeb5 0858bba Author: i.oleksandr AuthorDate: Mon Apr 8 13:36:50 2019 +0300 Merge pull request #86 from apache/DLAB-456 [DLAB-456]: fixed issue with header structure .../src/general/lib/aws/actions_lib.py | 41 -- .../src/general/lib/azure/actions_lib.py | 41 -- .../src/general/lib/gcp/actions_lib.py | 41 -- 3 files changed, 69 insertions(+), 54 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (6cfbeb5 -> 3e3c33a)
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 6cfbeb5 Merge pull request #85 from Dyoma33/DLAB-580 add 0858bba [DLAB-456]: fixed issue with header structure new 3e3c33a Merge pull request #86 from apache/DLAB-456 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../src/general/lib/aws/actions_lib.py | 41 -- .../src/general/lib/azure/actions_lib.py | 41 -- .../src/general/lib/gcp/actions_lib.py | 41 -- 3 files changed, 69 insertions(+), 54 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: [DLAB-580] Changed shape in integration tests
This is an automated email from the ASF dual-hosted git repository. omartushevskyi pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/develop by this push: new d58afd8 [DLAB-580] Changed shape in integration tests new 6cfbeb5 Merge pull request #85 from Dyoma33/DLAB-580 d58afd8 is described below commit d58afd857b0adf54060dee681f25abbe5591b604 Author: Dyoma33 AuthorDate: Mon Apr 8 10:59:03 2019 +0300 [DLAB-580] Changed shape in integration tests --- integration-tests/examples/gcp_templates/deeplearning/dataproc.json | 4 ++-- integration-tests/examples/gcp_templates/jupyter/dataproc.json | 4 ++-- integration-tests/examples/gcp_templates/rstudio/dataproc.json | 4 ++-- integration-tests/examples/gcp_templates/tensor/dataproc.json | 4 ++-- integration-tests/examples/gcp_templates/zeppelin/dataproc.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/integration-tests/examples/gcp_templates/deeplearning/dataproc.json b/integration-tests/examples/gcp_templates/deeplearning/dataproc.json index 758104f..9130f3d 100644 --- a/integration-tests/examples/gcp_templates/deeplearning/dataproc.json +++ b/integration-tests/examples/gcp_templates/deeplearning/dataproc.json @@ -4,8 +4,8 @@ "dataproc_master_count": "1", "dataproc_slave_count": "2", "dataproc_preemptible_count": "0", - "dataproc_master_instance_type" : "n1-standard-1", - "dataproc_slave_instance_type" : "n1-standard-1", + "dataproc_master_instance_type" : "n1-standard-2", + "dataproc_slave_instance_type" : "n1-standard-2", "dataproc_version" : "1.1", "notebook_name": "set notebook name", "template_name" : "Dataproc cluster" diff --git a/integration-tests/examples/gcp_templates/jupyter/dataproc.json b/integration-tests/examples/gcp_templates/jupyter/dataproc.json index 758104f..9130f3d 100644 --- a/integration-tests/examples/gcp_templates/jupyter/dataproc.json +++ b/integration-tests/examples/gcp_templates/jupyter/dataproc.json @@ -4,8 +4,8 @@ "dataproc_master_count": "1", "dataproc_slave_count": "2", "dataproc_preemptible_count": "0", - "dataproc_master_instance_type" : "n1-standard-1", - "dataproc_slave_instance_type" : "n1-standard-1", + "dataproc_master_instance_type" : "n1-standard-2", + "dataproc_slave_instance_type" : "n1-standard-2", "dataproc_version" : "1.1", "notebook_name": "set notebook name", "template_name" : "Dataproc cluster" diff --git a/integration-tests/examples/gcp_templates/rstudio/dataproc.json b/integration-tests/examples/gcp_templates/rstudio/dataproc.json index 758104f..9130f3d 100644 --- a/integration-tests/examples/gcp_templates/rstudio/dataproc.json +++ b/integration-tests/examples/gcp_templates/rstudio/dataproc.json @@ -4,8 +4,8 @@ "dataproc_master_count": "1", "dataproc_slave_count": "2", "dataproc_preemptible_count": "0", - "dataproc_master_instance_type" : "n1-standard-1", - "dataproc_slave_instance_type" : "n1-standard-1", + "dataproc_master_instance_type" : "n1-standard-2", + "dataproc_slave_instance_type" : "n1-standard-2", "dataproc_version" : "1.1", "notebook_name": "set notebook name", "template_name" : "Dataproc cluster" diff --git a/integration-tests/examples/gcp_templates/tensor/dataproc.json b/integration-tests/examples/gcp_templates/tensor/dataproc.json index 758104f..9130f3d 100644 --- a/integration-tests/examples/gcp_templates/tensor/dataproc.json +++ b/integration-tests/examples/gcp_templates/tensor/dataproc.json @@ -4,8 +4,8 @@ "dataproc_master_count": "1", "dataproc_slave_count": "2", "dataproc_preemptible_count": "0", - "dataproc_master_instance_type" : "n1-standard-1", - "dataproc_slave_instance_type" : "n1-standard-1", + "dataproc_master_instance_type" : "n1-standard-2", + "dataproc_slave_instance_type" : "n1-standard-2", "dataproc_version" : "1.1", "notebook_name": "set notebook name", "template_name" : "Dataproc cluster" diff --git a/integration-tests/examples/gcp_templates/zeppelin/dataproc.json b/integration-tests/examples/gcp_templates/zeppelin/dataproc.json index 758104f..9130f3d 100644 --- a/integration-tests/examples/gcp_templates/zeppelin/dataproc.json +++ b/integration-tests/examples/gcp_templates/zeppelin/dataproc.json @@ -4,8 +4,8 @@ "dataproc_master_count": "1", "dataproc_slave_count": "2", "dataproc_preemptible_count": "0", - "dataproc_master_instance_type" : "n1-standard-1", - "dataproc_slave_instance_type" : "n1-standard-1", + "dataproc_master_instance_type" : "n1-standard-2", + "dataproc_slave_instance_type" : "n1-standard-2", "dataproc_version" : "1.1", "notebook_name": "set notebook name", "template_name" : "Dataproc cluster" - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.