Skip to content

Commit b6916e5

Browse files
authored
Merge pull request #13 from cloudops/4.11_and_cookstyle
4.11 and cookstyle, cookbook version 5.0.0
2 parents 44a3253 + efda66b commit b6916e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+401
-420
lines changed

.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AllCops:
2+
Exclude:
3+
- 'Vagrantfile'

Berksfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
source "https://supermarket.chef.io"
1+
source 'https://supermarket.chef.io'
22

33
metadata

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ cloudstack CHANGELOG
33

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

6+
4.1.3
7+
-----
8+
- pdion891 - update default version to 4.11.
9+
610
4.1.2
711
-----
812
- khos2ow - add default metadata expire to cloudstack repo

Gemfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ gem 'berkshelf'
55
# Uncomment these lines if you want to live on the Edge:
66
#
77
# group :development do
8-
# gem "berkshelf", github: "berkshelf/berkshelf"
9-
# gem "vagrant", github: "mitchellh/vagrant", tag: "v1.6.3"
8+
# gem 'berkshelf', github: 'berkshelf/berkshelf'
9+
# gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.6.3'
1010
# end
1111
#
1212
# group :plugins do
13-
# gem "vagrant-berkshelf", github: "berkshelf/vagrant-berkshelf"
14-
# gem "vagrant-omnibus", github: "schisamo/vagrant-omnibus"
13+
# gem 'vagrant-berkshelf', github: 'berkshelf/vagrant-berkshelf'
14+
# gem 'vagrant-omnibus', github: 'schisamo/vagrant-omnibus'
1515
# end
1616

17-
gem "test-kitchen"
18-
gem "kitchen-vagrant"
17+
gem 'test-kitchen'
18+
gem 'kitchen-vagrant'

