...
Code Block |
---|
PUT /api/cluster/flexup // Expands the size of the cluster. PUT /api/cluster/flexdown // Shrinks the size of the cluster. |
Parameters include:
- profile - zero, small, medium, large. Default: zero. The instance size in the cluster is defined in the myriad-config-default.yml file.
- instances - 1 to the number of nodes in the cluster. For example, if there are 100 nodes in your cluster, you are bound by 100. If you specify more than 100, the excess is place in a pending state.
Syntax
Code Block |
---|
<localhost>:8192/api/cluster/flexup |
Request Examples
Curl request example that does a flexup to two instances with the profile set to small:
Code Block |
---|
curl -X PUT http://10.10.100.19:8192/api/cluster/flexup -d instances=2 -d profile=small |
Request header for a flex down request and a request payload of 1 instanceto flexdown request:
Code Block |
---|
PUT /api/cluster/flexdown HTTP/1.1 Host: 10.10.100.19:8192 Connection: keep-alive Content-Length: 17 Origin: http://10.10.100.19:8192 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36 Content-Type: application/json Accept: */* Referer: http://10.10.100.19:8192/ Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8 |
Request header for one instance and the profile set to mediumto flexup:
Code Block |
---|
PUT /api/cluster/flexup HTTP/1.1 Host: 10.10.100.19:8192 Connection: keep-alive Content-Length: 36 Origin: http://10.10.100.19:8192 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36 Content-Type: application/json Accept: */* Referer: http://10.10.100.19:8192/ Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8 |
Request payload of for one instance and with the profile set to medium:
Code Block |
---|
{profile: "medium", instances: "1"} |
Request payload that sets for one instance in with the cluster and the profile set to small:
Code Block |
---|
{ "instances":1, "profile": "small" } |
Request payload that sets for one instance in the cluster and with the profile set to zero:
Code Block |
---|
{ "instances":1 } |
Curl request example that sets the flexup profile to small:
Code Block |
---|
curl -X PUT http://10.10.100.19:8192/api/cluster/flexup -d profiles=small |
...
Response Example
Code Block |
---|
200 ok |