Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Introduction

Purpose

Provide ability that user can use UCS blades as hardware resource pool in CloudStack, and provisioning operation system/hypervisor on UCS blade by CloudStack baremetal feature

Document History

User workflow [new in 4.2.1]

Image Added

...

Feature Specifications

  • The feature would allow user to register UCS manager through CloudStack UI and provision OS/hypervisor on blades by CloudStack baremetal feature 
  • Currently this feature would only support:
    • Registering UCS manager
    • Listing UCS template profiles in CloudStack UI
    • Creating UCS profile from UCS template
    • Listing UCS blades 
    • Selecting a UCS profile and associating it Applying UCS profile to a selected blade
    • Provisioning the blade in previous step with baremetal template
    • Only supporting CloudStack basic mode
  •  

Use cases

  1. user has a UCS chassis setup in their lab, and a UCS manager managing UCS chassis
  2. user creates one or more UCS template to describe what kind of hardware they want to realize on UCS blade
  3. user go to CloudStack to register UCS manager with necessary UCS credentials. The UCS manager is zone wide
  4. CloudStack connects to UCS manager and discovers available blades and create a resource pool based on these blades
  5. user create a baremetal cluster in CloudStack
  6. user chooses some blades from resource pool and add them to baremetal cluster
  7. when adding a blade to baremetal cluster, user select a UCS template which tells CloudStack hardware specification of this blade
  8. CloudStack connects to UCS manager and initializes a UCS profile from UCS template selected in step 7
  9. CloudStack uses profile initialized in step 8 to realize the blades to add in baremetal cluster
  10. after blades being added to baremetal cluster, user is able to provision these hosts using common CloudStack baremetal feature

Architecture and Design description

Concepts:

  • A new concept of UCS manager will be added, it's a zone wide resource
    1. user can add multiple UCS managers into a zone
    2. CloudStack creates one resource pool for each UCS manager. In future release, CloudStack should be able to create multiple resource pools per UCS manager
    3. CloudStack discovers used/available UCS blades managed by UCS manager and add them into resource pool created in step2
  • On each resource pool, UI provides a button to add a blade in pool to an existing CloudStack cluster
    1. at this release, the CloudStack cluster is a CloudStack baremetal cluster
    2. when adding a blade, CloudStack provides a dropdown box showing all UCS templates in UCS manager
    3. user select a template and instruct CloudStack to realize blade from the template

Workflow:
This feature is default enabled as long as cloud-hypervisor-ucs.jar presents in classpath of CloudStack. User doesn't need to do any extra work to get the feature working,
a typical workflow is:

  1. open Zone page, click button 'Add Resource Pool'
  2.         in 'Add Resource Pool' wizzard, select 'UCS' as type
  3.         fill up information required for adding UCS manger, e.g IP address, username, password ...
  4.         click 'Add'. Cloudstack will automatically create the pool and discover the resources (UCS blades)

Implementations:
      The feature is implemented as a plugin locating in incubator-cloudstack/plugins/hypervisors/ucs

web services APIs

