Initial puppet module files

Created with "puppet module generate <USERNAME>-<MODULE NAME>" command
Gemfile and Rakefile added by hand

Change-Id: I5581abbd8602e0447cd15980fe536856f5508e64
This commit is contained in:
Ryan Bak 2014-09-26 08:38:04 -06:00
parent e690b242d1
commit 28633ec948
9 changed files with 139 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*~
*.pyc
.*.swp
Gemfile.lock

View File

@ -2,3 +2,5 @@
host=bfd-gerrit.os.cloud.twc.net
port=29418
project=puppet-monasca.git
defaultbranch=master

14
Gemfile Normal file
View File

@ -0,0 +1,14 @@
source 'https://rubygems.org'
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 1.0'
gem 'rake', '10.1.1'
gem 'rspec', '< 2.99'
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

10
Modulefile Normal file
View File

@ -0,0 +1,10 @@
name 'puppet-monasca'
version '0.1.0'
source ''
author 'Brad Klein, Ryan Bak'
license 'Apache License, Version 2.0'
summary 'Puppet module for OpenStack Monasca'
description 'Puppet module to install and configure the OpenStack monitoring service, Monasca'
project_page ''
dependency 'puppetlabs/keystone', '>=4.0.0 <5.0.0'

16
README Normal file
View File

@ -0,0 +1,16 @@
monasca
This is the monasca module.
License
-------
Contact
-------
Support
-------
Please log tickets and issues at our [Projects site](http://projects.example.com)

23
Rakefile Normal file
View File

@ -0,0 +1,23 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_parameter_order')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.show_ignored = true
PuppetSyntax.future_parser = true
PuppetSyntax.hieradata_paths = [ "files/**/*.yaml" ]
# Set the config file location to /dev/null so that if we're running this on a
# build server, it doesn't find the local puppet.conf and generate deprecation
# warnings. We want to test manifests, not puppet.conf
Puppet.settings[:config] = '/dev/null'
desc 'Run all syntax checks, unit tests, lint, etc'
task :test => [ :syntax, :spec, :lint ]
task(:default).clear
task :default => :test

41
manifests/init.pp Normal file
View File

@ -0,0 +1,41 @@
# == Class: monasca
#
# Full description of class monasca here.
#
# === Parameters
#
# Document parameters here.
#
# [*sample_parameter*]
# Explanation of what this parameter affects and what it defaults to.
# e.g. "Specify one or more upstream ntp servers as an array."
#
# === Variables
#
# Here you should define a list of variables that this module would require.
#
# [*sample_variable*]
# Explanation of how this variable affects the funtion of this class and if
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
# External Node Classifier as a comma separated list of hostnames." (Note,
# global variables should be avoided in favor of class parameters as
# of Puppet 2.6.)
#
# === Examples
#
# class { monasca:
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
# }
#
# === Authors
#
# Author Name <author@domain.com>
#
# === Copyright
#
# Copyright 2014 Your name here, unless otherwise noted.
#
class monasca {
}

17
spec/spec_helper.rb Normal file
View File

@ -0,0 +1,17 @@
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, 'lib')
require 'mocha'
require 'puppet'
require 'rspec'
require 'spec/autorun'
Spec::Runner.configure do |config|
config.mock_with :mocha
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
alias :must :should
end

12
tests/init.pp Normal file
View File

@ -0,0 +1,12 @@
# The baseline for module testing used by Puppet Labs is that each manifest
# should have a corresponding test manifest that declares that class or defined
# type.
#
# Tests are then run by using puppet apply --noop (to check for compilation
# errors and view a log of events) or by fully applying the test in a virtual
# environment (to compare the resulting system state to the desired state).
#
# Learn more about module testing here:
# http://docs.puppetlabs.com/guides/tests_smoke.html
#
include monasca