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

conductor: Add support for Azure Backup and Restore #980

Merged
merged 47 commits into from
Oct 21, 2024

Conversation

ianstanton
Copy link
Member

@ianstanton ianstanton commented Sep 26, 2024

This PR adds steps for creating the Azure 'IAM' resources necessary for instances to perform backup / restore with Azure Blob Storage.

When an instance using Azure is created:

  • Creates User Assigned Managed Identity
  • Creates Role Assignment
  • Creates Federated Credentials
  • Passes relevant info as part of the CoreDB spec

When an instance using Azure is deleted:

  • Deletes the User Assigned Managed Identity

Note: This only supports the backup archive bucket at the moment. We'll add support for the storage archive bucket as a follow-up

Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
@nhudson nhudson marked this pull request as ready for review October 16, 2024 21:13
@ianstanton ianstanton marked this pull request as draft October 16, 2024 21:19
@ianstanton ianstanton marked this pull request as ready for review October 17, 2024 19:45
@ianstanton ianstanton requested review from shahadarsh and removed request for ChuckHend October 17, 2024 19:48
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Copy link
Collaborator

@nhudson nhudson left a comment

Choose a reason for hiding this comment

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

Might be good to add a check like these to make sure you can't set aws or gcp also at the same time. Other than that LGTM! Great work!

    // Error and exit if both IS_CLOUD_FORMATION and IS_GCP are set to true
    if is_cloud_formation && is_gcp {
        panic!("Cannot have both IS_CLOUD_FORMATION and IS_GCP set to true");
    }

    // Error and exit if IS_GCP is true and GCP_PROJECT_ID or GCP_PROJECT_NUMBER are not set
    if is_gcp && (gcp_project_id.is_empty() || gcp_project_number.is_empty()) {
        panic!("GCP_PROJECT_ID and GCP_PROJECT_NUMBER must be set if IS_GCP is true");
    }

Signed-off-by: Ian Stanton <ian@tembo.io>
@ianstanton
Copy link
Member Author

Might be good to add a check like these to make sure you can't set aws or gcp also at the same time. Other than that LGTM! Great work!

    // Error and exit if both IS_CLOUD_FORMATION and IS_GCP are set to true
    if is_cloud_formation && is_gcp {
        panic!("Cannot have both IS_CLOUD_FORMATION and IS_GCP set to true");
    }

    // Error and exit if IS_GCP is true and GCP_PROJECT_ID or GCP_PROJECT_NUMBER are not set
    if is_gcp && (gcp_project_id.is_empty() || gcp_project_number.is_empty()) {
        panic!("GCP_PROJECT_ID and GCP_PROJECT_NUMBER must be set if IS_GCP is true");
    }

Thanks, good suggestion! Addressed here a4b9cd5

Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
@ianstanton ianstanton merged commit 34a3442 into slf-113 Oct 21, 2024
9 checks passed
@ianstanton ianstanton deleted the slf-113-conductor branch October 21, 2024 20:42
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