This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Steve Huff
committed
Sep 24, 2015
0 parents
commit ba6839c
Showing
13 changed files
with
354 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.env | ||
.tmp/ | ||
modules/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
2.1.2 |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
source 'https://rubygems.org' | ||
|
||
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3'] | ||
gem 'puppet', puppetversion | ||
gem 'puppetlabs_spec_helper', '>= 0.8.2' | ||
gem 'puppet-lint', '>= 1.0.0' | ||
gem 'facter', '>= 1.7.0' | ||
gem 'librarian-puppet', '~> 2.2' | ||
|
||
group :development, :test do | ||
gem 'dotenv', '~> 2.0' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (2.2.8) | ||
activemodel (4.2.4) | ||
activesupport (= 4.2.4) | ||
builder (~> 3.1) | ||
activesupport (4.2.4) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
builder (3.2.2) | ||
diff-lcs (1.2.5) | ||
dotenv (2.0.2) | ||
facter (2.4.4) | ||
CFPropertyList (~> 2.2.6) | ||
faraday (0.9.1) | ||
multipart-post (>= 1.2, < 3) | ||
her (0.6.8) | ||
activemodel (>= 3.0.0) | ||
activesupport (>= 3.0.0) | ||
faraday (~> 0.8) | ||
multi_json (~> 1.7) | ||
hiera (3.0.1) | ||
json_pure | ||
i18n (0.7.0) | ||
json (1.8.3) | ||
json_pure (1.8.2) | ||
librarian-puppet (2.2.1) | ||
librarianp (>= 0.6.3) | ||
puppet_forge (~> 1.0) | ||
rsync | ||
librarianp (0.6.3) | ||
thor (~> 0.15) | ||
metaclass (0.0.4) | ||
minitest (5.8.1) | ||
mocha (1.1.0) | ||
metaclass (~> 0.0.1) | ||
multi_json (1.11.2) | ||
multipart-post (2.0.0) | ||
puppet (4.2.2) | ||
facter (> 2.0, < 4) | ||
hiera (>= 2.0, < 4) | ||
json_pure | ||
puppet-lint (1.1.0) | ||
puppet-syntax (2.0.0) | ||
rake | ||
puppet_forge (1.0.5) | ||
her (~> 0.6.8) | ||
puppetlabs_spec_helper (0.10.3) | ||
mocha | ||
puppet-lint | ||
puppet-syntax | ||
rake | ||
rspec-puppet | ||
rake (10.4.2) | ||
rspec (3.3.0) | ||
rspec-core (~> 3.3.0) | ||
rspec-expectations (~> 3.3.0) | ||
rspec-mocks (~> 3.3.0) | ||
rspec-core (3.3.2) | ||
rspec-support (~> 3.3.0) | ||
rspec-expectations (3.3.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.3.0) | ||
rspec-mocks (3.3.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.3.0) | ||
rspec-puppet (2.2.0) | ||
rspec | ||
rspec-support (3.3.0) | ||
rsync (1.0.9) | ||
thor (0.19.1) | ||
thread_safe (0.3.5) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
dotenv (~> 2.0) | ||
facter (>= 1.7.0) | ||
librarian-puppet (~> 2.2) | ||
puppet (~> 4.2) | ||
puppet-lint (>= 1.0.0) | ||
puppetlabs_spec_helper (>= 0.8.2) | ||
|
||
BUNDLED WITH | ||
1.10.6 |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env ruby | ||
#^syntax detection | ||
|
||
forge "https://forgeapi.puppetlabs.com" | ||
|
||
# use dependencies defined in metadata.json | ||
metadata | ||
|
||
# use dependencies defined in Modulefile | ||
# modulefile | ||
|
||
# A module from the Puppet Forge | ||
# mod 'puppetlabs-stdlib' | ||
|
||
# A module from git | ||
# mod 'puppetlabs-ntp', | ||
# :git => 'git://github.com/puppetlabs/puppetlabs-ntp.git' | ||
|
||
# A module from a git branch/tag | ||
# mod 'puppetlabs-apt', | ||
# :git => 'https://github.com/puppetlabs/puppetlabs-apt.git', | ||
# :ref => '1.4.x' | ||
|
||
# A module from Github pre-packaged tarball | ||
# mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache' |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# rk_tomcat | ||
|
||
#### Table of Contents | ||
|
||
1. [Overview](#overview) | ||
2. [Module Description - What the module does and why it is useful](#module-description) | ||
3. [Setup - The basics of getting started with rk_tomcat](#setup) | ||
* [What rk_tomcat affects](#what-rk_tomcat-affects) | ||
* [Setup requirements](#setup-requirements) | ||
* [Beginning with rk_tomcat](#beginning-with-rk_tomcat) | ||
4. [Usage - Configuration options and additional functionality](#usage) | ||
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) | ||
5. [Limitations - OS compatibility, etc.](#limitations) | ||
6. [Development - Guide for contributing to the module](#development) | ||
|
||
## Overview | ||
|
||
A one-maybe-two sentence summary of what the module does/what problem it solves. | ||
This is your 30 second elevator pitch for your module. Consider including | ||
OS/Puppet version it works with. | ||
|
||
## Module Description | ||
|
||
If applicable, this section should have a brief description of the technology | ||
the module integrates with and what that integration enables. This section | ||
should answer the questions: "What does this module *do*?" and "Why would I use | ||
it?" | ||
|
||
If your module has a range of functionality (installation, configuration, | ||
management, etc.) this is the time to mention it. | ||
|
||
## Setup | ||
|
||
### What rk_tomcat affects | ||
|
||
* A list of files, packages, services, or operations that the module will alter, | ||
impact, or execute on the system it's installed on. | ||
* This is a great place to stick any warnings. | ||
* Can be in list or paragraph form. | ||
|
||
### Setup Requirements **OPTIONAL** | ||
|
||
If your module requires anything extra before setting up (pluginsync enabled, | ||
etc.), mention it here. | ||
|
||
### Beginning with rk_tomcat | ||
|
||
The very basic steps needed for a user to get the module up and running. | ||
|
||
If your most recent release breaks compatibility or requires particular steps | ||
for upgrading, you may wish to include an additional section here: Upgrading | ||
(For an example, see http://forge.puppetlabs.com/puppetlabs/firewall). | ||
|
||
## Usage | ||
|
||
Put the classes, types, and resources for customizing, configuring, and doing | ||
the fancy stuff with your module here. | ||
|
||
## Reference | ||
|
||
Here, list the classes, types, providers, facts, etc contained in your module. | ||
This section should include all of the under-the-hood workings of your module so | ||
people know what the module is touching on their system but don't need to mess | ||
with things. (We are working on automating this section!) | ||
|
||
## Limitations | ||
|
||
This is where you list OS compatibility, version compatibility, etc. | ||
|
||
## Development | ||
|
||
Since your module is awesome, other users will want to play with it. Let them | ||
know what the ground rules for contributing are. | ||
|
||
## Release Notes/Contributors/Etc **Optional** | ||
|
||
If you aren't using changelog, put your release notes here (though you should | ||
consider using changelog). You may also add any additional sections you feel are | ||
necessary or important to include here. Please use the `## ` header. |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'dotenv/tasks' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] | ||
|
||
desc "Validate manifests, templates, and ruby files" | ||
task :validate do | ||
Dir['manifests/**/*.pp'].each do |manifest| | ||
sh "puppet parser validate --noop #{manifest}" | ||
end | ||
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| | ||
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ | ||
end | ||
Dir['templates/**/*.erb'].each do |template| | ||
sh "erb -P -x -T '-' #{template} | ruby -c" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Class: rk_tomcat | ||
# =========================== | ||
# | ||
# Full description of class rk_tomcat 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 function 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 | ||
# -------- | ||
# | ||
# @example | ||
# class { 'rk_tomcat': | ||
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ], | ||
# } | ||
# | ||
# Authors | ||
# ------- | ||
# | ||
# Author Name <[email protected]> | ||
# | ||
# Copyright | ||
# --------- | ||
# | ||
# Copyright 2015 Your name here, unless otherwise noted. | ||
# | ||
class rk_tomcat { | ||
|
||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "fitnesskeeper/rk_tomcat", | ||
"version": "0.1.0", | ||
"author": "fitnesskeeper", | ||
"summary": "Customize an Amazon Linux instance for Tomcat application hosting", | ||
"license": "Apache-2.0", | ||
"source": "https://github.com/FitnessKeeper/puppet-rk_tomcat", | ||
"project_page": "https://github.com/FitnessKeeper/puppet-rk_tomcat", | ||
"issues_url": "https://github.com/FitnessKeeper/puppet-rk_tomcat/issues", | ||
"dependencies": [ | ||
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"}, | ||
{"name":"puppetlabs-tomcat","version_requirement":">= 1.3.2"}, | ||
{"name":"ripienaar-module_data","version_requirement":">= 0.0.3"} | ||
] | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# | ||
if [[ "${USER}" -ne 0 ]]; then | ||
echo "$0 must be run as root." | ||
exit 1 | ||
fi | ||
|
||
echo "### Patching system..." | ||
yum -y update | ||
|
||
echo "### Uninstalling upstream Puppet..." | ||
yum -y erase puppet | ||
|
||
echo "### Installing git..." | ||
yum -y install git | ||
|
||
cd ~ | ||
|
||
echo "### Cloning Tomcat platform configuration..." | ||
git clone https://github.com/FitnessKeeper/puppet-rk_tomcat.git rk_tomcat | ||
|
||
cd rk_tomcat | ||
|
||
echo "### Configuring RubyGems..." | ||
echo '--nodocument --bindir /usr/local/bin' >> /root/.gemrc | ||
|
||
echo "### Installing Bundler..." | ||
gem install bundler | ||
|
||
echo "### Installing other gem dependencies..." | ||
bundle install | ||
|
||
echo "### Installing Puppet dependencies..." | ||
librarian-puppet install | ||
|
||
echo "### Running Puppet agent..." | ||
puppet apply --modulepath "modules:${HOME}" -e 'class { "rk_tomcat": }' | ||
|
||
echo "### Disabling Puppet agent..." | ||
puppet resource service puppet ensure=stopped enable=false |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spec_helper' | ||
describe 'rk_tomcat' do | ||
|
||
context 'with defaults for all parameters' do | ||
it { should contain_class('rk_tomcat') } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'puppetlabs_spec_helper/module_spec_helper' |
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 |
---|---|---|
@@ -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 rk_tomcat |