Skip to content

Commit

Permalink
gcp auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Oct 4, 2023
1 parent 9088ec4 commit 0624f36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/auth/vm_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def authenticate_vm(path):
def start_runner(creds, user, id = "gpu-insatnce", zone='us-central1-a', instance='demos-tests'):
compute = authenticate_vm(creds)
compute.instances().start(project=id, zone=zone, instance=instance).execute()
request = compute.instances().get(project=id, zone=zone, instance=instance)
response = request.execute()

# Extract the external IP address of the instance
external_ip = response['networkInterfaces'][0]['accessConfigs'][0]['natIP']
# request = compute.instances().get(project=id, zone=zone, instance=instance)
# response = request.execute()
#
# # Extract the external IP address of the instance
# external_ip = response['networkInterfaces'][0]['accessConfigs'][0]['natIP']

# Establish an SSH connection to the instance
credentials, _ = impersonated_credentials.load_credentials_from_file(
Expand Down

0 comments on commit 0624f36

Please sign in to comment.