Provisioning cloud hosts using the host factory RESTful APIs

Provision cloud hosts by using the host factory RESTful APIs.

About this task

To provision cloud hosts using RESTful APIs, your requestor instance must be enabled in REST mode. You can enable the built-in symAinst requestor in REST mode or add a new requestor in REST mode.
Note: A requestor instance can use either the POLL mode or the REST mode; both modes cannot be enabled simultaneously.

You can use any RESTful API client, for example, cURL commands or a browser-based plug-in, to submit requests for cloud resources. Alternatively, you can use the cluster management console to submit requests. Requests from the cluster management console are always submitted on behalf of the admin requestor. See Provisioning cloud hosts manually.

Procedure

Follow these steps to provision cloud hosts using RESTful APIs:

  1. Enable your requestor instance (for example, the symAinst requestor instance) in REST mode:
    1. Edit the hostRequestors.json file at:
      • %EGO_CONFDIR%\..\..\hostfactory\conf\requestors\ on Windows.
      • $EGO_CONFDIR/../../hostfactory/conf/requestors/ on Linux®.
    2. In the symAinst section, set the enabled parameter to 1 and change the requestMode parameter value to REST. See the hostRequestors.json reference.
    3. Save your changes.
  2. Stop and restart the HostFactory service:
    egosh service stop HostFactory
    egosh service start HostFactory
  3. Access the URL for the host factory APIs. See Locating the host factory RESTful APIs.
  4. Use the APIs to manage your cloud provision requests.
    Note: To provision and return cloud hosts, you must be a cluster administrator or have the HF_ALL_REQUESTOR_MANAGE permission.
    1. Use the API interface to provision cloud hosts according to your requirements. See Submit requests for cloud hosts.
    2. Cloud hosts that join the cluster are, by default, added to the ComputeHosts resource group. To add cloud hosts to different resource groups, add resource attribute tags to cloud hosts and create resource groups to which they can be dynamically added. See Adding cloud hosts to different resource groups.
    3. Monitor provision requests. To view the list of cloud requests, see Get requests submitted to cloud providers. To view provisioned cloud hosts, see Get cloud hosts.

      Alternatively, view status from the cluster management console (see Monitoring cloud bursting in your cluster).

    4. When you no longer require the provisioned cloud hosts, gracefully remove the cloud hosts from the cluster use the API interface to return those hosts. See Release cloud hosts.