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

RSS

cloudstack (7) Versions 6.0.0

Installs/Configures cloudstack

Policyfile
Berkshelf
Knife
cookbook 'cloudstack', '= 6.0.0', :supermarket
cookbook 'cloudstack', '= 6.0.0'
knife supermarket install cloudstack
knife supermarket download cloudstack
README
Dependencies
Changelog
Quality 33%

CloudStack Cookbook

Build Status
Cookbook Version

Install and configure Apache Cloudstack using Chef. A wrapper cookbook is prefered in order to Install Apache CloudStack properly, refer to cloudstack_wrapper cookbook for example.

Tested on CentOS 7
Some parts work with Ubuntu 16.04 but this cookbook does not perform all configuraiton required for CloudStack Management-server on Ubuntu.

Table of Contents

About Apache Cloudstack

Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform.

More info on: http://cloudstack.apache.org/

Requirements

Cookbooks

  • yum - packages management
  • apt - packages management
  • mysql - for MySQL database server and client
  • sudo - to configure sudoers for user cloud

There is a dependency on Ruby gem cloudstack_ruby_client for chef which is handle in recipe[cloudstack::default].

Resources / Providers

cloudstack_setup_database

Create MySQL database and connection configuration used by CloudStack management-server using /usr/bin/cloudstack-setup-databases utility.

# Using attributes
cloudstack_setup_database node['cloudstack']['db']['host'] do
  root_user     node['cloudstack']['db']['rootusername']
  root_password node['cloudstack']['db']['rootpassword']
  user          node['cloudstack']['db']['username']
  password      node['cloudstack']['db']['password']
  action        :create
end
# using mysql cookbook and CloudStack default passwords
cloudstack_setup_database node['cloudstack']['db']['host'] do
  action        :create
end

cloudstack_system_template

Download initial SystemVM template prior to initialize a CloudStack Region. cloudstack_system_template require access to CloudStack database which must be initated before executing this ressource. If no URL is provided cloudstack_system_template will use the default URL from the database if available to download the template.

# Using attributes
cloudstack_system_template 'xenserver' do
  url         node['cloudstack']['systemvm']['xenserver']
  nfs_path    node['cloudstack']['secondary']['path']
  nfs_server  node['cloudstack']['secondary']['host']
  db_user     node['cloudstack']['db']['username']
  db_password node['cloudstack']['db']['password']
  db_host     node['cloudstack']['db']['host']
end

Which is equivalent to:

/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt \
  -m /mnt/secondary \
  -u http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-xen.vhd.bz2 \
  -h xenserver \
  -F

Simpler example:

# Using URL from CloudStack database
cloudstack_system_template 'kvm' do
end

cloudstack_setup_management

Post package installation and Database Creation for CloudStack, cloudstack-management service must be configure using a script /usr/bin/cloudstack-setup-management.

cloudstack_setup_management node.name

cloudstack_api_keys

Generate api keys for account. Currently working only for admin account.

Will update attributes:

  • node['cloudstack']['admin']['api_key']
  • node['cloudstack']['admin']['secret_key']
# Create API key if now exist in Cloudstack and update node attributes
cloudstack_api_keys 'admin' do
  action :create
end
# Generate new API Keys
cloudstack_api_keys 'admin' do
  action :reset
end

cloudstack_global_setting

Update Global Settings values.

cloudstack_global_setting 'expunge.delay' do
  value '80'
  notifies :restart, 'service[cloudstack-management]', :delayed
end

Recipes

cloudstack::management_server

Prepare the node to be a CloudStack management server. It will not fully
install CloudStack because of dependency such as MySQL server and system VM
templates. Refer to cloudstack_wrapper cookbook
to install a fully working CloudStack management-server.

cloudstack::usage

Install, enable and start cloudstack-usage. cloudstack-usage is usefull to collect resource usage from account. This recipe make sure cloudstack-usage run on a cloudstack-management server as it is required.

cloudstack::kvm_agent

