Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add forge related modulefile and documentation.

  • Loading branch information...
commit 09dc5e3acc7c332fba171f6f51ad2d545702ec90 1 parent 50fc6c6
@nanliu nanliu authored
View
15 LICENSE
@@ -0,0 +1,15 @@
+Copyright (C) 2012 Puppet Labs Inc
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
View
15 Modulefile
@@ -0,0 +1,15 @@
+name 'puppetlabs-razor'
+version '0.1.0'
+source 'git@github.com:puppetlabs/puppetlabs-razor.git'
+author 'Puppet Labs'
+license 'Apache 2.0'
+summary 'Razor puppet module'
+description 'Razor provisioning system puppet installation module'
+project_page 'https://github.com/puppetlabs/puppetlabs-razor'
+
+## Add dependencies, if any:
+dependency 'puppetlabs/stdlib', '>= 2.0.0'
+dependency 'puppetlabs/mongodb', '>= 0.1.1'
+dependency 'puppetlabs/nodejs', '>= 0.1.1'
+dependency 'puppetlabs/tftp', '>= 0.1.0'
+dependency 'puppetlabs/vcsrepo', '>= 0.0.5'
View
13 README.md
@@ -1,7 +1,6 @@
# Razor Module
-Puppet Razor module will perform the installation of Razor software dependency
-on Debian Wheezy system.
+Puppet Razor module will perform the installation of Razor on Debian Wheezy system.
## Installation
@@ -10,10 +9,10 @@ https://github.com/puppetlabs/puppet-razor
Here's a list of dependency for razor module:
* [apt module](https://github.com/puppetlabs/puppet-apt)
+* [Mongodb module](https://github.com/puppetlabs/puppetlabs-mongodb)
+* [Node.js module](https://github.com/puppetlabs/puppetlabs-nodejs)
* [stdlib module](https://github.com/puppetlabs/puppetlabs-stdlib)
-* [Node.js module](https://github.com/nanliu/puppet-nodejs)
-* [Mongodb module](https://github.com/nanliu/puppet-mongodb)
-* [tftp module](https://github.com/nanliu/puppet-tftp)
+* [tftp module](https://github.com/puppetlabs/puppetlabs-tftp)
Puppet master, add razor class to target node:
@@ -25,6 +24,6 @@ Puppet apply, apply test manifests:
puppet apply razor/tests/init.pp
-git clone razor private repo to the system.
+## Razor Usage
- git clone git@github.com:nanliu/Razor.git
+See Razor project wiki pages.
View
34 Rakefile
@@ -0,0 +1,34 @@
+require 'rubygems'
+require 'rake'
+require 'rspec/core/rake_task'
+
+task :default do
+ system("rake -T")
+end
+
+task :specs => [:spec]
+
+desc "Run all rspec-puppet tests"
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = ['--color']
+ # ignores fixtures directory.
+ t.pattern = 'spec/{classes,defines,unit}/**/*_spec.rb'
+end
+
+desc "Build puppet module package"
+task :build do
+ # This will be deprecated once puppet-module is a face.
+ begin
+ Gem::Specification.find_by_name('puppet-module')
+ rescue Gem::LoadError, NoMethodError
+ require 'puppet/face'
+ pmod = Puppet::Face['module', :current]
+ pmod.build('./')
+ end
+end
+
+desc "Check puppet manifests with puppet-lint"
+task :lint do
+ system("puppet-lint manifests")
+ system("puppet-lint tests")
+end
View
21 manifests/init.pp
@@ -65,5 +65,26 @@
require => Class['nodejs'],
}
+ file { '/opt/razor':
+ ensure => directory,
+ mode => '0755',
+ }
+
+ vcsrepo { '/opt/razor':
+ ensure => latest,
+ provider => git,
+ source => 'git://github.com/puppetlabs/Razor.git',
+ }
+
+ nodejs::npm { '/opt/razor:express':
+ ensure => present,
+ require => File['/opt/razor'],
+ }
+
+ nodejs::npm { '/opt/razor:mime':
+ ensure => present,
+ require => File['/opt/razor'],
+ }
+
include mongodb
}
View
0  spec/fixtures/manifests/site.pp
No changes.
View
1  spec/fixtures/modules/razor
View
17 spec/spec_helper.rb
@@ -0,0 +1,17 @@
+require 'puppet'
+require 'mocha'
+require 'rspec'
+require 'rspec-puppet'
+
+def param_value(subject, type, title, param)
+ subject.resource(type, title).send(:parameters)[param.to_sym]
+end
+
+RSpec.configure do |c|
+ c.module_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/modules'))
+ # Using an empty site.pp file to avoid: https://github.com/rodjek/rspec-puppet/issues/15
+ c.manifest_dir = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/manifests'))
+ # Use fixtures for config file mainly to support using our own hiera.yaml settings.
+ # Pending: https://github.com/rodjek/rspec-puppet/pull/21
+ # c.config = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/puppet.conf'))
+end
Please sign in to comment.
Something went wrong with that request. Please try again.