Skip to content

Commit

Permalink
added selinux for centos7, updated collectd broken plugins, set swap …
Browse files Browse the repository at this point in the history
…back to MB to match swap cookbook. (#41)

* adding in sysctl files closes #36

* adding in sysctl tuning fixes: #36

* adding version into changelog

* updating sysctl, ande eph_lvm to 3.0

* updating knife(setting log_level to info), updating spec_helper(adding platforms_method)

* adding new chefspec test sysctl

* updating to fix selinux issues with default install

* changlog upddate

* adding socket options

* changing module name, and if

* updating test on kitchen

* trimming down modules to ones that exist

* fixes #39

* fixing changelog

* fixed: Plugin dfdid not register for value ReportReserved

* adding in unlink

* updating for baseurl

* removing mirrorlist

* adding kitchen-dokken, removing ubuntu1204, adding ubuntu1604

* adding kitchen dokken

* fixing cookstyle, and loglevel

* fixing specs

* cutting file by size

* converting swap to float

* updating full thing to integer

* updating kitchen dokken, and pinning swap

* removing ruby-version as we use chef-dk

* removing coveralls as we really dont use it

* deprecations_as_errors: false

* adding swap

* removing chef and rake as we use chefdk

* undoing sysctl as default, as that is to big a change

* adding rhel guard

* fixing centos6 yum-epel issue

* adding hostname to ubuntu1404

* adding collectd hostname

* pinning collectd to 2.2.2

* updating readme to match changes

Signed-off-by: Richard Shade <[email protected]>
  • Loading branch information
rshade authored Mar 21, 2017
1 parent 5d66d7b commit 6fecb56
Show file tree
Hide file tree
Showing 23 changed files with 380 additions and 158 deletions.
87 changes: 87 additions & 0 deletions .kitchen.dokken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
driver:
name: dokken
privileged: true # because Docker and SystemD/Upstart
chef_version: current
volumes: [ '/mnt' ]

transport:
name: dokken

provisioner:
name: dokken
deprecations_as_errors: false

verifier:
name: inspec

platforms:
- name: centos-6
driver:
image: centos:6
privileged: true
platform: rhel
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum -y install which initscripts net-tools wget

- name: centos-7
driver:
image: centos:7
privileged: true
platform: rhel
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install lsof which systemd-sysv initscripts wget net-tools

- name: debian-7
driver:
image: debian:7
privileged: true
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y

- name: debian-8
driver:
image: debian:8
privileged: true
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y

- name: fedora-25
driver:
image: fedora:25
privileged: true
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN dnf -y install yum which systemd-sysv initscripts wget net-tools

- name: ubuntu-14.04
driver:
image: ubuntu-upstart:14.04
privileged: true
hostname: <%= ENV['INSTANCE'].downcase %>
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y

- name: ubuntu-16.04
driver:
image: ubuntu:16.04
privileged: true
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y

- name: opensuse-leap
driver:
image: opensuse:leap
privileged: true
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which hostname
45 changes: 17 additions & 28 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,30 @@ platforms:
run_list: ['recipe[yum-epel]','recipe[fake::create_secrets]']
driver_config:
box: bento/centos-7.2
- name: rhel-6.5
run_list: ['recipe[yum-epel]', 'recipe[rhsm]','recipe[fake::create_secrets]']
attributes:
rhsm:
username: <%= ENV['RHSM_USERNAME'] %>
password: <%= ENV['RHSM_PASSWORD'] %>
driver_config:
box: local-rhel-6.5
box_url: file://<%= File.expand_path('~') %>/opscode_rhel-6.5_chef-provisionerless.box
- name: rhel-7.0
run_list: ['recipe[yum-epel]', 'recipe[rhsm]','recipe[fake::create_secrets]']
attributes:
rhsm:
username: <%= ENV['RHSM_USERNAME'] %>
password: <%= ENV['RHSM_PASSWORD'] %>
driver_config:
box: local-rhel-7.0
box_url: file://<%= File.expand_path('~') %>/opscode_rhel-7.0_chef-provisionerless.box
- name: ubuntu-12.04
run_list: ['recipe[apt]','recipe[fake::create_secrets]']
driver_config:
box: bento/ubuntu-12.04
- name: ubuntu-14.04
run_list: ['recipe[apt]','recipe[fake::create_secrets]']
run_list:
- recipe[apt]
- recipe[fake::create_secrets]
driver_config:
box: bento/ubuntu-14.04
- name: ubuntu-16.04
run_list: ['recipe[apt]','recipe[fake::create_secrets]']
driver_config:
box: bento/ubuntu-16.04

suites:
- name: default
run_list: ['recipe[rs-base::default]']
run_list:
- recipe[rs-base::default]
attributes:
cloud:
provider: vagrant
rightscale:
RS_RLL_PORT: 12345
rs-base:
collectd_server: sketchy1-66.rightscale.com
collectd_hostname: 00-137FE058
swap:
size: 1
- name: swap
run_list: ['recipe[rs-base::swap]']
attributes:
Expand All @@ -75,9 +64,9 @@ suites:
rs-base:
rsyslog_server: 192.168.0.1
- name: collectd
run_list: ['recipe[fake::rightscale_software]', 'recipe[fake::tcpdump]', 'recipe[rs-base::collectd]']
run_list: ['recipe[fake::tcpdump]', 'recipe[rs-base::monitoring_collectd]']
attributes:
rightscale:
RS_RLL_PORT: 12345
cloud:
provider: vagrant
rs-base:
collectd_server: sketchy1-66.rightscale.com
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

54 changes: 45 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
language: ruby
rvm:
- 2.3.1
sudo: required
dist: trusty

# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
addons:
apt:
sources:
- chef-stable-trusty
packages:
- chefdk

before_install:
- curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 1.2.22
- gem install bundler -v 1.11.2
install:
- chef exec bundle install --jobs=3 --retry=3
before_script: chef exec rake setup_test_environment
script: "./.travis_install.sh"
- sudo chef gem install kitchen-dokken
# Don't `bundle install` which takes about 1.5 mins
install: echo "skip bundle install"

branches:
only:
- master

services: docker

env:
matrix:
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-ubuntu-1604
- INSTANCE=default-centos-6
- INSTANCE=default-centos-7

before_script:
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- sudo chef gem install kitchen-dokken
- chef exec bundle install --jobs=3 --retry=3

script: KITCHEN_LOCAL_YAML=.kitchen.dokken.yml /opt/chefdk/embedded/bin/chef exec kitchen verify ${INSTANCE}

matrix:
include:
- script:
- chef exec rake setup_test_environment
- "./.travis_install.sh"
env: UNIT_AND_LINT=1
notifications:
slack:
secure: FECIJq2s1oCyRiuuQgisiWsKXx5g2WpFxfO3gPCDrzjHbLbdPBFZRd/O5oI/ugWK19hOcAFe2CuSrsE485mmXutL/mQiDehZ1S3++iIsAPYZdnWISEl4IiKJmGrRPqAE4maG8TiBMEV6gt3YPvteWhtmJxE4LEJoXS9r98zA3qA=
5 changes: 0 additions & 5 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
source 'https://supermarket.chef.io'
metadata

cookbook 'collectd'
cookbook 'marker', github: 'rightscale-cookbooks/marker'
cookbook 'rightscale_tag', github: 'rightscale-cookbooks/rightscale_tag'
cookbook 'machine_tag', github: 'rightscale-cookbooks/machine_tag'

group :integration do
cookbook 'fake', path: './test/cookbooks/fake'
end
139 changes: 66 additions & 73 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -1,73 +1,66 @@
DEPENDENCIES
collectd
fake
path: test/cookbooks/fake
machine_tag
git: https://github.com/rightscale-cookbooks/machine_tag.git
revision: 581dd0b7ddf2e65939527bb5e6c6c47788d1bf33
marker
git: https://github.com/rightscale-cookbooks/marker.git
revision: 058e70879408fceceb628c600d487b1ddfa06cdb
rightscale_tag
git: https://github.com/rightscale-cookbooks/rightscale_tag.git
revision: d012cd3486fd9fc4efbf5200885bad521301c4b9
rs-base
path: .
metadata: true

GRAPH
apt (5.0.1)
compat_resource (>= 12.16.3)
build-essential (7.0.3)
compat_resource (>= 12.16.3)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
collectd (2.2.2)
poise (~> 2.2)
poise-service (~> 1.0)
collectd_plugins (2.1.3)
collectd (~> 2.0)
compat_resource (12.16.3)
ephemeral_lvm (3.0.0)
lvm (>= 4.0)
now (>= 0.0.0)
fake (0.1.0)
lvm (4.0.5)
machine_tag (2.0.1)
apt (>= 0.0.0)
build-essential (>= 0.0.0)
marker (2.0.0)
mingw (1.2.5)
compat_resource (>= 12.16.3)
seven_zip (>= 0.0.0)
now (1.0.0)
ntp (3.3.1)
ohai (4.2.3)
compat_resource (>= 12.14.7)
poise (2.7.1)
poise-service (1.4.2)
poise (~> 2.0)
rightscale_tag (2.0.0)
machine_tag (~> 2.0)
marker (~> 2.0)
rs-base (2.0.1)
apt (>= 0.0.0)
collectd (~> 2.2.2)
collectd_plugins (~> 2.1.3)
ephemeral_lvm (~> 3.0)
machine_tag (~> 2.0)
marker (>= 0.0.0)
ntp (>= 0.0.0)
rightscale_tag (~> 2.0)
rsyslog (>= 0.0.0)
swap (>= 0.0.0)
yum-epel (>= 0.0.0)
rsyslog (5.1.0)
compat_resource (>= 12.14.6)
seven_zip (2.0.2)
windows (>= 1.2.2)
swap (0.3.8)
windows (2.1.1)
ohai (>= 4.0.0)
yum-epel (2.1.1)
compat_resource (>= 12.16.3)
DEPENDENCIES
fake
path: test/cookbooks/fake
rs-base
path: .
metadata: true

GRAPH
apt (6.0.1)
build-essential (8.0.0)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
chef-sugar (3.4.0)
collectd (2.2.2)
poise (~> 2.2)
poise-service (~> 1.0)
collectd_plugins (2.1.3)
collectd (~> 2.0)
compat_resource (12.16.3)
ephemeral_lvm (3.0.0)
lvm (>= 4.0)
now (>= 0.0.0)
fake (0.1.0)
lvm (4.0.5)
machine_tag (2.0.4)
apt (>= 0.0.0)
build-essential (>= 0.0.0)
chef-sugar (>= 0.0.0)
marker (2.0.0)
mingw (2.0.0)
seven_zip (>= 0.0.0)
now (1.0.0)
ntp (3.3.1)
ohai (5.0.0)
poise (2.7.2)
poise-service (1.4.2)
poise (~> 2.0)
rightscale_tag (2.0.1)
machine_tag (~> 2.0)
marker (~> 2.0)
rs-base (2.1.0)
apt (>= 0.0.0)
collectd (= 2.2.2)
collectd_plugins (= 2.1.3)
ephemeral_lvm (~> 3.0)
machine_tag (~> 2.0)
marker (>= 0.0.0)
ntp (>= 0.0.0)
rightscale_tag (~> 2.0)
rsyslog (>= 0.0.0)
selinux_policy (>= 0.0.0)
swap (>= 2.0.0)
sysctl (>= 0.0.0)
yum-epel (>= 0.0.0)
rsyslog (6.0.1)
selinux_policy (2.0.0)
compat_resource (>= 12.16.3)
seven_zip (2.0.2)
windows (>= 1.2.2)
swap (2.0.0)
sysctl (0.8.1)
ohai (>= 4.0)
windows (3.0.1)
ohai (>= 4.0.0)
yum-epel (2.1.1)
compat_resource (>= 12.16.3)
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ rs-base Cookbook CHANGELOG

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

v2.1.0
------
- adding selinux support for centos7 collectd
- fixing IgnoreSelectd to IgnoreSelected
- fixed: Plugin `df' did not register for value `ReportReserved'
- adding in sysctl-tuning
- making rs-base attributes match rightscale plugin format
- setting swap back to MB

v2.0.1
------
- add support for collectd on centos/rhel 7 by enabling epel repo
- add support for collectd on centos/rhel 7 by enabling epel repo

v2.0.0
------
- adding support for chef12
- adding support for chef12

v1.3.0
------
Expand Down
Loading

0 comments on commit 6fecb56

Please sign in to comment.