AddUcsManagerCmd

  • Not supported features:
    • Releasing a blade back to resource pool(in next version)
    • Sync with UCS manager(assuming user won't change UCS hardware setup after registering into CloudStack)

Use cases

...

NOTE: Please refer to section "Web Service APIs" for usage of API showing in this section. For UCS terms and instructions that is out of scope of this documentation, please refer to attached Cisco documents for details  

...

1. add UCS manager

...

once you have your UCS setup in lab, you should have below information:

  • UCS manager IP address
  • UCS manager username
  • UCS manager password

call CloudStack API addUcsManager to register UCS manager. After registering, CloudStack will automatically discover blades and add them into resource pool. The resource pool is created automatically after UCS manager was added.

LIMITATIONS: in this phase, we assume user will not add/remove blades in setup after registering UCS manager into CloudStack. That means, CloudStack will not notice your changes on UCS hardware after UCS manager was registered

...

2. list UCS templates [new in 4.2.1]

...

you are able to retrieve pre-created UCS templates from UCS manager by calling listUcsTemplates. You do this largely before you are about to create a profile off template and associate the profile to a selected blade. see instantiateUcsTemplateAndAssocaciateToBlade

NOTE: 1. templates are synced between CloudStack and UCS manager. Any new added or removed templates are reflected next time you call this API.

           2. per Cisco suggestion, only initial-template should be used for CloudPlatform integration

...

3. list UCS blades

...

after registering UCS manager into CloudStack(use case 1), CloudStack will consult UCS manager for current blades in UCS setup. These blades would be retrieved by calling listUcsBlade. You do this largely before associating a

profile to a blade which is explained in later use case.

LIMITATIONS: in this phase, we assume user will not add/remove blades in setup after registering UCS manager into CloudStack. That means, CloudStack will not notice your changes on UCS hardware after UCS manager was registered

...

4. instantiate UCS template and associate result profile to blade [new in 4.2.1]

...

once you have a template DN returned by listUcsTemplates, you are able to call instantiateUcsTemplateAndAssocaciateToBlade to create a profile and associate it to a UCS blade returned by listUcsBlade.

NOTE: this operation will take a couple of minutes to finish, please wait with patient until it finished or timeout. The default timeout is 60 minutes which is not configurable at current stage

5. adding a UCS blade to baremetal cluster

once you have baremetal cluster created, you are able to add an associated UCS blade to baremetal cluster by calling addBaremetalHost. Creating Baremetal cluster and usage of addBaremetalHost is beyond scope of this document,

please refer to "CloudStack Administrator Guide" for details.

NOTE: this is not the preferred way as it requires user to get IPMI information required by addBaremetaHost API from UCS profile. I was going to add a new API which does such things in automation manner, however, baremetal kickstart feature

has not been finished at that time so I postponed this feature temporarily. It will come out soon.

...

6. disassociate profile from UCS blade.

...

you can call disassociateUcsProfileFromBlade to remove a profile from UCS blade. An optional parameter deleteProfile is given to indicate if the unassociated profile needs to be deleted after disassociation.

7. sync between UCS manager and CloudPlatform [new in 4.2.1]

sometimes user may directly operate on UCS manager for stuff like association or dissociation, this makes states between CloudPlatform and UCS manager out of sync. You can call refreshUcsBlades to instruct CloudPlatform to sync states with UCS manager

Architecture and Design description

Implementation:

The feature is implemented as a plugin service locating in incubator-cloudstack/plugins/hypervisors/ucs. The service is self-contained with own API, it will not interfere with workflow of other CloudStack components.

web services APIs

...

addUcsManager

...

field name

description

zoneId

uuid of zone

name

a  texture name for the UCS manager. CloudStack would not use its value, it's only for user readable

url

ip address of UCS manager

username

username for UCS manager, this is gotten when you setup your UCS hardware

password

password for UCS manager, this is gotten when you setup your UCS hardware

...

curl "http://localhost:8096/?command=addUcsManager&zoneid=$zoneid&name=ucsmanager&url=$url&username=admin&password=C1tr1x99"

addUcsManager response

field name

description

id

uuid of UCS manager

name

name of UCS manager(the field specified in API)

url

ip of UCS manager

zoneId

zone uuid the UCS manager in

...

listUcsTemplates

...

field name

description

ucsmanagerid

UCS manager uuid returned by addUcsManager

curl "http://localhost:8096/?command=addUcsManagerlistUcsProfile&zoneid=$zoneid&name=ucsmanager&url=$url&username=admin&password=C1tr1x99"

AssociateUcsProfileToBladeCmd

ucsmanagerid=$ucsid"

...

listUcsTemplates response (list response)

...

field name

description

dn

profile identity in UCS manager. please refer to cisco documents for details

...

listUcsBlades

...

field name

description

ucsmanagerid

UCS manager uuid returned by addUcsManager


curl "http://localhost:8096/?command=associatesUscProfileToBladelistUcsBlade&ucsmanagerid=$ucsid&profiledn=$profileDn&bladeid=$bladeId"ListUcsBladeCmd"

listUcsBlade response (list response)

field name

description

id

UCS blade uuid in CloudStack

ucsManagerId

UCS manager uuid returned by addUcsManager

hostId

hostId the blade in baremetal cluster(maybe other hypervisor cluster in future), null means blade not belonging to any CloudStack cluster

dn

UCS blade identity in UCS manager

associatedProfileDn

UCS profile DN(see listUcsProfile response) the blade associates to. null means blade not associating to any profile

...

instantiateUcsTemplateAndAssocaciateToBlade

...

field name

description

ucsmanagerid

UCS manager uuid returned by addUcsManager

templatedn

templatedn returned by listUcsTemplates

profilename

profile name you want to give for profile to be created. optional, if omitted, a UUID is given as the name

bladeid

UCS blade uuid in CloudStack(see, listUcsBlade)

example:

curl "http://localhost:8096/10.215.3.5:8080/client/api?command=listUcsBlade&ucsmanagerid=$ucsid"

ListUcsManagerCmd

example:

TODO

ListUcsProfileCmd

example:

curl "http://localhost:8096/?command=listUcsProfile&ucsmanagerid=$ucsid"

UI flow

  • A new page for adding resource pool
  •         A new page for adding UCS manage in 'Add Resrouce Pool' page
  •         A new page for associating UCS profile to a selected UCS blade
  •         A new page for convert a UCS blade to Baremetal host

Appendix

Appendix A:

...

instantiateUcsTemplateAndAssocaciateToBlade&ucsmanagerid=9a34c186-12fa-4bbc-af04-5f1a2bf7ae4a&templatedn=org-root/ls-test&bladeid=3d491c6e-f0b6-40b0-bf6e-f89efdd73c30&profilename=xxxx&response=json&sessionkey=jmyGgRQO30V0QPKm%2BLcx9sl0ciU%3D&_=1381451319292

instantiateUcsTemplateAndAssocaciateToBlade response:

the same as listUcsBlade response, while associatedProfileDn points to profile the blade associates to

example:

{ "queryasyncjobresultresponse" : {"accountid":"970b694a-2f8c-11e3-a77d-000c29b36ff5","userid":"970b7b4f-2f8c-11e3-a77d-000c29b36ff5","cmd":"org.apache.cloudstack.api.InstantiateUcsTemplateAndAssociateToBladeCmd","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"ucsblade":{"id":"3d491c6e-f0b6-40b0-bf6e-f89efdd73c30","ucsmanagerid":"9a34c186-12fa-4bbc-af04-5f1a2bf7ae4a","bladedn":"sys/chassis-1/blade-3","profiledn":"org-root/ls-xxxx"}},"created":"2013-10-10T17:29:00-0700","jobid":"cd9d0282-4dae-463f-80b6-451e168e2e92"} }

listUcsManagers:

field name

description

zoneId

uuid of zone

listUcsManager response

the same as addUcsManager

disassociateUcsProfileFromBlade 

fiedl name

description

bladeid

blade id returned by listUcsBlades

deleteprofile

true/false. optional, default to false. indiciates if the profile needs to be deleted after disassocation

disassociateUcsProfileFromBlade response:

success response

refreshUcsBlades

field name

description

ucsmanagerid

UCS manager uuid returned by addUcsManager

refreshUcsBlades response:

the same to listUcsBlades

UI flow

Image Added Image Added Image Added Image Added Image Added Image Added Image Added Image Added

DB Schema:

Code Block

mysql> describe ucs_blade;
+----------------+---------------------+------+-----+---------+----------------+
| Field          | Type                | Null | Key | Default | Extra          |
+----------------+---------------------+------+-----+---------+----------------+
| id             | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| uuid           | varchar(40)         | YES  | UNI | NULL    |                |
| ucs_manager_id | bigint(20) unsigned | NO   |     | NULL    |                |
| host_id        | bigint(20) unsigned | YES  |     | NULL    |                |
| dn             | varchar(512)        | NO   |     | NULL    |                |
| profile_dn     | varchar(512)        | YES  |     | NULL    |                |
+----------------+---------------------+------+-----+---------+----------------+

mysql> describe ucs_manager;
+----------+---------------------+------+-----+---------+----------------+
| Field    | Type                | Null | Key | Default | Extra          |
+----------+---------------------+------+-----+---------+----------------+
| id       | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| uuid     | varchar(40)         | YES  | UNI | NULL    |                |
| zone_id  | bigint(20) unsigned | NO   |     | NULL    |                |
| name     | varchar(128)        | YES  |     | NULL    |                |
| url      | varchar(255)        | NO   |     | NULL    |                |
| username | varchar(255)        | NO   |     | NULL    |                |
| password | varchar(255)        | NO   |     | NULL    |                |
+----------+---------------------+------+-----+---------+----------------+

Change History:

4.2.1:

1. clone profile was deprecated. In 4.2, when use associates a profile to blade, he chooses a profile and CloudPlatform will clone that profile to a new one. In 4.2.1, instead of choosing a profile, user chooses a profile templateand CloudPlatform will instantiate a profile from that template.

2. list profile was deprecated. In line with change #1, in 4.2.1 user can only list profile templates when associating a blade.

3. Adding sync blades button. In UI, there is a Refresh UCS Blades button which will sync blade status between UCS manager and CloudPlatform when clicked

4. Deprecated event: UCS.ASSOCIATEPROFILE. New events:    UCS.TEMPLATEASSOCIATION, UCS.REFRESHBLADES