Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[checks] make api-endpoint parameter optional & update usage docs #14

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

kylos101
Copy link
Contributor

@kylos101 kylos101 commented Feb 4, 2025

Description

It is only necessary for customers to specify a value for api-endpoint when the VPC endpoints are not in the same account as Gitpod.

Related Issue(s)

Fixes CLC-1118

How to test

Test w/o api-endpoint param, it should not be included in the results for the main subnet
Test w/ api-endpoint param, it should be included in the results for the main subnet
See test results (below)

Documentation

/hold

@kylos101 kylos101 changed the title Kylos101/clc 1118 3 [checks] make api-endpoint parameter optional & update usage docs Feb 4, 2025
@kylos101
Copy link
Contributor Author

kylos101 commented Feb 4, 2025

Test w/o the api-endpoint param:

go run . diagnose
INFO[0000] ℹ️  Running with region `eu-central-1`, main subnet `[subnet-02a57899464adb227  subnet-013003bf204f47611]`, pod subnet `[subnet-0f59b6bfead78792c  subnet-0d6ae7d559bcf50db]`, hosts `[accounts.google.com  https://github.com]`, and api endpoint `` 
INFO[0000] ✅ Main Subnets are valid                     
INFO[0000] ✅ Pod Subnets are valid                      
INFO[0000] ℹ️  Checking prerequisites                   
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ec2messages is not configured, testing service connectivity... 
INFO[0000] ✅ Service ec2messages.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ssm is not configured, testing service connectivity... 
INFO[0000] ✅ Service ssm.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ssmmessages is not configured, testing service connectivity... 
INFO[0000] ✅ Service ssmmessages.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.execute-api is configured 
INFO[0000] ✅ IAM role created and policy attached       
INFO[0001] ℹ️  Launching EC2 instances in Main subnets  
INFO[0001] ℹ️  Created security group with ID: sg-084cfa567812a6bf2 
INFO[0001] ℹ️  Instance type t2.micro shall be used     
INFO[0009] ℹ️  Created security group with ID: sg-0a96a5a8299d4738f 
INFO[0009] ℹ️  Instance type t2.micro shall be used     
INFO[0010] ℹ️  Main EC2 instances: [i-0fac3db35493cb297 i-080ee8342d5f7a1d7] 
INFO[0010] ℹ️  Launching EC2 instances in a Pod subnets 
INFO[0011] ℹ️  Created security group with ID: sg-09df3743501aba525 
INFO[0011] ℹ️  Instance type t2.micro shall be used     
INFO[0013] ℹ️  Created security group with ID: sg-095604552846531bf 
INFO[0014] ℹ️  Instance type t2.micro shall be used     
INFO[0015] ℹ️  Pod EC2 instances: [i-0f347cec110371841 i-08d28c247fd2edd02] 
INFO[0015] ℹ️  Waiting for EC2 instances to become ready (can take up to 2 minutes) 
INFO[0020] ✅ EC2 Instances are now running successfully 
INFO[0020] ℹ️  Connecting to SSM...                     
INFO[0107] ℹ️  Checking if the required AWS Services can be reached from the ec2 instances in the pod subnet 
INFO[0107] ✅ Autoscaling is available                   
INFO[0108] ✅ CloudFormation is available                
INFO[0109] ✅ CloudWatch is available                    
INFO[0110] ✅ EC2 is available                           
INFO[0111] ✅ EC2messages is available                   
INFO[0112] ✅ ECR is available                           
INFO[0113] ✅ ECR Api is available                       
INFO[0114] ✅ EKS is available                           
INFO[0115] ✅ Elastic LoadBalancing is available         
INFO[0116] ✅ KMS is available                           
INFO[0117] ✅ Kinesis Firehose is available              
INFO[0117] ✅ SSM is available                           
INFO[0118] ✅ SSMmessages is available                   
INFO[0120] ✅ SecretsManager is available                
INFO[0121] ✅ Sts is available                           \

INFO[0121] ℹ️  Checking if certain AWS Services can be reached from ec2 instances in the main subnet 
INFO[0122] ✅ DynamoDB is available                      
INFO[0122] ✅ S3 is available                            

INFO[0122] ℹ️  Checking if hosts can be reached with HTTPS from ec2 instances in the main subnets 
INFO[0124] ✅ accounts.google.com is available           
INFO[0125] ✅ https://github.com is available            
INFO[0125] ✅ Instances terminated                       
INFO[0125] Cleaning up: Waiting for 2 minutes so network interfaces are deleted 

No ExecuteAPI ref in main subnet tests.

