Sahara/ApiProposal

Proposal Only
Please recognize that this is only a proposed DSL to be considered for development. This specification is NOT YET IMPLEMENTED.

See: Launchpad blueprint for Pluggable cluster provisioning mechanism

Request
{       "cluster": { "name": "slice", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 5 }   }

Response
{       "cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "", "name": "slice", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 5, "status": "BUILD", "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }           ]        }    }

Request
N/A

Response
{       "cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "", "name": "slice", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 5, "status": "DELETING", "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }           ]        }    }

Request
N/A

Response
{       "clusters": [ {               "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "name": "slice", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:15:10Z", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 5, "status": "ACTIVE", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }               ]            },            {                "id": "ac111111-2d86-4597-8010-cbe787bbbc41", "name": "real", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:15:10Z", "clusterType": "hbase", "flavorId": "4", "nodeCount": 20, "status": "ACTIVE", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/ac111111-2d86-4597-8010-cbe787bbbc41" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/ac111111-2d86-4597-8010-cbe787bbbc41" }               ]            }        ]    }

Request
N/A

Response
{       "cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:20:10Z", "name": "slice", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 5, "status": "ACTIVE", "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }           ]        }    }

Request
{       "resize": { "nodeCount": 10 }   }

Response
{       "cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T16:20:10Z", "name": "slice", "clusterType": "hadoop", "flavorId": "2", "nodeCount": 10, "status": "RESIZING", "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }           ]        }    }

Request
N/A

Response
{       "nodes": [ {               "id": "000", "created": "2012-12-27T10:10:10Z", "role": "NAMENODE", "name": "NAMENODE-1", "status": "ACTIVE", "addresses": { "public": [ {                           "addr": "168.x.x.3", "version": 4 }                   ],                    "private": [ {                           "addr": "10.x.x.3", "version": 4 }                   ]                },                "services": { "namenode": {}, "jobtracker": {}, "ssh": { "uri": "ssh://user@168.x.x.3" }               },                "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" }               ]            },            {                "id": "aaa", "role": "GATEWAY", "name": "GATEWAY-1", "status": "ACTIVE", "addresses": { "public": [ {                           "addr": "168.x.x.4", "version": 4 }                   ],                    "private": [ {                           "addr": "10.x.x.4", "version": 4 }                   ]                },                "services": { "pig": {}, "hive": {}, "ssh": { "uri": "ssh://user@168.x.x.4" },                   "status": { "uri": "http://10.x.x.4" },                   "hdfs-scp": { "uri": "scp://user@168.x.x.4:9022" }               },                "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/aaa" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/aaa" }               ]            },            {                "id": "bbb", "role": "DATANODE", "name": "DATANODE-1", "status": "ACTIVE", "addresses": { "public": [ {                           "addr": "168.x.x.5", "version": 4 }                   ],                    "private": [ {                           "addr": "10.x.x.5", "version": 4 }                   ]                },                "services": { "datanode": {}, "tasktracker": {}, "ssh": { "uri": "ssh://user@168.x.x.5" }               },                "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/bbb" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/bbb" }               ]            },            {                "id": "ccc", "role": "DATANODE", "name": "DATANODE-2", "status": "ACTIVE", "addresses": { "public": [ {                           "addr": "168.x.x.6", "version": 4 }                   ],                    "private": [ {                           "addr": "10.x.x.6", "version": 4 }                   ]                },                "services": { "datanode": {}, "tasktracker": {}, "ssh": { "uri": "ssh://user@168.x.x.6" }               },                "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/ccc" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/ccc" }               ]            }        ]    }

Request
N/A

Response
{       "node": { "id": "000", "created": "2012-12-27T10:10:10Z", "role": "NAMENODE", "name": "NAMENODE-1", "status": "ACTIVE", "addresses": { "public": [ {                       "addr": "168.x.x.3", "version": 4 }               ],                "private": [ {                       "addr": "10.x.x.3", "version": 4 }               ]            },            "services": { "namenode": {}, "jobtracker": {}, "ssh": { "uri": "ssh://user@168.x.x.3" }           },            "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" }           ]        }    }

Request
N/A

Response
{       "profile": { "username": "john.doe", "user_id": "12346", "tenant_id": "123456", "sshkeys": [ {                   "name": "t@test" }           ],            "cloudCredentials": {}, "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/123456/profile" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/123456/profile" }           ]        }    }

Request
{       "profile": { "username": "john.doe", "password": "j0Hnd03", "sshkeys": [ {                   "name": "t@test", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtUFnkFrqDDCgEqW1akQkpMOX Owwvg73PLn5Z5QgvxjvJhRCg9ZTR/OWXpWcYqFVNagH4Zs8NOb9921TyQ+ydMnatOM            haxMh1ZwTgaUcvndOF8fY+kcERiw1l0iT95w42F8IdUH42Z+8KihZM8gVsbMS6qYTi OM29WHX7y37wuJIzqf3N2TiVXrqfjwugvY/bZ+47EUn78uk6aPZYJGXdDgaFqnIXUV  N+hRFYXgKnU0Ui0aQkuYwnAW8KmanLoNU2xodrb6/XqWnSAAmwl7aoGKFunQsT6xDW yQk+ncUHUcdofDUqgd3lXmHGrTmQW97vqexDEnhsJ+AwbLGD5dukr t@test" }           ],            "cloudCredentials": { "username": "jdoe", "apikey": "df23gkh34h52gkdgfakgf" }       }    }

Response
{   "profile": { "username": "john.doe", "userId": "12346", "tenantId": "123456", "sshkeys": [ {               "name": "t@test", "publicKey": "ssh-rsa ....." }       ],        "cloudCredentials": { "username": "jdoe" },       "links": [ {               "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/123456/profile" },           {                "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/123456/profile" }       ]    } }

Request
N/A

Response
{       "flavors": [ {               "id": "1", "name": "hadoop.small", "ram": "5120MB", "vcpus": 1, "disk": "375GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/1" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/1" }               ]            },            {                "id": "2", "name": "hadoop.medium", "ram": "10240MB", "vcpus": 2, "disk": "750GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/2" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/2" }               ]            },            {                "id": "3", "name": "hadoop.large", "ram": "20480MB", "vcpus": 4, "disk": "1500GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/3" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/3" }               ]            }        ]    }

Request
N/A

Response
{       "flavor": { "id": "1", "name": "hadoop.small", "ram": "5120MB", "vcpus": 1, "disk": "375GB", "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/1" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/1" }           ]        }    }

Request
N/A

Response
{       "types": [ {               "id": "HADOOP_HDP1_1", "name": "Hadoop(HDP1.1)", "version": 1.1, "links": [ {                       "rel": "self", "href": "https: //bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1" },                   {                        "rel": "bookmark", "href": "https: //bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1" }               ]            }        ]    }

Request
N/A

Response
{       "type": { "name": "HADOOP_HDP1_1", "version": 1.1, "services": [ {                   "name": "mapreduce", "version": "1.0.3" },               {                    "name": "hdfs", "version": "1.0.3" },               {                    "name": "pig", "version": "0.9.2" },               {                    "name": "hive", "version": "0.9.0" }           ],            "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1" }           ]        }    }

Request
N/A

Response
{       "flavors": [ {               "id": "1", "name": "hadoop.small", "ram": "5120MB", "vcpus": 1, "disk": "375GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/1" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/1" }               ]            },            {                "id": "2", "name": "hadoop.medium", "ram": "10240MB", "vcpus": 2, "disk": "750GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/2" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/2" }               ]            },            {                "id": "3", "name": "hadoop.large", "ram": "20480MB", "vcpus": 4, "disk": "1500GB", "links": [ {                       "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/flavors/3" },                   {                        "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/flavors/3" }               ]            }        ]    }

Request
N/A

Response
{       "type": { "name": "HADOOP_HDP1_1", "version": 1.1, "services": [ {                   "name": "mapreduce", "version": "1.0.3" },               {                    "name": "hdfs", "version": "1.0.3" },               {                    "name": "pig", "version": "0.9.2" },               {                    "name": "hive", "version": "0.9.0" }           ],            "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1" }           ]        }    }

Request
N/A

Response
{       "limits": { "absolute": { "nodeCount": { "value": 100, "remaining": 50 },               "ram": { "value": 50000, "remaining": 34567 },               "disk": { "value": 100000, "remaining": 28882 },               "vcpus": { "value": 50, "remaining": 25 }           },            "links": [ {                   "rel": "self", "href": "https://bigdata.api.rackspacecloud.com/v1.0/1234/limits" },               {                    "rel": "bookmark", "href": "https://bigdata.api.rackspacecloud.com/1234/limits" }           ]        }    }