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

Tolerate https scheme & update docs #8

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Tolerate https scheme & update docs #8

merged 2 commits into from
Aug 21, 2024

Conversation

kylos101
Copy link
Contributor

Description

Tolerate users encountering with scheme or not, but only support https scheme (ignore others).

Also, updated the documentation after testing in a private cell that was built using our latest infrastructure (where we limit the VPC endpoints). Otherwise gitpod-network-check will fail.

Related Issue(s)

Fixes ENT-630

How to test

  1. Test with unsupported schemes
go run . diagnose
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 configured 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.ssm is configured 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.ssmmessages is configured 
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-0fbbf79f1d4749ece 
INFO[0008] ℹ️  Created security group with ID: sg-09cf8f40133a248b7 
INFO[0010] ℹ️  Main EC2 instances: [i-045e426b72b43d9f0 i-0ec28f9c96ca805ce] 
INFO[0010] ℹ️  Launching EC2 instances in a Pod subnets 
INFO[0010] ℹ️  Created security group with ID: sg-07991bf2e32482c40 
INFO[0013] ℹ️  Created security group with ID: sg-09f06096305c1d743 
INFO[0015] ℹ️  Pod EC2 instances: [i-0c24d97271ebf7783 i-034e332706fbfe246] 
INFO[0015] ℹ️  Waiting for EC2 instances to become ready (can take up to 2 minutes) 
INFO[0047] ✅ EC2 Instances are now running successfully 
INFO[0047] ℹ️  Connecting to SSM...                     
INFO[0123] ℹ️  Checking if the required AWS Services can be reached from the ec2 instances 
INFO[0124] ✅ Autoscaling is available                   
INFO[0125] ✅ CloudFormation is available                
INFO[0126] ✅ CloudWatch is available                    
INFO[0127] ✅ EC2 is available                           
INFO[0128] ✅ EC2messages is available                   
INFO[0130] ✅ ECR is available                           
INFO[0130] ✅ ECR Api is available                       
INFO[0131] ✅ EKS is available                           
INFO[0132] ✅ Elastic LoadBalancing is available         
INFO[0134] ✅ KMS is available                           
INFO[0135] ✅ Kinesis Firehose is available              
INFO[0136] ✅ SSM is available                           
INFO[0137] ✅ SSMmessages is available                   
INFO[0138] ✅ SecretsManager is available                
INFO[0139] ✅ Sts is available                           
INFO[0139] ℹ️  Checking if certain AWS Services can be reached from ec2 instances in the main subnet 
INFO[0140] ✅ DynamoDB is available                      
INFO[0142] ✅ S3 is available                            
WARN[0142] 🚧 Unsupported scheme: httpx, skipping test for  httpx://gitpod.io 
WARN[0142] 🚧 Unsupported scheme: http, skipping test for  http://aol.com 
INFO[0142] ℹ️  Checking if hosts can be reached with HTTPS from ec2 instances in the main subnets 
INFO[0143] ✅ accounts.google.com is available           
INFO[0144] ✅ github.com is available                    
INFO[0145] ✅ https://okta.com is available              
INFO[0145] ✅ Instances terminated                       
INFO[0145] Cleaning up: Waiting for 2 minutes so network interfaces are deleted 
INFO[0266] ✅ Role 'GitpodNetworkCheck' deleted          
INFO[0266] ✅ Instance profile deleted                   
INFO[0267] ✅ Security group 'sg-0fbbf79f1d4749ece' deleted 
INFO[0267] ✅ Security group 'sg-09cf8f40133a248b7' deleted 
INFO[0267] ✅ Security group 'sg-07991bf2e32482c40' deleted 
INFO[0267] ✅ Security group 'sg-09f06096305c1d743' deleted 
  1. Test with supported schemes only
go run . diagnose
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 configured 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.ssm is configured 
INFO[0000] ✅ VPC endpoint com.amazonaws.eu-central-1.ssmmessages is configured 
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-0306785da84886870 
INFO[0007] ℹ️  Created security group with ID: sg-0799a09b016272637 
INFO[0009] ℹ️  Main EC2 instances: [i-062a3b4b79864ae3c i-0f22ea05add71fd21] 
INFO[0009] ℹ️  Launching EC2 instances in a Pod subnets 
INFO[0010] ℹ️  Created security group with ID: sg-0bd7cb9de2b5bbed8 
INFO[0012] ℹ️  Created security group with ID: sg-0246627980b8b50e5 
INFO[0014] ℹ️  Pod EC2 instances: [i-0532caaae32e9c615 i-0ed8eedf443da1281] 
INFO[0014] ℹ️  Waiting for EC2 instances to become ready (can take up to 2 minutes) 
INFO[0043] ✅ EC2 Instances are now running successfully 
INFO[0043] ℹ️  Connecting to SSM...                     
INFO[0117] ℹ️  Checking if the required AWS Services can be reached from the ec2 instances 
INFO[0118] ✅ Autoscaling is available                   
INFO[0119] ✅ CloudFormation is available                
INFO[0120] ✅ CloudWatch is available                    
INFO[0122] ✅ EC2 is available                           
INFO[0123] ✅ EC2messages is available                   
INFO[0124] ✅ ECR is available                           
INFO[0125] ✅ ECR Api is available                       
INFO[0126] ✅ EKS is available                           
INFO[0127] ✅ Elastic LoadBalancing is available         
INFO[0128] ✅ KMS is available                           
INFO[0130] ✅ Kinesis Firehose is available              
INFO[0131] ✅ SSM is available                           
INFO[0132] ✅ SSMmessages is available                   
INFO[0133] ✅ SecretsManager is available                
INFO[0134] ✅ Sts is available                           
INFO[0134] ℹ️  Checking if certain AWS Services can be reached from ec2 instances in the main subnet 
INFO[0135] ✅ DynamoDB is available                      
INFO[0136] ✅ S3 is available                            
INFO[0136] ℹ️  Checking if hosts can be reached with HTTPS from ec2 instances in the main subnets 
INFO[0137] ✅ accounts.google.com is available           
INFO[0139] ✅ https://github.com is available            
INFO[0139] ✅ Instances terminated                       
INFO[0139] Cleaning up: Waiting for 2 minutes so network interfaces are deleted 
INFO[0260] ✅ Role 'GitpodNetworkCheck' deleted          
INFO[0260] ✅ Instance profile deleted                   
INFO[0260] ✅ Security group 'sg-0306785da84886870' deleted 
INFO[0261] ✅ Security group 'sg-0799a09b016272637' deleted 
INFO[0261] ✅ Security group 'sg-0bd7cb9de2b5bbed8' deleted 
INFO[0261] ✅ Security group 'sg-0246627980b8b50e5' deleted 

Documentation

/hold

Private networks may need to have the policy updated for VPC endpoints, otherwise gitpod-network-check will fail.
@kylos101 kylos101 marked this pull request as ready for review August 20, 2024 20:38
@kylos101 kylos101 requested review from a team as code owners August 20, 2024 20:38
@kylos101 kylos101 merged commit e6e821a into main Aug 21, 2024
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