@kylos101 kylos101 marked this pull request as ready for review February 4, 2025 05:45
@kylos101 kylos101 requested review from a team as code owners February 4, 2025 05:45
@kylos101
Copy link
Contributor Author

kylos101 commented Feb 4, 2025

Test results with execute api:

go run . diagnose
INFO[0000] ℹ️  Running with region `eu-central-1`, main subnet `[subnet-02a57899464adb227  subnet-013003bf204f47611]`, pod subnet `[subnet-0f59b6bfead78792c  subnet-0d6ae7d559bcf50db]`, hosts `[accounts.google.com  https://github.com]`, and api endpoint `xxxxx` 
INFO[0000] ✅ Main Subnets are valid                     
INFO[0000] ✅ Pod Subnets are valid                      
INFO[0000] ℹ️  Checking prerequisites                   
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ec2messages is not configured, testing service connectivity... 
INFO[0000] ✅ Service ec2messages.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ssm is not configured, testing service connectivity... 
INFO[0000] ✅ Service ssm.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ℹ️  VPC endpoint com.amazonaws.eu-central-1.ssmmessages is not configured, testing service connectivity... 
INFO[0000] ✅ Service ssmmessages.eu-central-1.amazonaws.com has connectivity 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.execute-api is configured 
INFO[0000] ✅ IAM role created and policy attached       
INFO[0001] ℹ️  Launching EC2 instances in Main subnets  
INFO[0001] ℹ️  Created security group with ID: sg-02bbceec8996d72c5 
INFO[0002] ℹ️  Instance type t2.micro shall be used     
INFO[0009] ℹ️  Created security group with ID: sg-0074a57eb3072312c 
INFO[0009] ℹ️  Instance type t2.micro shall be used     
INFO[0010] ℹ️  Main EC2 instances: [i-05dc4d216fc716800 i-026df99a5dafde253] 
INFO[0010] ℹ️  Launching EC2 instances in a Pod subnets 
INFO[0011] ℹ️  Created security group with ID: sg-01c7d23c48f57e621 
INFO[0011] ℹ️  Instance type t2.micro shall be used     
INFO[0013] ℹ️  Created security group with ID: sg-0ff845be60326e32d 
INFO[0014] ℹ️  Instance type t2.micro shall be used     
INFO[0015] ℹ️  Pod EC2 instances: [i-05b28f65aaa6397e4 i-0f59eaef3b54e3cf1] 
INFO[0015] ℹ️  Waiting for EC2 instances to become ready (can take up to 2 minutes) 
INFO[0027] ✅ EC2 Instances are now running successfully 
INFO[0027] ℹ️  Connecting to SSM...                     
INFO[0112] ℹ️  Checking if the required AWS Services can be reached from the ec2 instances in the pod subnet 
INFO[0113] ✅ Autoscaling is available                   
INFO[0114] ✅ CloudFormation is available                
INFO[0115] ✅ CloudWatch is available                    
INFO[0117] ✅ EC2 is available                           
INFO[0118] ✅ EC2messages is available                   
INFO[0118] ✅ ECR is available                           
INFO[0119] ✅ ECR Api is available                       
INFO[0120] ✅ EKS is available                           
INFO[0121] ✅ Elastic LoadBalancing is available         
INFO[0122] ✅ KMS is available                           
INFO[0123] ✅ Kinesis Firehose is available              
INFO[0124] ✅ SSM is available                           
INFO[0126] ✅ SSMmessages is available                   
INFO[0126] ✅ SecretsManager is available                
INFO[0127] ✅ Sts is available                           

INFO[0127] ℹ️  Checking if certain AWS Services can be reached from ec2 instances in the main subnet 
INFO[0127] ✅ DynamoDB is available                      
INFO[0129] ✅ ExecuteAPI is available                    <--- it worked
INFO[0130] ✅ S3 is available                            

INFO[0130] ℹ️  Checking if hosts can be reached with HTTPS from ec2 instances in the main subnets 
INFO[0131] ✅ accounts.google.com is available           
INFO[0132] ✅ https://github.com is available            
INFO[0132] ✅ Instances terminated                       
INFO[0132] Cleaning up: Waiting for 2 minutes so network interfaces are deleted 

@kylos101 kylos101 enabled auto-merge (squash) February 4, 2025 05:55
@kylos101
Copy link
Contributor Author

kylos101 commented Feb 4, 2025

Enabled auto merge

@kylos101 kylos101 merged commit 1241b01 into main Feb 4, 2025
@nandajavarma nandajavarma deleted the kylos101/clc-1118-3 branch February 4, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants