← Back to team overview

fuel-dev team mailing list archive

Provision/deploy selected nodes via Nailgun REST API (4.0 merged)

 

Hi,

In master branch (*4.0 release cycle*) we have
merged<https://review.openstack.org/#/c/58461/> "separate
provisioning and deployment" feature, which will be useful for developers
and fuel-hackers, right now you can use it only via Nailgun REST API (curl
will help you) and soon it will be implemented in our CLI, track this task
you can in this
blueprint<https://blueprints.launchpad.net/fuel/+spec/cli-separate-rpovisioning-and-deployment>
.

Examples:

Let's assume that you have a cluster with id 1 and several nodes in cluster
with 1, 2, 3, 4 ids.

*Provision selected nodes*:

> # run provisioning of nodes 3 and 2
> curl -X PUT --data ''
> http://10.20.0.2:8000/api/clusters/1/provision?nodes=3,2


*Deploy selected nodes*:

> # deploy nodes 3 and 2
> curl -X PUT --data ''
> http://10.20.0.2:8000/api/clusters/1/deploy?nodes=3,2


*Free bonus* (get facts for selected nodes, we had a problem that our
developers couldn't retrieve default data if nodes were already deployed,
now you can do that):

> # get default deployment or provisioning data for nodes 1 and 4
> curl
> http://10.20.0.2:8000/api/clusters/1/orchestrator/provisioning/defaults?nodes=1,4
> curl
> http://10.20.0.2:8000/api/clusters/1/orchestrator/deployment/defaults?nodes=1,4


For all of this handlers (deployment, provisioning, get data) if you didn't
specify `nodes` parameter it will make an action on list of nodes which
depends on current nodes statuses.
E.g. if all nodes in the cluster have 'ready' status then this calls
(without `nodes` parameter) will do nothing.

Thanks.