Hi All, Has anyone tried creating a Storage Gatew...
# aws
o
Hi All, Has anyone tried creating a Storage Gateway for S3 File share using Pulumi - Python ?
s
yeah
is there something youre trying to do with it?
o
Hey @sparse-gold-10561, I am trying to create a Storage Gateway, for that first i created the following resources : • Security Group • VPC Endpoint for Storage Gateway • EC2 Instance for Gateway using the latest region wise AMI and added a cache storage EBS Now when i try to create a Storage Gateway , its just running indefinitely for more than 1-2hrs without any result. This code when i try to run
pulumi up
it doesn't throw any error or any message its just hangs and the timer continues.
Copy code
dev_ap_south_1_sgw = aws.storagegateway.Gateway("dev-ap-south-1-sgw",
                                                     gateway_name="dev-ap-south-1-sgw",
                                                     gateway_timezone="GMT+5:30",
                                                     gateway_type="FILE_S3",
                                                     gateway_vpc_endpoint=vpc_endpoint.id,
                                                     maintenance_start_time={
                                                         "dayOfWeek": "5",
                                                         "hourOfDay": 0,
                                                         "minuteOfHour": 25,
                                                     },
                                                     gateway_ip_address="10.45.3.42",
                                                     # activation_key="BHTTD-V2V8L-DP9I6-TCSFV-0O6KU",
                                                     opts=pulumi.ResourceOptions(protect=False))
Tried both with IP (Public and Private) as well as Activation Key - Genereated by accessing the EC2 Instances via SSH
So wanted to know if i am missing any steps for activation and creating the Gateway endpoint
s
likely the AWS service can't connect to the IP address of the Appliance VM.. make sure https is open
Copy code
storage_gateway_research_fgw = aws.storagegateway.Gateway(
    "storage_gateway_research_fgw",
    gateway_name="storage_gateway_research_fgw",
    gateway_timezone="GMT-5:00",
    gateway_type="FILE_S3",
    gateway_ip_address="172.17.8.39",
)
my code above looks similar to yours minus the vpc endpoint as we are not using one for this
o
Ok I kept the http port open, will try with https
s
oh.. also 8080
image.png
although that might be strictly for their hardware appliance
step 7
o
Okay will try these
Thanks adding the Ports in SG worked
How do i configure the Disk attached in EC2 to be used as Local Cache for Gateway ? is their a pulumi api for it or we manage it using boto3 ?
s
we do something like
Copy code
ri_sgw_local_disk = ec2_ri_sgw_server.ebs_block_devices[0].device_name.apply(
    lambda device_name: aws.storagegateway.get_local_disk_output(disk_node=device_name, gateway_arn=s3_ri_sgw.arn)
)

ri_sgw_cache = aws.storagegateway.Cache("ri-sgw-cache", disk_id=ri_sgw_local_disk.disk_id, gateway_arn=s3_ri_sgw.arn)
but you need to get the device_name from the EC2 server or EBS volume that you spin up
o
Okay thanks