Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

Chef Runlist Management

For Chef-enabled VMs a runlist is a set of roles and recipes on the Chef server that will be applied to a VM at boot time. This resource provides management features to configure the runlist for a given VM.

This page describes the methods exposed to manage the elements of the runlists associated with the Chef-enabled VMs.

Main URI of the Resource

This class operates mainly over the Resource URI: /cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/config/runlist

Exposed Methods

Get the current runlist of a Chef enabled virtual machine

Get the configured runlist for the given virtual machine. The runlist can contain roles and recipes that will be applied to the virtual machine during bootstrap in the defined order.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/config/runlist
Roles Required: VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/xml; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: RunlistElements Media Type
Request Example:

 Click here to show or hide the request example

UPDATE EXAMPLE

Get the current runlist of a Chef enabled virtual machine example
curl http://example.com/api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist \
    -v -u admin:xabiquo \
    -X GET \
    -H "Accept: application/xml"

> GET /api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/xml
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 14:34:37 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ3NTA3Nzg2NDowNGI2ZDMxMWQxN2VjYjY3NzEwMjE2Yzg5Yzc1ODAyZDpBQklRVU8; Expires=Mon, 20-Aug-2012 15:04:37 GMT; Path=/api
< Set-Cookie: JSESSIONID=8B8934E0E75118DCDBB08BBFF6598AE3; Path=/api
< Content-Type: application/xml
< Content-Length: 239
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<runlist>
    <element>
        <name>recipe[apache2::mod_auth_digest]</name>
        <description>Apache module 'auth_digest'</description>
        <priority>0</priority>
        <selected>true</selected>
    </element>
</runlist>


Configure the runlist of a Chef enabled virtual machine

Configures the runlist for the virtual machine.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/config/runlist
Roles Required: VAPP_PERFORM_ACTIONS
Request Headers: Accept: application/vnd.abiquo.extended-runlists+json; version=4.4; application/vnd.abiquo.extended-runlists+xml; version=4.4;  Content-type:  application/vnd.abiquo.extended-runlists+json; version=4.4; application/vnd.abiquo.extended-runlists+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: RunlistElements Media Type
Response Message Body Entity: RunlistElements Media Type
Request Example:

 Click here to show or hide the request example

UPDATE EXAMPLE

Configure the runlist of a Chef enabled virtual machine example
curl http://example.com/api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist \
    -v -u admin:xabiquo \
    -X POST \
    -H "Accept: application/vnd.abiquo.extended-runlists+xml;version=2.4" \
    -H "Content-type: application/vnd.abiquo.extended-runlists+xml;version=2.4" \
    -d @/tmp/runlist-post.xml

> POST /api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.extended-runlists+xml;version=2.4
> Content-type: application/vnd.abiquo.extended-runlists+xml;version=2.4
> Content-Length: 279
> 
< HTTP/1.1 201 Created
< Date: Mon, 20 Aug 2012 14:40:01 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ3NTQwMTM1MjphYzFmZThiYjUzZTZhYmMwZDAyZmUyZWYxM2ZkOTBkZDpBQklRVU8; Expires=Mon, 20-Aug-2012 15:10:01 GMT; Path=/api
< Set-Cookie: JSESSIONID=A62D64F0CA828D7DC6EBFE7E00BD9301; Path=/api
< Content-Type: application/vnd.abiquo.extended-runlists+xml;version=2.4
< Content-Length: 239
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<runlist>
    <element>
        <name>recipe[apache2::mod_auth_digest]</name>
        <description>Apache module 'auth_digest'</description>
        <priority>0</priority>
        <selected>true</selected>
    </element>
</runlist>

 

Get the extended runlist of a Chef enabled virtual machine

Get the extended runlist for the virtual machine. The extended runlist contains all the roles and recipes available on the Chef server of the user's enterprise. It is the complete list, with a 'selected' flag indicating if the role/recipe is part of the runlist of the virtual machine.

Synopsis: GET http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/config/runlist
Roles Required: VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.extended-runlists+json; version=4.4; application/vnd.abiquo.extended-runlists+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: RunlistElements Media Type
Request Example:

 Click here to show or hide the request example

UPDATE EXAMPLE

Get the extended runlist of a Chef enabled virtual machine example
curl http://example.com/api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist \
    -v -u admin:xabiquo \
    -X GET \
    -H "Accept: application/vnd.abiquo.extended-runlists+xml;version=2.4"

> GET /api/cloud/virtualdatacenters/7/virtualappliances/4/virtualmachines/65/config/runlist HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: example.com
> Accept: application/vnd.abiquo.extended-runlists+xml;version=2.4
> 
< HTTP/1.1 200 OK
< Date: Mon, 20 Aug 2012 14:35:43 GMT
< Set-Cookie: auth=YWRtaW46MTM0NTQ3NTE0MzUwNDpkNjg2NTkyZGE3YmEyOGFlZmI0NzgzNzdiYzc2ZmI2MjpBQklRVU8; Expires=Mon, 20-Aug-2012 15:05:43 GMT; Path=/api
< Set-Cookie: JSESSIONID=5DCF7C0B4FC36115064542433B8B3581; Path=/api
< Content-Type: application/vnd.abiquo.extended-runlists+xml;version=2.4
< Content-Length: 7072
< 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<runlist>
    <element>
        <name>recipe[apache2::god_monitor]</name>
        <description></description>
        <priority>0</priority>
        <selected>false</selected>
    </element>
    <element>
        <name>recipe[apache2::mod_alias]</name>
        <description>Apache module 'alias' with config file</description>
        <priority>0</priority>
        <selected>true</selected>
    </element>
</runlist>