Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The co-cloudstack cookbook has been deprecated

Author provided reason for deprecation:

The co-cloudstack cookbook has been deprecated and is no longer being maintained by its authors. Use of the co-cloudstack cookbook is no longer recommended.

You may find that the cloudstack cookbook is a suitable alternative.


co-cloudstack (3) Versions 1.0.0

Installs/Configures co-cloudstack

cookbook 'co-cloudstack', '= 1.0.0', :supermarket
cookbook 'co-cloudstack', '= 1.0.0'
knife supermarket install co-cloudstack
knife supermarket download co-cloudstack
Quality -%

co-cloudstack Cookbook

Install and configure Apache Cloudstack cloud orchestrator. This cookbook currently support only Redhat based distro of Linux.
This Chef cookbook install Cloudstack based on RPMs and executes folowing steps:

  1. Update yum repo
  2. Install RPMs
  3. Create and initialize database
  4. Generate admin account api keys recipe[co-cloudstack::admin-apikey]
  5. Download system VM template
  6. Configure and export NFS Secondary storage if local

Currently tested on CentOs 6.x x86_64.

Originaly this cookbook as not been developped to work with the community mysql cookbook because of is passwords in clear text in attributes.

About Apache Cloudstack

More info on:


The following cookbooks are direct dependencies:

  • <tt>'database::mysql'</tt> - Database libraries to push data in MySQL.
  • <tt>'mysql'</tt> - To install mysql server and libraries.
  • <tt>'co-nfs'</tt> - To configure and export Secondary Storage.


Attributes can be customized for securty reason. The cookbook does not support encrypted data bag usage for now.

  • <tt>node['cloudstack']['repo']</tt> - yum repo url to use, default:
  • <tt>node['cloudstack']['db']['host']</tt> - cloud mysql host/ip, default = <tt>node['ipaddress']</tt>
  • <tt>node['cloudstack']['db']['user']</tt> - cloud databases mysql user
  • <tt>node['cloudstack']['db']['password']</tt> - cloud databases mysql password
  • <tt>node['cloudstack']['db']['rootusername']</tt> - root mysql user
  • <tt>node['cloudstack']['db']['rootpassword']</tt> - root mysql password
  • <tt>node['cloudstack']['network']['system']['subnet']</tt> - Management network subnet (use for the nfs export)
  • <tt>node['cloudstack']['secondary']['path']</tt> - Local path for the Secondary Storage. default = <tt>/data/secondary</tt>


Create an environment

The "cloudstack-setup-databases" tool require Mysql to have allow_remote_root and skip-name-resolve set true to work.

  "name": "cloudstack-lab",
  "description": "Cloudstack env.",
  "default_attributes": {
    "mysql": {
      "allow_remote_root": "true",
      "tunable": {
        "skip-name-resolve": "true"
Create role

For a node that run cloudstack and is dependency (mysql, nfsserver):

  "name": "co_cloudstack-lab",
  "description": "Cloudstack server.",
  "run_list": [
bootstrap the node
knife bootstrap <your node FQDN or IP> \
    -r 'role[co_cloudstack-lab]' \
    -E cloudstack-lab \
    -x root \
    -P <your root password>
test it:

Access the url: <tt>http://node_ipaddress:8080/client</tt>



The default recipe will install apache cloudstack version based on the yum repo define in <tt>node['cloudstack']['repo']</tt>. the default recipe will include all sub recipes of co-cloudstack except the co-cloudstack::admin-apikey.

include co-cloudstack in your node's run_list:

  "run_list": [


co-cloudstack::admin-apikey must add to the run_list of the node in order to generate admin account api_key and secret_key. The recipe will enable and use the integration api port to generage keys to admin account.

co-cloudstack::admin-apikey will not disable the integration.api.port once the chef-run is completed.


co-cloudstack::sys-tmpl will download system template VM's in the Secondary Storage path define in <tt>node['cloudstack']['secondary']['path']</tt>. By default the process will download system template VMs for XenServer, KVM and VMware. Once the download is completed, the recipe will add <tt>tags:template_uploaded</tt> to the node so templates will not be redownloaded every chef run. Also, if another node have the <tt>tags:template_uploaded</tt> within the environment of the node, it will not download system template VMs because the cookbook consider to be a peer of the other cloudstack server in is environment.

Default system templates:
default['cloudstack']['hypervisor_tpl'] = {
"xenserver" => "",
"vmware" => "",
"kvm" => ""


This recipe is automatically run by the co-cloudstack::default recipe. It will create and initialize the cloudstack databases using the <tt>/usr/bin/cloudstack-setup-databases</tt> tool. Once the database is initialize the recipe will add <tt>tags:db_init</tt> to the node to not re-execute cloudstack-setup-databases every chef run. If another host in the node environment have the <tt>tags:db_init</tt>, cloudstack-setup-databases will not be executed because the cookbook consider to be a peer of the other cloudstack server in is environment.


This recipe will run recipe co-nfs::export only if <tt>node['cloudstack']['secondary']['host'] == node["ipaddress"]</tt> to export the secondary storage as NFS.


This recipe download the tool vhd-util required to manage XenServer hosts that is not included in cloudstack RPMs.

Know issues and limitations


Cloudstack require sudoers access so if you managed sudoers with Chef you need to add this in your configuration:



The integration.api.port is not disabled once the admin keys are generated.

Primary Storage

You still have to configure a Primary storage for your zone. If you use LocalStorage on hypervisor, you will have to update Service offering for System VM and enable use of localstorage for systemVMs. <tt> = true</tt>

Upgrade of Cloudstack

This cookbook does not support Upgrade action for cloudstack RPMs.

License and Authors

Copyright:: Copyright (c) 2013

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

co-nfs >= 0.0.0
database >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found