Skip to content

Instantly share code, notes, and snippets.

@vipulsabhaya
Last active December 23, 2015 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vipulsabhaya/6599241 to your computer and use it in GitHub Desktop.
Save vipulsabhaya/6599241 to your computer and use it in GitHub Desktop.
*No Host-aggregates / all hosts can boot any flavor*
creating a flavor in Trove
--------------------------
Mgmt API to create a new flavor, service_type required
1. Check if flavor with name specified already exists in Nova
2. Create a flavor with the specified name/specs in Nova
3. Create an service_flavors entry with service_type
service_flavor table:
---------------------
id: 1
flavor_id: 1001
service_type: mysql
id: 2
flavor_id: 1002
service_type: mysql
id: 1
flavor_id: 1001 <------- existing flavor mapped to second service type
service_type: redis
Booting instances
---------------
Instance create API call
1. Validate trove flavor_id specified is allowed for given service_type
2. boot instance with --hint service_type = <service_type> <---- Hint is ignored, since nova doesn't know about it
=============================================================================
*With host aggregates*
configure aggregates (in nova)
------------------------------
nova aggregate-set-metadata <id> service_type=mysql...
nova aggregate-set-metadata <id> service_type=redis...
creating a flavor in Trove
--------------------------
Mgmt API to create a new flavor, service_type required
1. Check if flavor with name specified already exists in Nova
2. Create a flavor with the specified name/specs in Nova
3. Create an service_flavors entry with service_type
service_flavor table:
---------------------
id: 1
flavor_id: 1001
service_type: mysql
id: 2
flavor_id: 1002
service_type: mysql
id: 1
flavor_id: 1001 <------- existing flavor mapped to second service type
service_type: redis
configure nova flavor keys
---------------------------
nova flavor-key set_key --name=1001 (db.small) --key=service_type --value=mysql
nova flavor-key set_key --name=1001 (db.small) --key=service_type --value=redis
nova flavor-key set_key --name=1002 (db.large) --key=service_type --value=mysql <--- only available for mysql
Booting instances
---------------
Instance create API call
1. Validate trove flavor_id specified is allowed for given service_type
2. boot instance with --hint service_type = <service_type> <---- Hint is honored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment