-
Notifications
You must be signed in to change notification settings - Fork 155
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 backups to workspaces. #4374
base: main
Are you sure you want to change the base?
Add backups to workspaces. #4374
Conversation
Adding Backup vault to the base workspace. Allows enableing or disableing of the vault. Also added a step to purge the vault as apart of the clean up and removal.
removed the depends on to the airlock as that maynot be enabled.
removed the random new line that was added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Couple of initial comments/questions.
removed the random new line that was added
@james-annages is there a reason that you closed the PR? |
@marrobi Sorry for closeing the pull request, i messed up my commits and ended up with a 3 way split, that was not resolving corretly, i have fixed the merge and can repopen. |
Be great if can reopen, as then the comments are preserved. |
@james-annages let me know when you are sorted and will have another run through. Thanks. |
Fix UI build path (microsoft#4375)
…w purging of backup items. Testing ingoing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think getting closer, if can make the changes, and update the CHANGELOG.md file I will give it a test run.
Thank you!
|
||
} | ||
|
||
resource "azurerm_backup_policy_vm" "vm_policy" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking , should the backup policy live with the workspace service, so for VMs, guacamole workspace service? Then each use resource is going to need to be protected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
humm possibly a good call. I was thinking of doing it this way they they are there allready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, then the frequency etc coudl be configured across the worksapce. Hmm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My worry is people think by ticking this box, everthing is being backed up. Many need a note to say "provided supported by the workspace services". The docs need to be clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aggreed. Would it be a possiblity to show a icon on ether user objets or workspace servise that show what is backed up. Also can add a tickbox per service that can enable/disable.
My hope was to add a tab that would show some details about backups/what is backed up. For now have it as show only.
Co-authored-by: Marcus Robinson <[email protected]>
found a fun bug when trying to clean up a workspace. It soft deletes the Azure storage container befor it deletes the backups so that failes. |
A depends_on might work... |
…rkspaces. may need to look at the script approch again.
@james-annages I'm going to give this a test today. Let me know if feel I shouldn't, will try look at the delete container issues. |
@marrobi Give it a go, i think im allready using the the depends_on tags? but may see something i have missed. |
…n-trust-tre/azuretre into pr/james-annages/4374
@james-annages made a few changes, have put them in my branch here - f425e34 Can you pull them into yours? Still testing delete, its getting further though. Thanks! |
Ok, now in the place where as |
OK my script may be of help then. A possible middle ground could be a few commands in the uninstall step:
|
I'm not sure you can disable soft delete. If it's turned off, the delete seems to work, but i my test is hanging on private endpoint deleting, not sure if it's related. I think if it works, we disable soft delete, get the PR in, and can start another discussion on if people think that should be changed. |
If we were to leave the storage accounts we would start to hit quotas, especially if people have workspaces coming and going. Can you test with the changes in my branch, with soft delete disabled. It would actually be much easier with a vault in the core, btu then we have the multi subscription challenge. And it is quite tidy having a vault per workspace. |
Marrobi/pr/james annages/4374
In our TRE we have a vault in the core and are haveing problems with storage accounts with diffrent CMK on them to what the Vault has. (may be a isolated problem.) We can do storage account across diffrtent subs but not the vms or SQL. |
If disable soft delete, can you get the workspace to deploy, do a backup, disable and delete? I think that works for now. I think you can change soft delete as long as it's not AlwaysOn. Maybe as a next step we have it on, and turn it off as part of the workspace disable process. |
@marrobi Just tested the changes from your branch and they look to have worked. |
Hmm, when have you seen a share get redeployed by an update? |
@marrobi had it happen when we moved from v0.19.1 to v0.20.0 it deleted the shares then redeployed them. |
😕 That's not good. So you upgraded the workspace and it deleted the shares? Any idea from what version to what? Would like to track that down. |
Did you turn CMK on maybe? Can you create an issue for that, as we need to make sure it doesn't happen to others |
I will do when I get in to the office tomorrow. |
Resolves #4362
This pull request introduces significant updates to the base template for workspaces, primarily focusing on adding backup capabilities and enhancing the cleanup process for Azure Recovery Services Vaults. The key changes include the addition of new parameters and outputs, updates to the
porter.yaml
file for handling backups, and the creation of new Terraform resources for managing backups.Backup and Recovery Enhancements:
templates/workspaces/base/cleanup_vault.sh
: Added a new script to handle the cleanup of Azure Recovery Services Vaults, including disabling soft delete and removing protected items.templates/workspaces/base/terraform/backup/backup.tf
: Introduced new Terraform resources to create and manage Azure Recovery Services Vaults, VM backup policies, and file share backup policies.templates/workspaces/base/porter.yaml
: Updated to include new parameters and outputs related to backup configuration, and added steps to handle backup vault cleanup during uninstallation. [1] [2] [3] [4] [5] [6] [7] [8]Parameter and Schema Updates:
templates/workspaces/base/parameters.json
: Added new parametersenable_backup
andshared_storage_name
to support backup configurations.templates/workspaces/base/template_schema.json
: Updated the schema to include theenable_backup
parameter, allowing backups to be enabled or disabled for the workspace. [1] [2]Terraform Configuration:
templates/workspaces/base/terraform/backup/variables.tf
: Defined new variables for backup configurations, includinglocation
,tre_id
,resource_group_name
, andshared_storage_name
.templates/workspaces/base/terraform/backup/outputs.tf
: Added new outputs for backup vault and policy names to be used in other parts of the configuration.templates/workspaces/base/terraform/storage.tf
: Updated the shared storage name variable to be configurable.Role Assignments:
templates/workspaces/base/terraform/api-permissions.tf
: Added new role assignments forBackup Contributor
andSite Recovery Contributor
to manage backup and site recovery permissions.These changes collectively enhance the robustness of the workspace by adding comprehensive backup and recovery functionalities, ensuring that critical data can be protected and restored as needed.
What is being addressed
Added in a boolen for enable_backup that is set in the workspace config window. The system will deploy a recovery vault and the needed policy's.
It passes the names of the polices back out so they can be used by other services (sql, vm, etc).
How is this addressed