-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
147 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ rvm: | |
- 1.9.3 | ||
- 2.0 | ||
- 2.1 | ||
- 2.2 | ||
notifications: | ||
email: | ||
recipients: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
#### 0.0.1.alpha.1 | ||
#Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/) | ||
|
||
## Unreleased][unreleased] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in sensu-plugins-snmp.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2015 devops@yieldbot.com | ||
Copyright (c) 2015 Sensu-Plugins | ||
|
||
MIT License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,117 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
require 'json' | ||
|
||
VAGRANTFILE_API_VERSION = '2' | ||
|
||
# Read in the configuration file for the vagrant environment | ||
config_file = JSON.parse(File.read('../GIR/config/vagrant_config.json')) | ||
vagrant_config = config_file['config'] | ||
|
||
# The vagrant boxes are provisioned by Chef. | ||
# If this is nothing something you want to deal with then comment out the | ||
# provisioner and chef and berkshelf lines. The boxes as they stand are | ||
# fairly barebones but should contain enough for basic development and | ||
# initial testing. | ||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = 'chef/centos-6.6' | ||
# Standard configuration details | ||
config.vm.box_download_checksum = true | ||
config.vm.box_download_checksum_type = 'md5' | ||
config.vm.hostname = 'sensu-plugins-dev' | ||
|
||
script = <<EOF | ||
sudo yum update -y | ||
sudo yum groupinstall -y development | ||
sudo yum install -y vim nano | ||
#sudo yum install -y ImagicMagic ImageMagick-devel mysql-devel # needed for bundle install | ||
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | ||
curl -L get.rvm.io | bash -s stable | ||
source /home/vagrant/.rvm/scripts/rvm | ||
rvm reload | ||
#rvm install 1.9.3 | ||
rvm install 2.1.4 | ||
#rvm install 2.0.0 | ||
#rvm use 1.9.3@sensu_plugins --create | ||
#rvm use 2.0.0@sensu_plugins --create | ||
rvm use 2.1.4@sensu_plugins --create | ||
rvm use 2.1.4@sensu_plugins --default | ||
EOF | ||
|
||
config.vm.provision 'shell', inline: script, privileged: false | ||
# None of the boxes have the chef-client installed, | ||
# this will install the latest version for provisioning | ||
config.omnibus.chef_version = :latest | ||
|
||
# Local Berkself configuration | ||
# This is used only if you add recipes to the boxes below. | ||
# All dependencies and such for the roles is done with a Berksfile | ||
# in GIR | ||
config.berkshelf.enabled = true | ||
|
||
# Box definitions | ||
# The roles and boxes can be found in the above configuration file | ||
# in GIR. If you want to change them you can do so below but any | ||
# lasting changes should be made against GIR unless they are repo specific | ||
config.vm.define 'cent5' do |cent5| | ||
cent5.vm.box = vagrant_config['cent5']['box'] | ||
cent5.vm.provision 'chef_zero' do |chef| | ||
chef.roles_path = vagrant_config['cent5']['role_path'] | ||
vagrant_config['cent5']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
# chef.add_recipe 'apache2' | ||
end | ||
end | ||
|
||
config.vm.define 'cent6' do |cent6| | ||
cent6.vm.box = vagrant_config['cent6']['box'] | ||
cent6.vm.provision 'chef_zero' do |chef| | ||
chef.roles_path = vagrant_config['cent6']['role_path'] | ||
vagrant_config['cent6']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
end | ||
end | ||
|
||
config.vm.define 'cent7' do |cent7| | ||
cent7.vm.box = vagrant_config['cent7']['box'] | ||
cent7.vm.provision 'chef_zero' do |chef| | ||
chef.roles_path = vagrant_config['cent7']['role_path'] | ||
vagrant_config['cent7']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
end | ||
end | ||
|
||
config.vm.define 'ubuntu14' do |ubuntu14| | ||
ubuntu14.vm.box = vagrant_config['ubuntu14']['box'] | ||
ubuntu14.vm.provision 'chef_zero' do |chef| | ||
chef.roles_path = vagrant_config['ubuntu14']['role_path'] | ||
vagrant_config['ubuntu14']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
end | ||
end | ||
|
||
# The bsd boxes have to be configured differently and require some | ||
# tough love. Shared folders are not available and using NFS will | ||
# likely error due to filename length. You can patch it and use | ||
# NFS if you really want but that is not supported or reccomended | ||
# at this time | ||
# | ||
# This means that when making changes to GIR you will need to do a reload | ||
# or possibly a halt/up on the machine to pull in the latest roles and recipes | ||
config.vm.define 'freebsd92' do |bsd9| | ||
bsd9.vm.guest = :freebsd | ||
# The below line is needed for < freebsd9x only | ||
bsd9.ssh.shell = '/bin/sh' | ||
bsd9.vm.box = vagrant_config['bsd9']['box'] | ||
|
||
# Use rsync in place of shared folders | ||
bsd9.vm.synced_folder '.', '/vagrant', type: 'rsync' | ||
bsd9.vm.provision 'chef_zero' do |chef| | ||
chef.synced_folder_type = 'rsync' | ||
chef.roles_path = vagrant_config['bsd9']['role_path'] | ||
vagrant_config['bsd9']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
end | ||
end | ||
|
||
config.vm.define 'freebsd10' do |bsd10| | ||
bsd10.vm.guest = :freebsd | ||
bsd10.vm.box = vagrant_config['bsd10']['box'] | ||
|
||
# Use rsync in place of shared folders | ||
bsd10.vm.synced_folder '.', '/vagrant', type: 'rsync' | ||
bsd10.vm.provision 'chef_zero' do |chef| | ||
chef.synced_folder_type = 'rsync' | ||
chef.roles_path = vagrant_config['bsd10']['role_path'] | ||
vagrant_config['bsd10']['role'].each do |r| | ||
chef.add_role(r) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters