Skip to content

Commit 9290611

Browse files
committed
add berks, v 0.2.1
1 parent c46042c commit 9290611

17 files changed

+527
-20
lines changed

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*~
2+
*#
3+
.#*
4+
\#*#
5+
.*.sw[a-z]
6+
*.un~
7+
pkg/
8+
9+
# Berkshelf
10+
.vagrant
11+
/cookbooks
12+
Berksfile.lock
13+
14+
# Bundler
15+
Gemfile.lock
16+
bin/*
17+
.bundle/*
18+
19+
.kitchen/
20+
.kitchen.local.yml

.kitchen.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
driver:
3+
name: cloudstack
4+
5+
driver_config:
6+
cloudstack_api_key: 'v_e3gI-UuhNQtASzBvpdhMrlV9LV9U8bXxIXZbakYuAc8QDZde6FsGtrZu-hiv8TYpSDlEHg_b0mt8gsxfpZIw'
7+
cloudstack_secret_key: 'ZOpdxnloS4l84MHdHXgQjVMZdhpRPRwDNRxIdYM2sLp3FArLP8CnDHoTasX_rs1loyrKA97xlSuBN_MwYH3ryA'
8+
cloudstack_api_url: 'https://console.cloudops.net/client/api'
9+
cloudstack_diskoffering_id: 'bc55eedf-b277-463c-93c0-cdac9ea7fb6a'
10+
cloudstack_ssh_keypair_name: '[email protected]'
11+
cloudstack_zone_id: 45f2a54c-edfe-4d72-b126-fa545b645b8c
12+
cloudstack_serviceoffering_id: 'af5a8619-2b83-4798-ba7e-76ec50fec0af'
13+
cloudstack_network_id: '462b256d-c1fd-418e-98cc-83be4f6181d8'
14+
username: cca-user
15+
require_chef_omnibus: latest
16+
17+
provisioner:
18+
name: chef_solo
19+
20+
platforms:
21+
# - name: coc-centos7
22+
# driver:
23+
# cloudstack_template_id: 'e9493eb8-951a-46e0-afaf-56810fcabb8c'
24+
- name: coc-centos6
25+
driver:
26+
cloudstack_template_id: '4f5592d3-e44a-4b32-9831-c6997a9a6957'
27+
# - name: coc-ubuntu1404
28+
# driver:
29+
# cloudstack_template_id: 'cd53a083-9644-43e7-9888-70aec86aa698'
30+
31+
suites:
32+
- name: all
33+
# ext4 on LVM
34+
run_list:
35+
- recipe[co_upgrade-once]
36+
- recipe[cloudstack_wrapper::dev_all_in_one]
37+
attributes:
38+
cloudstack:
39+
release_major: '4.7'

Berksfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://supermarket.chef.io"
2+
3+
metadata
4+
5+
cookbook 'co_upgrade-once', git: '[email protected]:cookbooks/co_upgrade-once.git'
6+
cookbook 'cloudstack', git: '[email protected]:cloudops/cookbook_cloudstack.git'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ cloudstack_wrapper CHANGELOG
33

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

6+
0.2.1
7+
-----
8+
- pdion891 - Add Berkshelf support.
9+
- fix selinux for database server.
10+
- add customized log4j-cloud.xml for ACS 4.7.x
611
0.2.0
712
-----
813
- pdion891 - update use of mysql cookbook to suport version 6.

Gemfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'berkshelf'
4+
5+
# Uncomment these lines if you want to live on the Edge:
6+
#
7+
# group :development do
8+
# gem "berkshelf", github: "berkshelf/berkshelf"
9+
# gem "vagrant", github: "mitchellh/vagrant", tag: "v1.6.3"
10+
# end
11+
#
12+
# group :plugins do
13+
# gem "vagrant-berkshelf", github: "berkshelf/vagrant-berkshelf"
14+
# gem "vagrant-omnibus", github: "schisamo/vagrant-omnibus"
15+
# end
16+
17+
gem "test-kitchen"
18+
gem "kitchen-vagrant"

Thorfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# encoding: utf-8
2+
3+
require 'bundler'
4+
require 'bundler/setup'
5+
require 'berkshelf/thor'
6+
7+
begin
8+
require "kitchen/thor_tasks"
9+
Kitchen::ThorTasks.new
10+
rescue LoadError
11+
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV["CI"]
12+
end

Vagrantfile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5+
VAGRANTFILE_API_VERSION = '2'
6+
7+
Vagrant.require_version '>= 1.5.0'
8+
9+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
10+
# All Vagrant configuration is done here. The most common configuration
11+
# options are documented and commented below. For a complete reference,
12+
# please see the online documentation at vagrantup.com.
13+
14+
config.vm.hostname = 'cloudstack-wrapper-berkshelf'
15+
16+
# Set the version of chef to install using the vagrant-omnibus plugin
17+
# NOTE: You will need to install the vagrant-omnibus plugin:
18+
#
19+
# $ vagrant plugin install vagrant-omnibus
20+
#
21+
if Vagrant.has_plugin?("vagrant-omnibus")
22+
config.omnibus.chef_version = 'latest'
23+
end
24+
25+
# Every Vagrant virtual environment requires a box to build off of.
26+
# If this value is a shorthand to a box in Vagrant Cloud then
27+
# config.vm.box_url doesn't need to be specified.
28+
config.vm.box = 'chef/ubuntu-14.04'
29+
30+
31+
# Assign this VM to a host-only network IP, allowing you to access it
32+
# via the IP. Host-only networks can talk to the host machine as well as
33+
# any other machines on the same network, but cannot be accessed (through this
34+
# network interface) by any external networks.
35+
config.vm.network :private_network, type: 'dhcp'
36+
37+
# Create a forwarded port mapping which allows access to a specific port
38+
# within the machine from a port on the host machine. In the example below,
39+
# accessing "localhost:8080" will access port 80 on the guest machine.
40+
41+
# Share an additional folder to the guest VM. The first argument is
42+
# the path on the host to the actual folder. The second argument is
43+
# the path on the guest to mount the folder. And the optional third
44+
# argument is a set of non-required options.
45+
# config.vm.synced_folder "../data", "/vagrant_data"
46+
47+
# Provider-specific configuration so you can fine-tune various
48+
# backing providers for Vagrant. These expose provider-specific options.
49+
# Example for VirtualBox:
50+
#
51+
# config.vm.provider :virtualbox do |vb|
52+
# # Don't boot with headless mode
53+
# vb.gui = true
54+
#
55+
# # Use VBoxManage to customize the VM. For example to change memory:
56+
# vb.customize ["modifyvm", :id, "--memory", "1024"]
57+
# end
58+
#
59+
# View the documentation for the provider you're using for more
60+
# information on available options.
61+
62+
# The path to the Berksfile to use with Vagrant Berkshelf
63+
# config.berkshelf.berksfile_path = "./Berksfile"
64+
65+
# Enabling the Berkshelf plugin. To enable this globally, add this configuration
66+
# option to your ~/.vagrant.d/Vagrantfile file
67+
config.berkshelf.enabled = true
68+
69+
# An array of symbols representing groups of cookbook described in the Vagrantfile
70+
# to exclusively install and copy to Vagrant's shelf.
71+
# config.berkshelf.only = []
72+
73+
# An array of symbols representing groups of cookbook described in the Vagrantfile
74+
# to skip installing and copying to Vagrant's shelf.
75+
# config.berkshelf.except = []
76+
77+
config.vm.provision :chef_solo do |chef|
78+
chef.json = {
79+
mysql: {
80+
server_root_password: 'rootpass',
81+
server_debian_password: 'debpass',
82+
server_repl_password: 'replpass'
83+
}
84+
}
85+
86+
chef.run_list = [
87+
'recipe[cloudstack_wrapper::default]'
88+
]
89+
end
90+
end

attributes/default.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@
4141

4242
default['cloudstack']['admin']['api_key'] = '' # automatically generated
4343
default['cloudstack']['admin']['secret_key'] = '' # automatically generated
44-

chefignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.kitchen

files/4.7/30-cloudstack.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$template SimpleForward,"%rawmsg%"
2+
3+
local6.* @@loglab.cloudops.net:5515;SimpleForward

0 commit comments

Comments
 (0)