Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
(SIMP-1275) Update to new naming convention
Browse files Browse the repository at this point in the history
Ported to the new RPM naming scheme

SIMP-1275 #comment ported to the new RPM naming scheme

Change-Id: I91173d1938c7fa237dfbda16f64ca8aece0ddebe
  • Loading branch information
trevor-vaughan authored and lnemsick-simp committed Aug 2, 2016
1 parent 9629c29 commit 55afa38
Show file tree
Hide file tree
Showing 18 changed files with 407 additions and 156 deletions.
10 changes: 6 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
fixtures:
repositories:
common: "git://github.com/simp/pupmod-simp-common"
iptables: "git://github.com/simp/pupmod-simp-iptables"
network: "git://github.com/simp/pupmod-simp-network"
stdlib: "git://github.com/simp/puppetlabs-stdlib"
iptables: "https://github.com/simp/pupmod-simp-iptables"
network: "https://github.com/simp/pupmod-simp-network"
simplib: "https://github.com/simp/pupmod-simp-simplib"
stdlib:
repo: "https://github.com/simp/puppetlabs-stdlib"
branch: "simp-master"
symlinks:
gfs2: "#{source_dir}"
8 changes: 0 additions & 8 deletions .fixtures.yml.local

This file was deleted.

18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.*.sw?
.yardoc
dist
/pkg
!/spec/fixtures/
/spec/fixtures/*
/spec/rp_env
!/spec/fixtures/hieradata
!/spec/fixtures/hieradata/*.yaml
!/spec/fixtures/site.pp
/spec/fixtures/hieradata/hiera.yaml
/.rspec_system
/.vagrant
/.bundle
/Gemfile.lock
/vendor
/junit
/log
4 changes: 4 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--log-format="%{path}:%{line}:%{check}:%{KIND}:%{message}"
--relative
--no-class_inherits_from_params_class-check
--no-80chars-check
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format documentation
--color
--fail-fast
104 changes: 92 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,97 @@
---
language: ruby
sudo: false
cache: bundler
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.2.1
install: bundle install
before_script:
- bundle
bundler_args: --without development system_tests
before_install: rm Gemfile.lock || true
script:
- 'bundle exec rake validate'
- 'bundle exec rake lint'
- 'bundle exec rake spec'
- bundle exec rake test
notifications:
email: false
rvm:
- 2.0.0
- 2.1.0
- 2.2.1
- 1.9.3
env:
global:
- STRICT_VARIABLES=yes
- TRUSTED_NODE_DATA=yes
matrix:
- PUPPET_VERSION="~> 3.8.0"
- PUPPET_VERSION="~> 4.4.0"
- PUPPET_VERSION="~> 3.5.0"
- PUPPET_VERSION="~> 3.6.0"
- PUPPET_VERSION="~> 3.7.0"
- PUPPET_VERSION="~> 3.7.0" FUTURE_PARSER=yes
- PUPPET_VERSION="~> 3.8.0" FUTURE_PARSER=yes
- PUPPET_VERSION="~> 4.0.0"
- PUPPET_VERSION="~> 4.1.0"
- PUPPET_VERSION="~> 4.2.0"
- PUPPET_VERSION="~> 4.3.0"
matrix:
allow_failures:
- rvm: 1.8.7
- rvm: 2.2.1
fast_finish: true
allow_failures:
- rvm: 1.9.3
- rvm: 2.2.1
- env: PUPPET_VERSION="~> 3.5.0"
- env: PUPPET_VERSION="~> 3.6.0"
- env: PUPPET_VERSION="~> 3.7.0"
- env: PUPPET_VERSION="~> 3.7.0" FUTURE_PARSER=yes
- env: PUPPET_VERSION="~> 3.8.0" FUTURE_PARSER=yes
- env: PUPPET_VERSION="~> 4.0.0"
- env: PUPPET_VERSION="~> 4.1.0"
- env: PUPPET_VERSION="~> 4.2.0"
- env: PUPPET_VERSION="~> 4.3.0"


exclude:
# Ruby 1.9.3
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.5.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.6.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.7.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.7.0" FUTURE_PARSER=yes
- rvm: 1.9.3
env: PUPPET_VERSION="~> 4.0.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 4.1.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 4.2.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 4.3.0"

# Ruby 2.1.0
- rvm: 2.1.0
env: PUPPET_VERSION="~> 3.5.0"
- rvm: 2.1.0
env: PUPPET_VERSION="~> 3.6.0"
- rvm: 2.1.0
env: PUPPET_VERSION="~> 3.7.0"
- rvm: 2.1.0
env: PUPPET_VERSION="~> 3.7.0" FUTURE_PARSER=yes

# Ruby 2.2.1
- rvm: 2.2.1
env: PUPPET_VERSION="~> 3.5.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 3.6.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 3.7.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 3.7.0" FUTURE_PARSER=yes
- rvm: 2.2.1
env: PUPPET_VERSION="~> 3.8.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 4.0.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 4.1.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 4.2.0"
- rvm: 2.2.1
env: PUPPET_VERSION="~> 4.3.0"
58 changes: 2 additions & 56 deletions build/pupmod-gfs2.spec → CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,60 +1,6 @@
Summary: gfs2 Puppet Module
Name: pupmod-gfs2
Version: 4.1.0
Release: 2
License: Apache License, Version 2.0
Group: Applications/System
Source: %{name}-%{version}-%{release}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: pupmod-iptables >= 4.1.0-3
Requires: pupmod-common >= 4.1.0-4
Requires: puppet >= 3.3.0
Buildarch: noarch
Requires: simp-bootstrap >= 4.2.0
Obsoletes: pupmod-gfs2-test
* Tue Aug 02 2016 Trevor Vaughan <[email protected]> - 4.1.1-0
- Update to the new package naming convention

Prefix:"/etc/puppet/environments/simp/modules"

%description
This Puppet module provides the basic capability to configure gfs2.

%prep
%setup -q

%build

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

mkdir -p %{buildroot}/%{prefix}/gfs2

dirs='files lib manifests templates'
for dir in $dirs; do
test -d $dir && cp -r $dir %{buildroot}/%{prefix}/gfs2
done

mkdir -p %{buildroot}/usr/share/simp/tests/modules/gfs2

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

mkdir -p %{buildroot}/%{prefix}/gfs2

%files
%defattr(0640,root,puppet,0750)
/etc/puppet/environments/simp/modules/gfs2

%post
#!/bin/sh

if [ -d /etc/puppet/environments/simp/modules/gfs2/plugins ]; then
/bin/mv /etc/puppet/environments/simp/modules/gfs2/plugins /etc/puppet/environments/simp/modules/gfs2/plugins.bak
fi

%postun
# Post uninstall stuff

%changelog
* Fri Jan 16 2015 Trevor Vaughan <[email protected]> - 4.1.0-2
- Changed puppet-server requirement to puppet

Expand Down
58 changes: 43 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
# ------------------------------------------------------------------------------
# Environment variables:
#
# SIMP_GEM_SERVERS | a space/comma delimited list of rubygem servers
# PUPPET_VERSION | specifies the version of the puppet gem to load
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['~>3']
# SIMP_GEM_SERVERS | a space/comma delimited list of rubygem servers
# PUPPET_VERSION | specifies the version of the puppet gem to load
# ------------------------------------------------------------------------------
# NOTE: SIMP Puppet rake tasks support ruby 2.0 and ruby 2.1
# ------------------------------------------------------------------------------
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : '~>3'
gem_sources = ENV.key?('SIMP_GEM_SERVERS') ? ENV['SIMP_GEM_SERVERS'].split(/[, ]+/) : ['https://rubygems.org']

gem_sources.each { |gem_source| source gem_source }

group :test do
gem "rake"
gem 'puppet', puppetversion
gem "rspec", '< 3.2.0'
gem "rspec-puppet"
gem "hiera-puppet-helper"
gem "puppetlabs_spec_helper"
gem "metadata-json-lint"
gem "simp-rspec-puppet-facts", "~> 1.3"

gem 'puppet', puppetversion
gem 'puppet-lint'
gem 'puppetlabs_spec_helper'
gem 'puppet_module_spec_helper'
gem 'simp-rake-helpers'

group :debug do
gem 'pry'
gem 'pry-doc'
gem 'rspec'
gem 'mocha'
gem 'metadata-json-lint'
# simp-rake-helpers does not suport puppet 2.7.X
if "#{ENV['PUPPET_VERSION']}".scan(/\d+/).first != '2' &&
# simp-rake-helpers and ruby 1.8.7 bomb Travis tests
# TODO: fix upstream deps (parallel in simp-rake-helpers)
RUBY_VERSION.sub(/\.\d+$/,'') != '1.8'
gem 'simp-rake-helpers'
end
end

group :development do
gem "travis"
gem "travis-lint"
gem "travish"
gem "puppet-blacksmith"
gem "guard-rake"
gem 'pry'
gem 'pry-doc'

# `listen` is a dependency of `guard`
# from `listen` 3.1+, `ruby_dep` requires Ruby version >= 2.2.3, ~> 2.2
gem 'listen', '~> 3.0.6'
end

group :system_tests do
gem 'beaker'
gem 'beaker-rspec'
gem 'simp-beaker-helpers', '>= 1.0.5'
end
27 changes: 2 additions & 25 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#!/usr/bin/rake -T
require 'simp/rake/pupmod/helpers'

# For playing nice with mock
File.umask(027)
Simp::Rake::Pupmod::Helpers.new(File.dirname(__FILE__))

require 'simp/rake/pkg'

begin
require 'puppetlabs_spec_helper/rake_tasks'
rescue LoadError
puts "== WARNING: Gem puppetlabs_spec_helper not found, spec tests cannot be run! =="
end

# Lint Material
begin
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send("disable_variables_not_enclosed")
PuppetLint.configuration.send("disable_class_parameter_defaults")
rescue LoadError
puts "== WARNING: Gem puppet-lint not found, lint tests cannot be run! =="
end

Simp::Rake::Pkg.new( File.dirname( __FILE__ ) ) do | t |
t.clean_list << "#{t.base_dir}/spec/fixtures/hieradata/hiera.yaml"
end
2 changes: 2 additions & 0 deletions build/rpm_metadata/requires
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Requires: pupmod-simp-iptables >= 4.1.0-3
Obsoletes: pupmod-gfs2-test
2 changes: 1 addition & 1 deletion manifests/cluster_allow.pp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@

iptables_rule { 'allow_cluster_multicast':
order => '6',
content => "-s $cluster_nets -m addrtype --src-type MULTICAST -j ACCEPT"
content => "-s ${cluster_nets} -m addrtype --src-type MULTICAST -j ACCEPT"
}
}
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
if $::virtual and ( ( $::virtual == 'xenu' ) or ( $::virtual == 'xen0' ) ) {
package { [
'kmod-gnbd-xen',
"libvirt.$::hardwaremodel" ]:
"libvirt.${::hardwaremodel}" ]:
ensure => 'latest'
}
}
Expand Down
39 changes: 39 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "simp-gfs2",
"version": "4.1.1",
"author": "simp",
"summary": "manages gfs2",
"license": "Apache-2.0",
"source": "https://github.com/simp/pupmod-simp-gfs2",
"project_page": "https://github.com/simp/pupmod-simp-gfs2",
"issues_url": "https://simp-project.atlassian.net",
"tags": [ "simp", "gfs2" ],
"dependencies": [
{
"name": "simp/iptables",
"version_requirement": ">= 4.1.0"
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 3.2.0"
},
{
"name": "simp/simplib",
"version_requirement": ">= 4.1.0"
}
],
"operatingsystem_support": [
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"6"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6"
]
}
]
}
Loading

0 comments on commit 55afa38

Please sign in to comment.