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

Add skyplane azure check command #647

Merged
merged 2 commits into from
Oct 31, 2022
Merged

Add skyplane azure check command #647

merged 2 commits into from
Oct 31, 2022

Conversation

parasj
Copy link
Contributor

@parasj parasj commented Oct 31, 2022

Example usage

$ skyplane azure check testskyplaneazureparas containazure
================================================================================
Checking Skyplane configuration...
================================================================================
✔ Check passed: Azure enabled in config
✔ Check passed: Azure principal ID set in config
✔ Check passed: Azure subscription ID set in config
✔ Check passed: Azure client ID set in config

================================================================================
Checking Azure CLI...
================================================================================
✔ Check passed: Azure CLI installed
✔ Check passed: Azure CLI logged in
✔ Check passed: Azure CLI has subscription set
✔ Check passed: Azure CLI has correct subscription set

================================================================================
Checking Azure UMIs...
================================================================================
✔ Check passed: Azure CLI UMIs listed
✔ Check passed: Skyplane UMI exists
✔ Check passed: Skyplane UMI has correct client ID
✔ Check passed: Skyplane UMI has correct principal ID

================================================================================
Checking Azure Python SDK...
================================================================================
✔ Check passed: Azure Python SDK credential created
✔ Check passed: Azure Python SDK credential is DefaultAzureCredential
✔ Check passed: Azure Python SDK token created

================================================================================
Checking Azure storage management client...
================================================================================
✔ Check passed: Azure Python SDK storage client created
✔ Check passed: Azure Python SDK storage client is StorageManagementClient
✔ Check passed: Azure Python SDK storage accounts listed
✔ Check passed: Skyplane storage account exists

================================================================================
Checking Azure storage account access via UMI...
================================================================================
✔ Check passed: Azure CLI UMI roles listed
✔ Check passed: Skyplane storage account role assigned to UMI
Skyplane storage account roles: ['Contributor', 'Storage Blob Data Contributor', 'Storage Account Contributor']
✔ Check passed: Skyplane storage account has Blob Data Contributor role assigned to UMI
✔ Check passed: Skyplane storage account has Account Contributor role assigned to UMI

================================================================================
Checking Azure container access
================================================================================
✔ Check passed: Azure Python SDK container client created
✔ Check passed: Azure Python SDK container client is ContainerClient
4^C
Aborted!
(base) ~/c/skylark ❯❯❯                                                                                                      ✘ 1
(base) ~/c/skylark ❯❯❯                                                                                                    ✘ 130
(base) ~/c/skylark ❯❯❯ skyplane azure check testskyplaneazureparas containazure                                           ✘ 130
================================================================================
Checking Skyplane configuration...
================================================================================
✔ Check passed: Azure enabled in config
✔ Check passed: Azure principal ID set in config
✔ Check passed: Azure subscription ID set in config
✔ Check passed: Azure client ID set in config

================================================================================
Checking Azure CLI...
================================================================================
✔ Check passed: Azure CLI installed
✔ Check passed: Azure CLI logged in
✔ Check passed: Azure CLI has subscription set
✔ Check passed: Azure CLI has correct subscription set

================================================================================
Checking Azure UMIs...
================================================================================
✔ Check passed: Azure CLI UMIs listed
✔ Check passed: Skyplane UMI exists
✔ Check passed: Skyplane UMI has correct client ID
✔ Check passed: Skyplane UMI has correct principal ID

================================================================================
Checking Azure Python SDK...
================================================================================
✔ Check passed: Azure Python SDK credential created
✔ Check passed: Azure Python SDK credential is DefaultAzureCredential
✔ Check passed: Azure Python SDK token created

================================================================================
Checking Azure storage management client...
================================================================================
✔ Check passed: Azure Python SDK storage client created
✔ Check passed: Azure Python SDK storage client is StorageManagementClient
✔ Check passed: Azure Python SDK storage accounts listed
✔ Check passed: Skyplane storage account exists

================================================================================
Checking Azure storage account access via UMI...
================================================================================
✔ Check passed: Azure CLI UMI roles listed
✔ Check passed: Skyplane storage account role assigned to UMI
Skyplane storage account roles: ['Contributor', 'Storage Blob Data Contributor', 'Storage Account Contributor']
✔ Check passed: Skyplane storage account has Blob Data Contributor role assigned to UMI
✔ Check passed: Skyplane storage account has Account Contributor role assigned to UMI

================================================================================
Checking Azure container access
================================================================================
✔ Check passed: Azure Python SDK container client created
✔ Check passed: Azure Python SDK container client is ContainerClient

@parasj parasj enabled auto-merge (squash) October 31, 2022 07:44
@parasj parasj merged commit c4611ef into main Oct 31, 2022
@parasj parasj deleted the debug/azure branch October 31, 2022 07:50
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.

1 participant