aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/facter/facter/add_facter_gemspec.patch23
-rw-r--r--recipes-support/facter/facter_2.3.0.bb19
-rw-r--r--recipes-support/hiera/hiera/add_hiera_gemspec.patch23
-rw-r--r--recipes-support/hiera/hiera_1.3.4.bb20
-rw-r--r--recipes-support/puppet/README75
-rw-r--r--recipes-support/puppet/puppet/add_puppet_gemspec.patch23
-rw-r--r--recipes-support/puppet/puppet/puppet.conf9
-rw-r--r--recipes-support/puppet/puppet_3.7.3.bb40
-rw-r--r--recipes-support/ruby-shadow/ruby-shadow_git.bb23
9 files changed, 255 insertions, 0 deletions
diff --git a/recipes-support/facter/facter/add_facter_gemspec.patch b/recipes-support/facter/facter/add_facter_gemspec.patch
new file mode 100644
index 00000000..a5095cbe
--- /dev/null
+++ b/recipes-support/facter/facter/add_facter_gemspec.patch
@@ -0,0 +1,23 @@
+diff -urN facter-2.3.0_ori/facter.gemspec facter-2.3.0/facter.gemspec
+--- facter-2.3.0_ori/facter.gemspec 1970-01-01 08:00:00.000000000 +0800
++++ facter-2.3.0/facter.gemspec 2014-11-12 14:30:07.000000000 +0800
+@@ -0,0 +1,19 @@
++$:.unshift(File.dirname(__FILE__) + '/lib')
++require 'facter/version'
++
++Gem::Specification.new do |s|
++ s.name = 'facter'
++ s.version = Facter::FACTERVERSION
++ s.platform = Gem::Platform::RUBY
++ s.summary = 'Facter gathers basic facts about nodes (systems)'
++ s.description = s.summary
++ s.author = 'Yang Haibo'
++ s.email = 'b40869@freescale.com'
++ s.homepage = 'http://puppetlabs.com/facter'
++ s.license = 'Apache 2.0'
++
++ s.bindir = 'bin'
++ s.executables = ['facter']
++ s.require_path = 'lib'
++ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
++end
diff --git a/recipes-support/facter/facter_2.3.0.bb b/recipes-support/facter/facter_2.3.0.bb
new file mode 100644
index 00000000..b5a46e74
--- /dev/null
+++ b/recipes-support/facter/facter_2.3.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Facter gathers basic facts about nodes (systems)"
+HOMEPAGE = "http://puppetlabs.com/facter"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ce69a88023d6f6ab282865ddef9f1e41"
+
+SRC_URI = " \
+ http://downloads.puppetlabs.com/facter/facter-${PV}.tar.gz \
+ file://add_facter_gemspec.patch \
+"
+SRC_URI[md5sum] = "7bb6dbeaef86cd79300b4723c06932bc"
+SRC_URI[sha256sum] = "a91ea915b276172e002a8670684e5c6be7df1dfdd55db6937d27fffad70c5e51"
+
+inherit ruby
+
+DEPENDS += " \
+ ruby \
+"
+
+RUBY_INSTALL_GEMS = "facter-${PV}.gem"
diff --git a/recipes-support/hiera/hiera/add_hiera_gemspec.patch b/recipes-support/hiera/hiera/add_hiera_gemspec.patch
new file mode 100644
index 00000000..7e302cfd
--- /dev/null
+++ b/recipes-support/hiera/hiera/add_hiera_gemspec.patch
@@ -0,0 +1,23 @@
+diff -urN hiera-1.3.4_ori/hiera.gemspec hiera-1.3.4/hiera.gemspec
+--- hiera-1.3.4_ori/hiera.gemspec 1970-01-01 08:00:00.000000000 +0800
++++ hiera-1.3.4/hiera.gemspec 2014-11-12 14:30:07.000000000 +0800
+@@ -0,0 +1,19 @@
++$:.unshift(File.dirname(__FILE__) + '/lib')
++require 'hiera/version'
++
++Gem::Specification.new do |s|
++ s.name = 'hiera'
++ s.version = Hiera::VERSION
++ s.platform = Gem::Platform::RUBY
++ s.summary = 'A simple pluggable Hierarchical Database.'
++ s.description = s.summary
++ s.author = 'Yang Haibo'
++ s.email = 'b40869@freescale.com'
++ s.homepage = 'https://projects.puppetlabs.com/projects/hiera'
++ s.license = 'Apache 2.0'
++
++ s.bindir = 'bin'
++ s.executables = ['hiera']
++ s.require_path = 'lib'
++ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
++end
diff --git a/recipes-support/hiera/hiera_1.3.4.bb b/recipes-support/hiera/hiera_1.3.4.bb
new file mode 100644
index 00000000..eb633ff1
--- /dev/null
+++ b/recipes-support/hiera/hiera_1.3.4.bb
@@ -0,0 +1,20 @@
+SUMMARY = "A simple pluggable Hierarchical Database"
+HOMEPAGE = "https://projects.puppetlabs.com/projects/hiera"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8ac92c91fbec097f798223679c1a7491"
+
+SRC_URI = " \
+ https://downloads.puppetlabs.com/hiera/hiera-${PV}.tar.gz \
+ file://add_hiera_gemspec.patch \
+"
+SRC_URI[md5sum] = "6abccc518edb55291a63129ef30888cd"
+SRC_URI[sha256sum] = "d3ecbfedc7d8493fd00c7dd624efbb225705d289442fe7706cb81a3a7230e70e"
+
+
+inherit ruby
+
+DEPENDS += " \
+ ruby \
+"
+
+RUBY_INSTALL_GEMS = "hiera-${PV}.gem"
diff --git a/recipes-support/puppet/README b/recipes-support/puppet/README
new file mode 100644
index 00000000..2de808a3
--- /dev/null
+++ b/recipes-support/puppet/README
@@ -0,0 +1,75 @@
+What is Puppet
+------------------------
+Puppet is a configuration management system that allows you to define the
+state of your IT infrastructure, then automatically enforces the correct state.
+
+
+Basic Requirements
+------------------------
+Ruby 1.8.7 or later
+Facter 1.7.0 or later
+Hiera 1.0 or later
+The json gem (any modern version)
+
+
+Simple Demo
+------------------------
+In this simple demo, we have a CA master server named 'master' and ip is 192.168.2.83
+and an agent node named 'agent', ip is 192.168.2.30.
+
+On master server, file 'test.cfg' is under /etc/puppet/files/, puppet will sync this
+file to /opt/ folder on agent node.
+
+Step 1: Configure Puppet CA Master Server
+1) create a puppet group and user
+$ puppet resource group puppet ensure=presnt
+$ puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
+
+2) create the CA certificate and the puppet master certificate
+$ puppet master --verbose --no-daemonize
+(Once it says Notice: Starting Puppet master version <VERSION>, type ctrl-C to kill the process)
+
+3) $ vi /etc/hosts
+add new line:
+192.168.2.30 agent
+
+4) start puppet master
+$ puppet master --verbose --no-daemonize &
+
+
+Step 2: Config Puppet Agent Node
+1) Edit puppet.conf
+$ echo "[main]
+server = master" >> /etc/puppet/puppet.conf
+
+2) $ vi /etc/hosts
+add new line:
+192.168.2.83 master
+
+3) Request certificates
+$ puppet agent --test --ca_server=t2080qds -w 60
+(Accept the request on master server by this command: puppet cert sign --all)
+
+
+Step 3: Add site map on master
+1) Edit /etc/puppet/fileserver.conf to make /etc/puppet/files available
+$ mkdir /etc/puppet/files
+$ touch /etc/puppet/files/test.cfg
+$ vi /etc/puppet/fileserver.conf
+add following lines:
+[extra_files]
+ path /etc/puppet/files
+ allow *
+
+2) Add a new sitemap
+$ vi /etc/puppet/manifests/site.pp
+add follwing lines:
+file
+{ "/opt/test.cfg":
+source => "puppet:///extra_files/test.cfg",
+}
+
+
+Step 4: Run puppet on agent
+$ puppet agent --test
+$ ls /opt/
diff --git a/recipes-support/puppet/puppet/add_puppet_gemspec.patch b/recipes-support/puppet/puppet/add_puppet_gemspec.patch
new file mode 100644
index 00000000..a5c8e3b3
--- /dev/null
+++ b/recipes-support/puppet/puppet/add_puppet_gemspec.patch
@@ -0,0 +1,23 @@
+diff -urN puppet-3.7.3_ori/puppet.gemspec puppet-3.7.3/puppet.gemspec
+--- puppet-3.7.3_ori/puppet.gemspec 1970-01-01 08:00:00.000000000 +0800
++++ puppet-3.7.3/puppet.gemspec 2014-11-12 14:30:07.000000000 +0800
+@@ -0,0 +1,19 @@
++$:.unshift(File.dirname(__FILE__) + '/lib')
++require 'puppet/version'
++
++Gem::Specification.new do |s|
++ s.name = 'puppet'
++ s.version = Puppet::PUPPETVERSION
++ s.platform = Gem::Platform::RUBY
++ s.summary = 'Open source Puppet is a configuration management system'
++ s.description = s.summary
++ s.author = 'Yang Haibo'
++ s.email = 'b40869@freescale.com'
++ s.homepage = 'https://puppetlabs.com/puppet/puppet-open-source'
++ s.license = 'Apache 2.0'
++
++ s.bindir = 'bin'
++ s.executables = ['puppet', 'extlookup2hiera']
++ s.require_path = 'lib'
++ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
++end
diff --git a/recipes-support/puppet/puppet/puppet.conf b/recipes-support/puppet/puppet/puppet.conf
new file mode 100644
index 00000000..efe143ce
--- /dev/null
+++ b/recipes-support/puppet/puppet/puppet.conf
@@ -0,0 +1,9 @@
+[main]
+logdir=/var/log/puppet
+vardir=/var/lib/puppet
+ssldir=/var/lib/puppet/ssl
+rundir=/var/run/puppet
+factpath=$vardir/lib/facter
+
+[agent]
+server=puppet-server
diff --git a/recipes-support/puppet/puppet_3.7.3.bb b/recipes-support/puppet/puppet_3.7.3.bb
new file mode 100644
index 00000000..c1743e6e
--- /dev/null
+++ b/recipes-support/puppet/puppet_3.7.3.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Open source Puppet is a configuration management system"
+HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f257790c70561550fd666c6e0044fd89"
+
+SRC_URI = " \
+ https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \
+ file://add_puppet_gemspec.patch \
+ file://puppet.conf \
+"
+SRC_URI[md5sum] = "cc294da1d51df07bcc7f6cf78bd90ce0"
+SRC_URI[sha256sum] = "4a3bd7ddb51072c3dd898a8de158cde204a2d8fd0b84e8ac806b84c074348637"
+
+inherit ruby
+
+DEPENDS += " \
+ ruby \
+ facter \
+ hiera \
+"
+
+RDEPENDS_${PN} += " \
+ ruby \
+ facter \
+ hiera \
+ ruby-shadow \
+"
+
+RUBY_INSTALL_GEMS = "puppet-${PV}.gem"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/puppet
+ install -d ${D}${sysconfdir}/puppet/manifests
+ install -d ${D}${sysconfdir}/puppet/modules
+
+ install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/
+ install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/
+ install -m 655 ${S}/conf/tagmail.conf ${D}${sysconfdir}/puppet/
+ install -m 655 ${WORKDIR}/puppet.conf ${D}${sysconfdir}/puppet/
+}
diff --git a/recipes-support/ruby-shadow/ruby-shadow_git.bb b/recipes-support/ruby-shadow/ruby-shadow_git.bb
new file mode 100644
index 00000000..72be016c
--- /dev/null
+++ b/recipes-support/ruby-shadow/ruby-shadow_git.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Shadow Password Module"
+HOMEPAGE = "https://github.com/apalmblad/ruby-shadow"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=137882914e5269b7268f0fe8e28a3f89"
+
+PV = "2.4.1"
+
+SRC_URI = "git://github.com/apalmblad/ruby-shadow.git"
+SRCREV = "4231a4838fd50022b112838f114ee0586e119605"
+S = "${WORKDIR}/git"
+
+inherit ruby
+
+DEPENDS += " \
+ ruby \
+"
+
+RDEPENDS_${PN} += " \
+ ruby \
+"
+
+RUBY_INSTALL_GEMS = "ruby-shadow-${PV}.gem"
+FILES_${PN}-dbg += "/usr/lib64/ruby/gems/*/gems/ruby-shadow-${PV}/.debug/shadow.so"