...
Parameter | Description | ||
---|---|---|---|
profile | (Required) If a profile value is not specified, the API returns an error. The profile indicates the amount of resources (CPU or memory) a Node Manager should advertise to the Resource Manager. Default profiles: zero, small, medium, large. Default values: zero. These default profiles (zero, small, medium, and large) are defined in the | ||
instancesValue | : one ( 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.Required) The number of Node Managers instances to launch. Each Node Manager instance advertises the amount of resources specified in the profile. The value is a number in the range of zero (0) to the number of Mesos slave nodes. | ||
constraints | (Optional) | constraints | Array definition for a single constraint using the LIKE operator constraint format: <mesos_slave_attribute|hostname> LIKE <value_regex> . Hostnames are The hostname constraint is used to define cluster boundary and to start and stop Node Managers on a predefined set of nodeslaunch Node Managerss on nodes whose hostname matches the regex passed in as value. See common Mesos slave attributes (http://mesos.apache.org/documentation/attributes-resources) for more information. |
...
Code Block |
---|
<resource_manager_host>:8192/api/cluster/flexup -d profile=<zero|small|medium|large> -d instances=<integer> -d constraints=<"string"["JSON array of strings"]> <resource_manager_host>:8192/api/cluster/flexdown -d profile=<zero|small|medium|large> -d instances=<integer> -d constraints=<"string"["JSON array of strings"]> |
Request Examples
Curl request example to flexup two instances with the profile set to small:
Code Block |
---|
curl -X PUT http://10.10.100.19:8192/api/cluster/flexup flexup -d instances=2 2 -d profile=small |
Curl request example to flex down flexdown one instance with the profile set to small:
Code Block |
---|
curl -X PUT http://10.10.100.19:8192/api/cluster/flexdown flexdown -d instances=1 1 -d profile=small |
Curl request example to launch two (2) Node Managers with profile set to large only on specific hosts, host-120 through host-129:
Code Block |
---|
curl -X PUT http://10.10.100.19:8192/api/cluster/flexdown -d instances=2 -d profile=large -d constraints=["hostname LIKE host-12[0-9].example.com"] |
Request header to flexup:
...