Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ParameterDescription
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 myriad-config-default.yml file. The resources associated with these default profiles can be modified; additionally, new profiles can be defined.

instances

(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) 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 -d profile=small

 

Curl request example to 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 -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:

...