...
Architecture and Design description
This feature will come as a separate plugin which will use the PluggableService to add the DedicatedResources feature APIs into CloudStack, the DedicatedResourceManager will be responsible for thread scheduling and the DedicatedResourcePlanner which will implement a deployment planner interface.
Dedication will be achieved as:
- Admin adds Pod/cluster/host
- Admin dedicates the pod/cluster/host to a domain/account using new dedication APIs
- Admin enables the pod/cluster/hostDedication will be used when:
- If a request is placed to deploy a VM with Service Offering flag "isdedicated" ON
- Check if the account/domain has dedicated resources:
- If Yes, Place the VM in dedicated resource
- If No, Place the VM in new free empty host, make that host dedicated to that account.
Note: If Service Offering Flag is OFF, non-dedicated (shared) resources will be used.
API Changes:
Following APIs need to be updated.
Root Admin APIs
- Dedication will be achieved using APIs by providing additional request parameters : domainid and accountid while creating pod, clusters or hosts.
- Dedication can also be achieved by updating the above parameters for updatePod, updateCluster or updateHost APIs
Request parameter addition:
Parameter Name | Description | Required |
---|
domainid | Create a pod dedicated to a domain | false |
accountid | Create a pod dedicated to an account | false |
new APIs will be added:
- dedicatePod
- dedicateCluster
- dedicateHost
- listDedicatedPods
- listDedicatedClusters
- listDedicatedHosts
Existing API modification:
- updatePod
- listPods
- addCluster
- deleteCluster
- updateCluster
- listClusters
- addHost
- updateHost
- listHosts
- createServiceOffering: Request Parameter Addition:
Parameter Name | Description | Required |
---|
isdedicated | if true, Instance will be deployed on the host dedicated to the account | false
|
DB Changes:
- dedicated_resources (id, uuid, zone_id, pod_id, cluster_id, host_id, domain_id, account_id) : This table contains the details about the patches for different XenServers versions.
Field | Type | NULL | Key | Default | Extra |
---|
id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
uuid | varchar(40) | NO | | NULL | |
description | varchar(999) | YES | | NULL | |
label | varchar(40) | YES | | NULL | |
timestamp | timestamp | YES | | NULL | |
url | varchar(999) | YES | | NULL | |
- host_pod_ref table: Introduce two columns “domain_id” and "account_id". Default value for both should be null.
- cluster table: Introduce two columns “domain_id” and "account_id". Default value for both should be null.
- host table: Introduce two columns “domain_id” and "account_id". Default value for both should be null.
- service_offering table: Introduce a column “isdedicated” in service_offering table. Default value should be 0.
...
UI flow
- In "Add Pod" add a new option "Public" check option. If it is checked show 2 more list options of domain and account, set to the default value.
- In "Add Cluster" add a new option "Public" check option. If it is checked show 2 more list options of domain and account, set to the default value
- In "Add Host" add a new option "Public" check option. If it is checked show 2 more list options of domain and account, set to the default value
- Display isPublic flag when listPods, listClusters, listHosts.
- Set isPublic to true only when domainId or accountId is not null for the pod in the listPod response
- Add a check option: isdedicated in "Add compute offering" windowTBD