summaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-08-19 22:56:11 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-08-20 13:38:48 -0400
commit1aa30310259027ebb87ee95ef914ca3de55d6a09 (patch)
tree72a940aacd777a4512771abddcd30637c29b57b7 /recipes-support
parentbd7a3f804950ae454d025aa8773789441a63820c (diff)
downloadmeta-cloud-services-1aa30310259027ebb87ee95ef914ca3de55d6a09.tar.gz
puppet: move to base layer
Puppet can be used by many 'cloud services', it is not openstack specific, so moving puppet and puppet related recipes to the meta-cloud-services base layer. This allows either internal sub-layers found in meta-cloud-services or external layers to include meta-cloud-services without being burdened by bbappends and configs found in meta-openstack. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
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 0000000..a5095cb
--- /dev/null
+++ b/recipes-support/facter/facter/add_facter_gemspec.patch
@@ -0,0 +1,23 @@
1diff -urN facter-2.3.0_ori/facter.gemspec facter-2.3.0/facter.gemspec
2--- facter-2.3.0_ori/facter.gemspec 1970-01-01 08:00:00.000000000 +0800
3+++ facter-2.3.0/facter.gemspec 2014-11-12 14:30:07.000000000 +0800
4@@ -0,0 +1,19 @@
5+$:.unshift(File.dirname(__FILE__) + '/lib')
6+require 'facter/version'
7+
8+Gem::Specification.new do |s|
9+ s.name = 'facter'
10+ s.version = Facter::FACTERVERSION
11+ s.platform = Gem::Platform::RUBY
12+ s.summary = 'Facter gathers basic facts about nodes (systems)'
13+ s.description = s.summary
14+ s.author = 'Yang Haibo'
15+ s.email = 'b40869@freescale.com'
16+ s.homepage = 'http://puppetlabs.com/facter'
17+ s.license = 'Apache 2.0'
18+
19+ s.bindir = 'bin'
20+ s.executables = ['facter']
21+ s.require_path = 'lib'
22+ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
23+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 0000000..b5a46e7
--- /dev/null
+++ b/recipes-support/facter/facter_2.3.0.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Facter gathers basic facts about nodes (systems)"
2HOMEPAGE = "http://puppetlabs.com/facter"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=ce69a88023d6f6ab282865ddef9f1e41"
5
6SRC_URI = " \
7 http://downloads.puppetlabs.com/facter/facter-${PV}.tar.gz \
8 file://add_facter_gemspec.patch \
9"
10SRC_URI[md5sum] = "7bb6dbeaef86cd79300b4723c06932bc"
11SRC_URI[sha256sum] = "a91ea915b276172e002a8670684e5c6be7df1dfdd55db6937d27fffad70c5e51"
12
13inherit ruby
14
15DEPENDS += " \
16 ruby \
17"
18
19RUBY_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 0000000..7e302cf
--- /dev/null
+++ b/recipes-support/hiera/hiera/add_hiera_gemspec.patch
@@ -0,0 +1,23 @@
1diff -urN hiera-1.3.4_ori/hiera.gemspec hiera-1.3.4/hiera.gemspec
2--- hiera-1.3.4_ori/hiera.gemspec 1970-01-01 08:00:00.000000000 +0800
3+++ hiera-1.3.4/hiera.gemspec 2014-11-12 14:30:07.000000000 +0800
4@@ -0,0 +1,19 @@
5+$:.unshift(File.dirname(__FILE__) + '/lib')
6+require 'hiera/version'
7+
8+Gem::Specification.new do |s|
9+ s.name = 'hiera'
10+ s.version = Hiera::VERSION
11+ s.platform = Gem::Platform::RUBY
12+ s.summary = 'A simple pluggable Hierarchical Database.'
13+ s.description = s.summary
14+ s.author = 'Yang Haibo'
15+ s.email = 'b40869@freescale.com'
16+ s.homepage = 'https://projects.puppetlabs.com/projects/hiera'
17+ s.license = 'Apache 2.0'
18+
19+ s.bindir = 'bin'
20+ s.executables = ['hiera']
21+ s.require_path = 'lib'
22+ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
23+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 0000000..eb633ff
--- /dev/null
+++ b/recipes-support/hiera/hiera_1.3.4.bb
@@ -0,0 +1,20 @@
1SUMMARY = "A simple pluggable Hierarchical Database"
2HOMEPAGE = "https://projects.puppetlabs.com/projects/hiera"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=8ac92c91fbec097f798223679c1a7491"
5
6SRC_URI = " \
7 https://downloads.puppetlabs.com/hiera/hiera-${PV}.tar.gz \
8 file://add_hiera_gemspec.patch \
9"
10SRC_URI[md5sum] = "6abccc518edb55291a63129ef30888cd"
11SRC_URI[sha256sum] = "d3ecbfedc7d8493fd00c7dd624efbb225705d289442fe7706cb81a3a7230e70e"
12
13
14inherit ruby
15
16DEPENDS += " \
17 ruby \
18"
19
20RUBY_INSTALL_GEMS = "hiera-${PV}.gem"
diff --git a/recipes-support/puppet/README b/recipes-support/puppet/README
new file mode 100644
index 0000000..2de808a
--- /dev/null
+++ b/recipes-support/puppet/README
@@ -0,0 +1,75 @@
1What is Puppet
2------------------------
3Puppet is a configuration management system that allows you to define the
4state of your IT infrastructure, then automatically enforces the correct state.
5
6
7Basic Requirements
8------------------------
9Ruby 1.8.7 or later
10Facter 1.7.0 or later
11Hiera 1.0 or later
12The json gem (any modern version)
13
14
15Simple Demo
16------------------------
17In this simple demo, we have a CA master server named 'master' and ip is 192.168.2.83
18and an agent node named 'agent', ip is 192.168.2.30.
19
20On master server, file 'test.cfg' is under /etc/puppet/files/, puppet will sync this
21file to /opt/ folder on agent node.
22
23Step 1: Configure Puppet CA Master Server
241) create a puppet group and user
25$ puppet resource group puppet ensure=presnt
26$ puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
27
282) create the CA certificate and the puppet master certificate
29$ puppet master --verbose --no-daemonize
30(Once it says Notice: Starting Puppet master version <VERSION>, type ctrl-C to kill the process)
31
323) $ vi /etc/hosts
33add new line:
34192.168.2.30 agent
35
364) start puppet master
37$ puppet master --verbose --no-daemonize &
38
39
40Step 2: Config Puppet Agent Node
411) Edit puppet.conf
42$ echo "[main]
43server = master" >> /etc/puppet/puppet.conf
44
452) $ vi /etc/hosts
46add new line:
47192.168.2.83 master
48
493) Request certificates
50$ puppet agent --test --ca_server=t2080qds -w 60
51(Accept the request on master server by this command: puppet cert sign --all)
52
53
54Step 3: Add site map on master
551) Edit /etc/puppet/fileserver.conf to make /etc/puppet/files available
56$ mkdir /etc/puppet/files
57$ touch /etc/puppet/files/test.cfg
58$ vi /etc/puppet/fileserver.conf
59add following lines:
60[extra_files]
61 path /etc/puppet/files
62 allow *
63
642) Add a new sitemap
65$ vi /etc/puppet/manifests/site.pp
66add follwing lines:
67file
68{ "/opt/test.cfg":
69source => "puppet:///extra_files/test.cfg",
70}
71
72
73Step 4: Run puppet on agent
74$ puppet agent --test
75$ 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 0000000..a5c8e3b
--- /dev/null
+++ b/recipes-support/puppet/puppet/add_puppet_gemspec.patch
@@ -0,0 +1,23 @@
1diff -urN puppet-3.7.3_ori/puppet.gemspec puppet-3.7.3/puppet.gemspec
2--- puppet-3.7.3_ori/puppet.gemspec 1970-01-01 08:00:00.000000000 +0800
3+++ puppet-3.7.3/puppet.gemspec 2014-11-12 14:30:07.000000000 +0800
4@@ -0,0 +1,19 @@
5+$:.unshift(File.dirname(__FILE__) + '/lib')
6+require 'puppet/version'
7+
8+Gem::Specification.new do |s|
9+ s.name = 'puppet'
10+ s.version = Puppet::PUPPETVERSION
11+ s.platform = Gem::Platform::RUBY
12+ s.summary = 'Open source Puppet is a configuration management system'
13+ s.description = s.summary
14+ s.author = 'Yang Haibo'
15+ s.email = 'b40869@freescale.com'
16+ s.homepage = 'https://puppetlabs.com/puppet/puppet-open-source'
17+ s.license = 'Apache 2.0'
18+
19+ s.bindir = 'bin'
20+ s.executables = ['puppet', 'extlookup2hiera']
21+ s.require_path = 'lib'
22+ s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*')
23+end
diff --git a/recipes-support/puppet/puppet/puppet.conf b/recipes-support/puppet/puppet/puppet.conf
new file mode 100644
index 0000000..efe143c
--- /dev/null
+++ b/recipes-support/puppet/puppet/puppet.conf
@@ -0,0 +1,9 @@
1[main]
2logdir=/var/log/puppet
3vardir=/var/lib/puppet
4ssldir=/var/lib/puppet/ssl
5rundir=/var/run/puppet
6factpath=$vardir/lib/facter
7
8[agent]
9server=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 0000000..c1743e6
--- /dev/null
+++ b/recipes-support/puppet/puppet_3.7.3.bb
@@ -0,0 +1,40 @@
1SUMMARY = "Open source Puppet is a configuration management system"
2HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=f257790c70561550fd666c6e0044fd89"
5
6SRC_URI = " \
7 https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \
8 file://add_puppet_gemspec.patch \
9 file://puppet.conf \
10"
11SRC_URI[md5sum] = "cc294da1d51df07bcc7f6cf78bd90ce0"
12SRC_URI[sha256sum] = "4a3bd7ddb51072c3dd898a8de158cde204a2d8fd0b84e8ac806b84c074348637"
13
14inherit ruby
15
16DEPENDS += " \
17 ruby \
18 facter \
19 hiera \
20"
21
22RDEPENDS_${PN} += " \
23 ruby \
24 facter \
25 hiera \
26 ruby-shadow \
27"
28
29RUBY_INSTALL_GEMS = "puppet-${PV}.gem"
30
31do_install_append() {
32 install -d ${D}${sysconfdir}/puppet
33 install -d ${D}${sysconfdir}/puppet/manifests
34 install -d ${D}${sysconfdir}/puppet/modules
35
36 install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/
37 install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/
38 install -m 655 ${S}/conf/tagmail.conf ${D}${sysconfdir}/puppet/
39 install -m 655 ${WORKDIR}/puppet.conf ${D}${sysconfdir}/puppet/
40}
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 0000000..72be016
--- /dev/null
+++ b/recipes-support/ruby-shadow/ruby-shadow_git.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Shadow Password Module"
2HOMEPAGE = "https://github.com/apalmblad/ruby-shadow"
3LICENSE = "PD"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=137882914e5269b7268f0fe8e28a3f89"
5
6PV = "2.4.1"
7
8SRC_URI = "git://github.com/apalmblad/ruby-shadow.git"
9SRCREV = "4231a4838fd50022b112838f114ee0586e119605"
10S = "${WORKDIR}/git"
11
12inherit ruby
13
14DEPENDS += " \
15 ruby \
16"
17
18RDEPENDS_${PN} += " \
19 ruby \
20"
21
22RUBY_INSTALL_GEMS = "ruby-shadow-${PV}.gem"
23FILES_${PN}-dbg += "/usr/lib64/ruby/gems/*/gems/ruby-shadow-${PV}/.debug/shadow.so"