From 77bea087f9f3c35faa2165121e14482c02d465bf Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Wed, 28 Dec 2022 22:21:43 -0500 Subject: [PATCH 1/3] removed --- cdk/cdk.context.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 cdk/cdk.context.json diff --git a/cdk/cdk.context.json b/cdk/cdk.context.json deleted file mode 100644 index ff09882..0000000 --- a/cdk/cdk.context.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "availability-zones:account=096320175891:region=us-east-2": [ - "us-east-2a", - "us-east-2b", - "us-east-2c" - ] -} From b277deced6bcf0e81e9ff179279d1d93c76cf9c5 Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Wed, 28 Dec 2022 22:21:53 -0500 Subject: [PATCH 2/3] removed cdk.context.json --- cdk/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/cdk/.gitignore b/cdk/.gitignore index 37833f8..454fac8 100644 --- a/cdk/.gitignore +++ b/cdk/.gitignore @@ -8,3 +8,4 @@ __pycache__ # CDK asset staging directory .cdk.staging cdk.out +cdk.context.json From 687aa3d45b1507a0ec8c8fa60f36e839bd38ee71 Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Wed, 28 Dec 2022 22:22:02 -0500 Subject: [PATCH 3/3] about ready to try it --- cdk/sfec2/sci_stack.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cdk/sfec2/sci_stack.py b/cdk/sfec2/sci_stack.py index 883f7a6..1208534 100644 --- a/cdk/sfec2/sci_stack.py +++ b/cdk/sfec2/sci_stack.py @@ -11,13 +11,14 @@ class SciInstancesStack(cdk.Stack): super().__init__(vpcStack, construct_id, env=env, **kwargs) thisVpc = vpcStack.vpc + imageId = ec2.LookupMachineImage(name='debian-11-amd64-20221219-1234', windows=False) ec2instance = ec2.Instance(self, f"i-{thing}", vpc=vpcStack.vpc, instance_type=ec2.InstanceType("t2.nano"), - machine_image=ec2.AmazonLinuxImage(), + machine_image=imageId, block_devices=[ec2.BlockDevice( device_name="/dev/sda1", - volume=ec2.BlockDeviceVolume.ebs(50), + volume=ec2.BlockDeviceVolume.ebs(6), ) ], security_group = vpcStack.SciSG, @@ -29,18 +30,13 @@ class VpcBasisStack(cdk.Stack): super().__init__(scope, construct_id, **kwargs) self.vpc = ec2.Vpc(self, 'out-vpc', - cidr = "172.17.0.0/18", - max_azs = 3, + ip_addresses=ec2.IpAddresses.cidr('172.19.19.0/24'), + max_azs = 1, subnet_configuration=[ ec2.SubnetConfiguration( name = 'pub', subnet_type = ec2.SubnetType.PUBLIC, cidr_mask = 26 - ), - ec2.SubnetConfiguration( - name = 'pri', - subnet_type = ec2.SubnetType.PRIVATE_WITH_NAT, - cidr_mask = 20 ) ], nat_gateways = 3