0

Sorry if this is a silly question, but I am new to working with CloudStack. Is there a function that I could call to automatically build out a server using a template already in CloudStack?

Example being I have a CentOS template on the server and when I click a button on a web page and give it the appropriate information to pass, that my CloudStack server automatically deploys that new server.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ferbla
  • 51
  • 1
  • 11

1 Answers1

0

CloudStack's UI is basically a front-end for CloudStack's API, so when you click a button on the UI to deploy a VM what the UI is doing is calling deployVirtualMachine [1] on the API. For this to work you will have to make other calls first to get unique IDs for several parameters of the deployVirtualMachine call (e.g. templateId).

See [1] for documentation on that specific call (assuming you're working on version 4.3 of CloudStack) and [2] for a complete list of the user API. In [3] you will find a developer's guide to CloudStack's API (version 4.0.2).

[1] http://cloudstack.apache.org/docs/api/apidocs-4.3/user/deployVirtualMachine.html

[2] http://cloudstack.apache.org/docs/api/apidocs-4.3/TOC_User.html

[3] http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/API_Developers_Guide/index.html

Miguel Ferreira
  • 1,282
  • 11
  • 27
  • 1
    Thanks for the reply Miguel, with your links I also found this which seems like it will be very helpful. http://people.apache.org/~ke4qqq/docs2/en-US/Apache_CloudStack/4.0.0-incubating/html-single/API_Developers_Guide/ – Ferbla Jun 26 '14 at 20:45
  • @Ferbla I've updated the answer with the link to dev guide for API 4.0.2 – Miguel Ferreira Jun 27 '14 at 07:28