-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
2e9cad2
commit c3ac7f6
Showing
8 changed files
with
166 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,76 @@ | ||
# luci | ||
|
||
#### 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 luci](#setup) | ||
* [What luci affects](#what-luci-affects) | ||
* [Setup requirements](#setup-requirements) | ||
* [Beginning with luci](#beginning-with-luci) | ||
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 | ||
|
||
This module installs the luci cluster management application. | ||
|
||
## Module Description | ||
|
||
The cluster management application is installed on the target node, hostfile entries are | ||
created for the client systems and the firewall port is opened to allow connections from | ||
the client systems. | ||
|
||
## Setup | ||
|
||
### What luci affects | ||
* packages: luci css | ||
* files: /etc/hosts | ||
* service: luci | ||
|
||
### Beginning with luci | ||
|
||
Building the module: | ||
To build the RPM of the module, you will need to execute the build.sh script in | ||
the root folder of the module. | ||
|
||
RHN Satellite: | ||
If you want to test this module on a machine with the standard installation | ||
method (RHN Satellite) you need to upload it to the satellite server. See | ||
https://platformbouwteam.atlassian.net/wiki/display/PLAT/RPM+uploaden+naar+de+satellite | ||
|
||
Local: | ||
If you want to test this module on a machine without the satellite, you will | ||
need to copy the RPM to the node and localinstall it with yum. | ||
|
||
## Usage | ||
|
||
if $h['profiles::clustermgr::clustermgr_present'] == 'yes' { | ||
|
||
if ! defined(Class['rhnchannel::params']) { | ||
class {'rhnchannel::params': | ||
password => $h['rhn_channel::params::password'], | ||
user => $h['rhn_channel::params::user'], | ||
} | ||
} | ||
|
||
$channel = $h['rhn_channel::params::rhelrs'] | ||
if ! defined(Rhnchannel::Channel[$channel]) { | ||
rhnchannel::channel {$channel:} | ||
} | ||
|
||
class{'::luci::params': | ||
clusternodes => $h['luci::params::clusternodes'], | ||
require => Rhnchannel::Channel[$channel], | ||
} | ||
-> | ||
class{'::luci':} | ||
|
||
} # if luci present | ||
|
||
## Reference | ||
|
||
class luci | ||
class luci::params |
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 'rubygems' | ||
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,14 @@ | ||
class luci inherits luci::params { | ||
|
||
package {$luci_packages: | ||
ensure => present, | ||
} | ||
|
||
service {$luci_services: | ||
ensure => running, | ||
enable => true, | ||
} | ||
|
||
|
||
} | ||
|
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,9 @@ | ||
class luci::params( | ||
$luci_packages = ['luci','ccs'], | ||
$luci_services = ['luci'], | ||
){ | ||
|
||
include stdlib | ||
|
||
|
||
} |
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,13 @@ | ||
{ | ||
"name": "windit-luci", | ||
"version": "1.0.0-1", | ||
"summary": "Installs and configures luci for RHCS management", | ||
"license": "Apache 2.0", | ||
"dependencies": [ | ||
{ | ||
"version_range": ">= 4.3.2", | ||
"name": "puppetlabs-stdlib" | ||
} | ||
] | ||
} | ||
|
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 'luci' do | ||
|
||
context 'with defaults for all parameters' do | ||
it { should contain_class('luci') } | ||
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,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 |
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 luci |