Install, enable and start KVM cloudstack-agent. KVM host managed by CloudStack require an agent. This recipe install cloudstack-agent required on a KVM server.

Support Ubuntu and CentOS/RHEL KVM server.

cloudstack::vhd-util

Download the tool vhd-util which is not include in CloudStack packages and required to manage XenServer hosts.

cloudstack::mysql_conf

MySQL tunning based on official CloudStack documentation.

cloudstack::eventbus

Configure CloudStack to send Events into RabbitMQ message bus. Work for CloudStack 4.3 and latest. RabbitMQ must be installed and configured somewhere, default values are for localhost.

cloudstack::default

Chef Required dependencies in order to interact with CloudStack.

Attributes

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

Contributing

TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.

e.g.

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Some snippets have been taken from: schubergphilis/cloudstack-cookbook

Copyright:: Copyright (c) 2018 CloudOps Inc.

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

cloudstack CHANGELOG

This file is used to list changes made in each version of the co-cloudstack cookbook.

6.0.0

  • pdion891 - Fix Chef14 issues on CentOS 7 for cloudstack_setup_database ressource. - Added circle-ci recipe for automated CI. - Remove management of sudoers file, pkgs are taking care of it.

5.0.0

  • pdion891 - update default version to 4.11.
  • khos2ow - fixed cookstyle and foodcritic issues.

4.1.2

  • khos2ow - add default metadata expire to cloudstack repo

4.1.1

  • khos2ow - add server-id for mysql

4.1.0

  • khos2ow - add support for enabling/disabling cloudstack repo

4.0.8

  • put mysql password in single-quotes, otherwise some hardened passwords are not interpreted correctly and logins fail.

4.0.7

  • pdion891 - add support for CentOS 7 for ACS 4.10 with JDK8

4.0.5

  • pdion891 - add repo for mysql-connector-python

4.0.4

  • pdion891 - update apt repo issue for missing pkg signature. - fix warning for chef 13.

4.0.1

  • pdion891 - update release to 4.8 by default

4.0.0

  • pdion891 - integration to berkshelf and vagrant. - update for new acs 4.6 release.

3.1.1

  • pdion891 - POST for login authentication use to generate admin api_keys - update systemvm url for acs 4.5

3.1.0

  • pdion891 - support cookbook mysql6

3.0.10

  • pdion891 - fix port_open: localhost-> 127.0.0.1

3.0.9

  • pdion891 - fix sudoers.

3.0.8

  • pdion891 - update date in header. - readme typos

3.0.7

  • pdion891 - rename hypervisor_tpl by systemvm

3.0.6

  • pdion891 - update 4.4.1 systemplate urls

3.0.5

  • pdion891 - fix systemvmtemplate url selection

3.0.4

  • pdion891 - api_key: major rewrite part1.

3.0.3

  • pdion891 - api_key: add existing keys validation to fix admin password change.

3.0.2

  • pdion891 - Add eventlog to rabbitmq config template

3.0.0

  • pdion891 - Complete rewrite of co-cloudstack as cloudstack using Chef LWRP
  • pdion891 - Rename cookbook from co-cloudstack to cloudstack.

2.0.3

  • pdion891 - Add mysql-conf to configure mysql-server tunings required by CloudStack.

2.0.2

  • pdion891 - change way of generating APIkeys by querying CloudStack API instead of enabling integration api port.

2.0.0

  • pdion891 - add support for CS 4.3

1.0.0

  • pdion891 - add vhd-util recipe
  • Update license headers
  • Update dependencies for opscode cookbooks

0.1.2

  • pdion891 - remove use of databag and use attributes instead.

0.1.0

  • pdion891 - Initial release of co-cloudstack

Collaborator Number Metric
            

6.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

6.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

6.0.0 failed this metric

FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: cloudstack/libraries/api_keys.rb:85
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: cloudstack/providers/api_keys.rb:63
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

6.0.0 passed this metric

Testing File Metric
            

6.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

6.0.0 passed this metric