-
Notifications
You must be signed in to change notification settings - Fork 114
Documentation related to Instance lease feature #492
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
base: main
Are you sure you want to change the base?
Conversation
@blueorangutan docbuild |
@rajujith @rohityadavcloud @sureshanaparti please review |
@sudo87 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. |
QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/492. (QA-JID 318) |
@blueorangutan docbuild |
@sudo87 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. |
QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/492. (QA-JID 319) |
@@ -401,6 +401,31 @@ To create a new compute offering: | |||
- **Disk Offering Strictness**: This flag defines the strictness of the disk offering association | |||
with the compute offering. When set to true, overriding of disk offering is not allowed on deploy instance | |||
and change disk offering is not allowed for the ROOT disk | |||
|
|||
- **Enable Lease**: When this flag is enabled, compute offering is created with lease related metadata. |
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.
Should we add here that, this is only available when the feature is enabled via global setting?
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.
Instance Lease | ||
-------------- | ||
|
||
Cloudstack provides capability to create instance on lease. Lease denotes a set period for which resource is allocated and upon expiry cleanup is performed. |
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.
Explaination of various behaviour scenarios are missing; for example how the feature will work, what happens when the global is disable (i.e. cancels the leases). I think all the various notes on implementation can be put here for the end-user/operator to understand, incld. expected edge-case behaviours.
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.
There are notes included in the docs addressing:
- Expiry action execution
- Lease cancellation
- Delete protection
However, including behaviours as list will provide better clarity. I will update the document.
Configuration Description | ||
======================================= ======================== | ||
instance.lease.enabled Indicates whether to enable the Instance lease featuew, will be applicable only on instances created after lease is enabled. **Default: false** | ||
instance.lease.scheduler.interval Background task interval in seconds that executes Lease expiry action on eligibile expired instances. Default: 3600. |
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.
minor nit - additional blank spaces in the start of the description.
|
||
**Using Instance Lease** | ||
|
||
User can associate Lease to an instance during Deployment of instance or modify existing lease by editing instance. |
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.
Worth mentioning, the behaviour around what happens:
- When instances are not deployed with leases, can they acquire lease by switching service offering?
- What is allowed for admins & end-users for instances deployed with lease
- Generally when service offering is changed
- When lease is disabled by user or admin for an instance
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.
will include these as notes.
Thanks @rohityadavcloud for the review comments, will work on addressing them. |
@blueorangutan docbuild |
@sudo87 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. |
QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/492. (QA-JID 320) |
@blueorangutan docbuild |
@sudo87 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. |
QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/492. (QA-JID 321) |
@@ -401,6 +401,33 @@ To create a new compute offering: | |||
- **Disk Offering Strictness**: This flag defines the strictness of the disk offering association | |||
with the compute offering. When set to true, overriding of disk offering is not allowed on deploy instance | |||
and change disk offering is not allowed for the ROOT disk | |||
|
|||
- **Enable Lease**: When this flag is enabled, compute offering is created with lease related metadata. |
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.
When this flag is enabled, Compute Offering is created with 'Instance Lease' feature enabled. In CloudStack, a lease sets a specific time duration after which a chosen lease action action, such as stopping or destroying the instance, will take place. These lease settings are defined in the Compute Offering and are automatically applied to any Instance created using it.
|
||
When the flag is enabled | ||
|
||
- **Lease Duration (in days)**: Creates a compute offering with Lease duration. Instance created from this compute offering will inherit lease duration by default. |
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.
Lease Duration (in days): Sets the lease duration. An instance created using this compute offering will inherit the lease duration by default.
|
||
- **Lease Duration (in days)**: Creates a compute offering with Lease duration. Instance created from this compute offering will inherit lease duration by default. | ||
|
||
- **Lease expiry action**: Denotes lease expiry action, which gets executed upon lease expiry for instances created from compute offering. |
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.
Lease expiry action: Denotes lease expiry action, which gets executed upon lease expiry for instances created using this compute offering.
Supported values for lease expiry action are as follows:
-------------- | ||
|
||
Cloudstack provides capability to create instance on lease. Lease denotes a set period for which resource is allocated and upon expiry cleanup is performed. | ||
This feature enables automated cleanup of instances created for specific duration and for specific purpose. This feature gives administrators the ability to automatically reclaim |
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.
CloudStack offers the option to create Instances with a Lease. A Lease defines a set time period after which a selected action, such as stopping or destroying the instance, will be automatically performed. This helps optimize cloud resource usage by automatically freeing up resources that are no longer in use. If a user needs an instance only for a limited time, this feature can be useful. When deploying an instance, users can either choose a Compute Offering that includes the Instance Lease feature or enable it specifically for that instance, setting the number of days after which the instance should be stopped or destroyed once their task is complete.
resources that are no longer needed by expired virtual machines, helping to optimize resource utilization and reduce wastage. | ||
|
||
|
||
**Configuring lease feature** |
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.
Configuring Instance Lease feature
======================================= ======================== | ||
Configuration Description | ||
======================================= ======================== | ||
instance.lease.enabled Indicates whether to enable the Instance lease featuew, will be applicable only on instances created after lease is enabled. **Default: false** |
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.
featuew -> feature
|
||
**leaseduration**: Lease duration is specified in days. This can take Natural numbers and -1 to disable the lease. | ||
|
||
Lease may require to be disabled in following scenarios: |
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.
Users can disable the Instance Lease feature during instance deployment by unchecking the 'Enable Lease' option when using a Compute Offering that supports it. For existing instances with a lease already enabled, the lease can be removed by editing the instance and unchecking the 'Enable Lease' option.
|
||
#. Lease Assignment: A lease can only be assigned to an instance during deployment. | ||
#. Lease Acquisition: Instances without a lease cannot acquire one by switching to a different compute offering or by editing the instance. | ||
#. Lease Inheritance: Instances inherit the lease from a compute offering that contains lease metadata. This lease can be overridden or disabled in the "Advanced Settings". |
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.
Lease Inheritance: Instances inherit the lease from a compute offering with 'Instance Lease' feature enabled. This lease can be overridden or disabled in the “Advanced Settings”.
|
||
There are 2 ways to deploy instance with lease from UI: | ||
|
||
1. Use compute offering which has associated lease metadata for instance |
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.
Use compute offering which has 'Instance Lease' feature enabled.
@blueorangutan docbuild |
@sudo87 a Jenkins job has been kicked to build the document. I'll keep you posted as I make progress. |
QA-Doc build preview: https://qa.cloudstack.cloud/builds/docs-build/pr/492. (QA-JID 322) |
Thank you @rajujith for reviewing the doc pr, its updated based on the suggestion. |
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.
LGTM
Documentation PR for instance lease feature apache/cloudstack#10560
📚 Documentation preview 📚: https://cloudstack-documentation--492.org.readthedocs.build/en/492/