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

feat: [CDE-321]: Storage for CDE #500

Merged
merged 9 commits into from
Sep 23, 2024
Merged

feat: [CDE-321]: Storage for CDE #500

merged 9 commits into from
Sep 23, 2024

Conversation

vikyathharekal
Copy link
Collaborator

Refer https://harness.atlassian.net/wiki/spaces/CDE/pages/22007742538/Block+storage+for+VM+created+in+bare-metal+machines+using+Ceph#Start-Gitspace

Init

  1. Added scripts for provision, detach, and delete of storage.
  2. Adding StorageIdentifier in init task which is in the format /
  3. Adding nomad task to create ceph storage script
  4. CephPoolIdentifier and RBDIdentifier are extracted from the StorageIdentifier
  5. Size for the RBD is taken from resource.DiskSize
  6. Updated ignite_run to mount the above mapped volume from bare metal machine to the VM using --volumes
  7. instance_storage_identifier is stored in DB for it to be used in cleanup task
  8. Added migration to add the above column
  9. Updated the init task cleanup to remove ceph storage script

Cleanup

  1. CleanupType (DETACH, DELETE) added. Difference is in delete, we would also delete the RBD and the data will be gone. This will be used when gitspace is deleted
  2. Added nomad tasks to copy the script and delete at the end
  3. storageIdentifier is picked up from the instance in DB and ceph script is updated as done in init task above

Commit Checklist

Thank you for creating a pull request! To help us review / merge this can you make sure that your PR adheres as much as possible to the following.

The Basics

If you are adding new functionality, please provide evidence of the new functionality.

command/harness/dlite/init.go Show resolved Hide resolved
internal/drivers/amazon/driver.go Outdated Show resolved Hide resolved
internal/drivers/anka/driver.go Outdated Show resolved Hide resolved
internal/drivers/ankabuild/driver.go Outdated Show resolved Hide resolved
internal/drivers/azure/driver.go Outdated Show resolved Hide resolved
internal/drivers/google/driver.go Outdated Show resolved Hide resolved
internal/drivers/imanager.go Show resolved Hide resolved
internal/drivers/imanager.go Show resolved Hide resolved
internal/drivers/manager.go Show resolved Hide resolved
internal/drivers/manager.go Show resolved Hide resolved
command/harness/destroy.go Outdated Show resolved Hide resolved
command/harness/setup.go Show resolved Hide resolved
internal/drivers/nomad/driver.go Outdated Show resolved Hide resolved
internal/drivers/nomad/driver.go Outdated Show resolved Hide resolved
internal/drivers/nomad/driver.go Show resolved Hide resolved
internal/drivers/nomad/driver.go Outdated Show resolved Hide resolved
@vistaarjuneja
Copy link
Collaborator

@vikyathharekal how do we send the storage identifier in the cleanup request?

@vikyathharekal
Copy link
Collaborator Author

@vikyathharekal how do we send the storage identifier in the cleanup request?

Discussed offline - storage identifier is stored in the instance record as of now

@vikyathharekal vikyathharekal merged commit 9a1f900 into master Sep 23, 2024
1 check passed
@vikyathharekal vikyathharekal deleted the CDE-321 branch September 23, 2024 04:06
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