skypilot
skypilot copied to clipboard
Support for multiple GCP configurations and remove `default` requirement
I have multiple GCP accounts/configurations (TPU research cloud, personal account, various organization accounts, etc.) and would like to be able to switch between them and have SkyPilot automatically use the currently active configuration (or have some way to hardcode which configuration SkyPilot should always use).
I also would like to name my configurations something other than default
and have SkyPilot work (currently fails because it looks for a default
credential file).
https://github.com/skypilot-org/skypilot/blob/master/sky/clouds/gcp.py#L21
Hey @gmittal a few questions:
- By "the currently active configuration", do you mean whatever is currently encoded in
~/.config/gcloud/active_config
? This file contains a string that identifies a file in~/.config/gcloud/configurations/
. - For switching, you could run
gcloud init
to choose the new project and thengcloud auth application-default login
. This will switch the config files correctly. We can then make SkyPilot always pick up the config pointed to byactive_config
. Would this manual switching suffice for your use case?
Yes, by currently active configuration I mean the whatever is encoded in ~/.config/gcloud/active_config
(also viewable with gcloud config configurations list
).
The manual switching works for me, in my other workflows I currently switch configurations using gcloud config configurations activate CONFIG_NAME
, and SkyPilot picking up the config pointed to by active_config
sounds like a good fix rather than assuming the default
configuration.
Closed by https://github.com/skypilot-org/skypilot/pull/1539.
SkyPilot uses the config activated by gcloud config configurations activate CONFIG_NAME
@gmittal let us know if it still doesn't work, thanks!
Reopening, as we may want to pick up the config pointed to by active_config
, rather than relying on config_default.
Related discussion in #1535.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.