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

Turn off external IPs #54

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Turn off external IPs #54

merged 3 commits into from
Jan 16, 2024

Conversation

nweires
Copy link
Collaborator

@nweires nweires commented Jan 9, 2024

Configure our Compute Engine VMs (created via Batch) to not use external IPs. We don't need them, and we're hitting quota limits on the number of external IP addresses in use.

Also ensure that the relevant subnet has Private Google Access enabled so the jobs can access Google APIs. (This is using the default VPC network, which has a subnet in every region.)

Testing: Successfully ran a test job and confirmed that the created VMs did not have external IPs:
image

Copy link

github-actions bot commented Jan 9, 2024

File Coverage
All files 86%
base.py 91%
exc.py 57%
hpc.py 78%
local.py 70%
postprocessing.py 84%
utils.py 91%
cloud/docker_base.py 78%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/shared_testing_stuff.py 85%
test/test_docker.py 33%
test/test_local.py 97%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 86%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against 6ff39d6

@lathanh
Copy link
Member

lathanh commented Jan 11, 2024

Testing: Successfully ran a test job and confirmed that the created VMs did not have external IPs:

FYI, I did a run based off of your branch yesterday and it also ran successfully!

@lathanh
Copy link
Member

lathanh commented Jan 11, 2024

Configure our Compute Engine VMs (created via Batch) to not use external IPs.

Have you thought about doing this for post-processing? On one hand, scope creep; on the other, it seems easy enough.

@nweires
Copy link
Collaborator Author

nweires commented Jan 12, 2024

Configure our Compute Engine VMs (created via Batch) to not use external IPs.

Have you thought about doing this for post-processing? On one hand, scope creep; on the other, it seems easy enough.

I don't think Cloud Run jobs get external IPs by default? If they do (and it's a problem), I'll handle that separately.

Copy link

@mfathollahzadeh mfathollahzadeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Natalie! This looks great! Just added some questions

no_external_ip_address=True,
)
]
),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks, Natalie! Just a question here: once we eliminate the use of external IPs, I assume we can not simply SSH into machines for any reason like what you did earlier to confirm the remaining docker images? Are there alternatives? I don't think this would be a big issue but still trying to understand if this would impose any limitations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still SSH in as usual, via the GCP console or the gcloud command, since those go through Google's internal network, not the external IP.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, great! for some reason I though we are SSHing to external IPs but this makes sense!

logger.error(
f"Error ({op.error_code}) updating subnet settings to allow private Google access: {op.error_message}"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the external IP limitation of 128, do we have any similar limitation with private IPs? I am trying to understand how many concurrent simulations can we achieve with eliminating the use of external IPs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the relevant quotas here, I think the relevant ones are high enough (e.g. the Instances per VPC network limit is 15,000) that we're more likely to hit limits on general compute resources (e.g. total number of CPUs) first. (Note that we're not using static internal IPs, so those limits don't apply here.)

Most of these quotas also apply per-region, so if needed we could also start running jobs in different regions. (Other regions also have different quotas and prices, so this might be worth looking into anyway.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This great! right and general compute resources have much higher (compared to 128) quota limits, so we should be good on that part then.
Agreed! I think it would be worth looking into quotas and costs for other regions to see if switching to those would make sense

no_external_ip_address=True,
)
]
),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, great! for some reason I though we are SSHing to external IPs but this makes sense!

logger.error(
f"Error ({op.error_code}) updating subnet settings to allow private Google access: {op.error_message}"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This great! right and general compute resources have much higher (compared to 128) quota limits, so we should be good on that part then.
Agreed! I think it would be worth looking into quotas and costs for other regions to see if switching to those would make sense

@nweires nweires merged commit 5000f6b into gcp Jan 16, 2024
6 checks passed
@nweires nweires deleted the natalie/external_ips branch January 16, 2024 17:37
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.

3 participants