Bug 1041219

Summary: [RFE][nova]: Allow tenants to create a virtual cluster that contains multiple instances
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/vcluster-api-extension
Whiteboard: upstream_milestone_none upstream_status_unknown upstream_definition_drafting
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:45:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 13:59:20 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/vcluster-api-extension.

Description:

This blue print adds an api extension called vcluster to nova. The new api allows the creation/update/delete of virtual clusters. A virtual cluster contains a set of instances, each can be of type "server" and "block-storage", and it contains a set of groups that define the relationship among all the instances. For each group, specification of the relationship (such as anti-affinity/proximity rules) can be defined.

POST v2/{tenant_id}/vclusters/ Create a virtual cluster
GET v2/{tenant_id}/vclusters/{vcluster_id} Describes a specific virtual cluster
DELETE v2/{tenant_id}/vclusters/{vcluster_id} Delete a virtual cluster

Example parameters for virtual clusters in JSON format are given as below.
1. use case of one volume attached to one server
{
"vcluster" : {
        "name" : "new-virtual-cluster",
         "instances" : {
              "instance": {
                     "name": "db-server-1",
                      "type": "server",
                      "spec": {
                              "imageRef": "xxx-yyy-zzz",
                              "flavorRef": "123-456-789"
                       }
               }
              "instance": {
                     "name": "db-vol-1",
                      "type": "volume",
                      "spec": {
                              "size": x,
                              "volume_type": ""
                       }
               }

         }
         "groupings": {
                "grouping": {
                        "name": "group-1",
                        "membersRef": "["db-server-1", "db-vol-1"],
                        "spec" {
                         "rule": "affinity"
                         }
                 }
          }
     }
}
2. use case of a redundant data servers
{
"vcluster" : {
        "name" : "new-virtual-cluster",
         "instances" : {
              "instance": {
                     "name": "db-server-1",
                      "type": "server",
                      "spec": {
                              "imageRef": "xxx-yyy-zzz",
                              "flavorRef": "123-456-789"
                       }
               }
              "instance": {
                     "name": "db-vol-1",
                      "type": "volume",
                      "spec": {
                              "size": x,
                              "volume_type": ""
                       }
               }
                     "name": "db-server-2",
                      "type": "server",
                      "spec": {
                              "imageRef": "xxx-yyy-zzz",
                              "flavorRef": "123-456-789"
                       }
               }
              "instance": {
                     "name": "db-vol-2",
                      "type": "volume",
                      "spec": {
                              "size": x,
                              "volume_type": ""
                       }
               }

         }
         "groupings": {
                "grouping": {
                        "name": "group-1",
                        "membersRef": "["db-server-1", "db-vol-1"],
                        "spec" {
                         "rule": "affinity"
                         }
                 }
                "grouping": {
                        "name": "group-2",
                        "membersRef": "["db-server-2", "db-vol-2"],
                        "spec" {
                         "rule": "affinity"
                         }
                 }
                "grouping": {
                        "name": "group-3",
                        "membersRef": "["db-server-1", "db-server-2"],
                        "spec" {
                         "rule": "anti-affinity"
                         }
                 }
                "grouping": {
                        "name": "group-1",
                        "membersRef": "["db-vol-1", "db-vol-2"],
                        "spec" {
                         "rule": "anti-affinity"
                         }
                 }

          }
     }
}


Specification URL (additional information):

None