LICENSE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2018 CloudOps Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ cloudstack Cookbook
44
Install and configure [Apache Cloudstack](http://cloudstack.apache.org) using [Chef](http://www.chef.io/). A wrapper cookbook is prefered in order to Install Apache CloudStack properly, refer to [cloudstack_wrapper cookbook](https://github.com/cloudops/cookbook_cloudstack_wrapper) for example.
55

66

7-
Tested on CentOS 6.5 and Ubuntu 14.04
7+
Work with Chef 12 only.
8+
9+
Tested on CentOS 7 and Ubuntu 16.04
810

911

1012
About Apache Cloudstack
@@ -204,7 +206,8 @@ e.g.
204206

205207
License and Authors
206208
-------------------
207-
- Author:: Pierre-Luc Dion (<[email protected]>)
209+
- Author:: Pierre-Luc Dion (<[email protected]>)
210+
- Author:: Khosrow Moossavi ([email protected])
208211

209212
Some snippets have been taken from: [schubergphilis/cloudstack-cookbook](https://github.com/schubergphilis/cloudstack-cookbook)
210213
- Author:: Roeland Kuipers (<[email protected]>)
@@ -213,7 +216,7 @@ Some snippets have been taken from: [schubergphilis/cloudstack-cookbook](https:/
213216

214217

215218
```text
216-
Copyright:: Copyright (c) 2015 Author's
219+
Copyright:: Copyright (c) 2018 CloudOps Inc.
217220
218221
Licensed under the Apache License, Version 2.0 (the "License");
219222
you may not use this file except in compliance with the License.

Thorfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ require 'bundler/setup'
55
require 'berkshelf/thor'
66

77
begin
8-
require "kitchen/thor_tasks"
8+
require 'kitchen/thor_tasks'
99
Kitchen::ThorTasks.new
1010
rescue LoadError
11-
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV["CI"]
11+
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
1212
end

Vagrantfile

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1818
#
1919
# $ vagrant plugin install vagrant-omnibus
2020
#
21-
if Vagrant.has_plugin?("vagrant-omnibus")
21+
if Vagrant.has_plugin?('vagrant-omnibus')
2222
config.omnibus.chef_version = 'latest'
2323
end
2424

@@ -27,7 +27,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
2727
# config.vm.box_url doesn't need to be specified.
2828
config.vm.box = 'chef/ubuntu-14.04'
2929

30-
3130
# Assign this VM to a host-only network IP, allowing you to access it
3231
# via the IP. Host-only networks can talk to the host machine as well as
3332
# any other machines on the same network, but cannot be accessed (through this
@@ -79,12 +78,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7978
mysql: {
8079
server_root_password: 'rootpass',
8180
server_debian_password: 'debpass',
82-
server_repl_password: 'replpass'
83-
}
81+
server_repl_password: 'replpass',
82+
},
8483
}
8584

8685
chef.run_list = [
87-
'recipe[cloudstack::default]'
86+
'recipe[cloudstack::default]',
8887
]
8988
end
9089
end

attributes/default.rb

+12-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook Name:: cloudstack
33
# Attribute:: default
44
# Author:: Pierre-Luc Dion (<[email protected]>)
5-
# Copyright 2015, CloudOps, Inc.
5+
# Copyright 2018, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -20,31 +20,30 @@
2020
# Apache repos:
2121
###############
2222
# version = version of package to install if not define = latest from the repo
23-
default['cloudstack']['version'] = ""
23+
default['cloudstack']['version'] = ''
2424
# relase_major = release version, used for the repo URL
25-
if node['cloudstack']['version'].empty?
26-
default['cloudstack']['release_major'] = "4.9"
27-
else
28-
default['cloudstack']['release_major'] = "#{node['cloudstack']['version'].split('.')[0]}.#{node['cloudstack']['version'].split('.')[1]}"
29-
end
25+
default['cloudstack']['release_major'] = if node['cloudstack']['version'].empty?
26+
'4.11'
27+
else
28+
"#{node['cloudstack']['version'].split('.')[0]}.#{node['cloudstack']['version'].split('.')[1]}"
29+
end
3030

3131
# yum repo URL
3232
case node['platform']
3333
when 'centos', 'redhat', 'fedora', 'oracle'
3434
default['cloudstack']['repo_url'] = "http://cloudstack.apt-get.eu/centos/$releasever/#{node['cloudstack']['release_major']}/"
3535
default['cloudstack']['repo_sign'] = ''
36-
#default['cloudstack']['repo_sign'] = 'http://cloudstack.apt-get.eu/RPM-GPG-KEY'
36+
# default['cloudstack']['repo_sign'] = 'http://cloudstack.apt-get.eu/RPM-GPG-KEY'
3737
default['cloudstack']['repo_enabled'] = true
3838
default['cloudstack']['repo_metadata_expire'] = '6h'
3939
when 'ubuntu', 'debian'
40-
default['cloudstack']['repo_url'] = "http://cloudstack.apt-get.eu/ubuntu"
40+
default['cloudstack']['repo_url'] = 'http://cloudstack.apt-get.eu/ubuntu'
4141
default['cloudstack']['repo_sign'] = 'http://cloudstack.apt-get.eu/release.asc'
42-
default['cloudstack']['repo_trust'] = true # trust the community repo
42+
default['cloudstack']['repo_trust'] = true # trust the community repo
4343
end
4444
# apt repo URL
4545

46-
4746
# Secondary Storage
48-
default['cloudstack']['secondary']['host'] = node["ipaddress"]
49-
default['cloudstack']['secondary']['path'] = "/data/secondary"
47+
default['cloudstack']['secondary']['host'] = node['ipaddress']
48+
default['cloudstack']['secondary']['path'] = '/data/secondary'
5049
default['cloudstack']['secondary']['mgt_path'] = node['cloudstack']['secondary']['path']

attributes/eventbus.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook Name:: cloudstack
33
# Attribute:: eventbus
44
# Author:: Pierre-Luc Dion (<[email protected]>)
5-
# Copyright 2015, CloudOps, Inc.
5+
# Copyright 2018, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -21,4 +21,4 @@
2121
default['cloudstack']['event']['RabbitMQEventBus']['port'] = '5672'
2222
default['cloudstack']['event']['RabbitMQEventBus']['username'] = 'guest'
2323
default['cloudstack']['event']['RabbitMQEventBus']['password'] = 'guest'
24-
default['cloudstack']['event']['RabbitMQEventBus']['exchange'] = 'cloudstack-events'
24+
default['cloudstack']['event']['RabbitMQEventBus']['exchange'] = 'cloudstack-events'

attributes/management_server.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Cookbook Name:: cloudstack
22
# Attribute:: management_server
33
# Author:: Pierre-Luc Dion (<[email protected]>)
4-
# Copyright 2015, CloudOps, Inc.
4+
# Copyright 2018, CloudOps, Inc.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

attributes/mysql_conf.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Cookbook Name:: cloudstack
22
# Recipe:: mysql_conf
33
# Author:: Pierre-Luc Dion (<[email protected]>)
4-
# Copyright 2015, CloudOps, Inc.
4+
# Copyright 2018, CloudOps, Inc.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -19,4 +19,4 @@
1919

2020
default['cloudstack']['mysql']['innodb_rollback_on_timeout'] = 1
2121
default['cloudstack']['mysql']['innodb_lock_wait_timeout'] = 600
22-
default['cloudstack']['mysql']['max_connections'] = 350
22+
default['cloudstack']['mysql']['max_connections'] = 350

attributes/systemvm_template.rb

+49-40
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Cookbook Name:: cloudstack
22
# Attribute:: systemvm_template
33
# Author:: Pierre-Luc Dion (<[email protected]>)
4-
# Copyright 2015, CloudOps, Inc.
4+
# Copyright 2018, CloudOps, Inc.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -16,51 +16,60 @@
1616
# limitations under the License.
1717
#
1818

19-
2019
# System VM templates
2120
default['cloudstack']['cloud-install-sys-tmplt'] = '/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt'
2221

2322
case node['cloudstack']['release_major']
23+
# when ? : if system VM template not define cloudstack_system_template will look
24+
# for the URL define into cloudstack database.
25+
26+
when '4.11'
27+
default['cloudstack']['systemvm'] = {
28+
'xenserver' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-xen.vhd.bz2',
29+
'vmware' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-vmware.ova',
30+
'kvm' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-kvm.qcow2.bz2',
31+
'lxc' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-kvm.qcow2.bz2',
32+
'hyperv' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-hyperv.vhd.zip',
33+
'ovm3' => 'http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.1-ovm.raw.bz2',
34+
}
2435
when '4.6', '4.7', '4.8', '4.9'
25-
default['cloudstack']['systemvm'] = {
26-
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-xen.vhd.bz2',
27-
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-vmware.ova',
28-
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2',
29-
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2',
30-
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-hyperv.vhd.zip',
31-
'ovm3' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-ovm.raw.bz2'
32-
}
36+
default['cloudstack']['systemvm'] = {
37+
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-xen.vhd.bz2',
38+
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-vmware.ova',
39+
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2',
40+
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2',
41+
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-hyperv.vhd.zip',
42+
'ovm3' => 'http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-ovm.raw.bz2',
43+
}
3344
when '4.5'
34-
default['cloudstack']['systemvm'] = {
35-
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-xen.vhd.bz2',
36-
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-vmware.ova',
37-
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-kvm.qcow2.bz2',
38-
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-kvm.qcow2.bz2',
39-
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-hyperv.vhd.zip'
40-
}
45+
default['cloudstack']['systemvm'] = {
46+
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-xen.vhd.bz2',
47+
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-vmware.ova',
48+
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-kvm.qcow2.bz2',
49+
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-kvm.qcow2.bz2',
50+
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.5/systemvm64template-4.5-hyperv.vhd.zip',
51+
}
4152
when '4.4'
42-
default['cloudstack']['systemvm'] = {
43-
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-xen.vhd.bz2',
44-
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-vmware.ova',
45-
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-kvm.qcow2.bz2',
46-
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-kvm.qcow2.bz2',
47-
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-hyperv.vhd'
48-
}
53+
default['cloudstack']['systemvm'] = {
54+
'xenserver' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-xen.vhd.bz2',
55+
'vmware' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-vmware.ova',
56+
'kvm' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-kvm.qcow2.bz2',
57+
'lxc' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-kvm.qcow2.bz2',
58+
'hyperv' => 'http://cloudstack.apt-get.eu/systemvm/4.4/systemvm64template-4.4.1-7-hyperv.vhd',
59+
}
4960
when '4.3'
50-
default['cloudstack']['systemvm'] = {
51-
'xenserver' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-xen.vhd.bz2',
52-
'vmware' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-vmware.ova',
53-
'kvm' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-kvm.qcow2.bz2',
54-
'lxc' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-kvm.qcow2.bz2',
55-
'hyperv' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-hyperv.vhd.bz2'
56-
}
61+
default['cloudstack']['systemvm'] = {
62+
'xenserver' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-xen.vhd.bz2',
63+
'vmware' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-vmware.ova',
64+
'kvm' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-kvm.qcow2.bz2',
65+
'lxc' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-kvm.qcow2.bz2',
66+
'hyperv' => 'http://download.cloud.com/templates/4.3/systemvm64template-2014-06-23-master-hyperv.vhd.bz2',
67+
}
5768
when '4.2'
58-
default['cloudstack']['systemvm'] = {
59-
'xenserver' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-2013-07-12-master-xen.vhd.bz2',
60-
'vmware' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-4.2-vh7.ova',
61-
'kvm' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2',
62-
'lxc' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/acton/acton-systemvm-02062012.qcow2.bz2'
63-
}
64-
# when ? : if system VM template not define cloudstack_system_template will look
65-
# for the URL define into cloudstack database.
66-
end
69+
default['cloudstack']['systemvm'] = {
70+
'xenserver' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-2013-07-12-master-xen.vhd.bz2',
71+
'vmware' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-4.2-vh7.ova',
72+
'kvm' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2',
73+
'lxc' => 'http://d21ifhcun6b1t2.cloudfront.net/templates/acton/acton-systemvm-02062012.qcow2.bz2',
74+
}
75+
end

attributes/vhd-util.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook Name:: cloudstack
33
# Attribute:: vhd-util
44
# Author:: Pierre-Luc Dion (<[email protected]>)
5-
# Copyright 2015, CloudOps, Inc.
5+
# Copyright 2018, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -17,6 +17,6 @@
1717
# limitations under the License.
1818
#
1919

20-
# FOLLOWING ATTRIBUTES SHOULD NOT REQUIRE MODIFICATION
21-
default['cloudstack']['vhd-util_url'] = "http://download.cloud.com.s3.amazonaws.com/tools/vhd-util"
22-
default['cloudstack']['vhd-util_path'] = "/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver"
20+
# FOLLOWING ATTRIBUTES SHOULD NOT REQUIRE MODIFICATION
21+
default['cloudstack']['vhd-util_url'] = 'http://download.cloud.com.s3.amazonaws.com/tools/vhd-util'
22+
default['cloudstack']['vhd-util_path'] = '/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver'

0 commit comments

Comments
 (0)