pupcap 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +74 -0
- data/lib/pupcap/action/apply/Capfile +1 -1
- data/lib/pupcap/capistrano.rb +0 -1
- data/lib/pupcap/version.rb +1 -1
- metadata +3 -3
- data/README +0 -5
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Pupcap
|
2
|
+
|
3
|
+
|
4
|
+
Pupcap gem was created to use puppet without puppet master server. Pupcap uses [capistrano](https://github.com/capistrano/capistrano) to manage remote server, [hiera](http://projects.puppetlabs.com/projects/hiera) to make puppet configuration easier, has ability to use different roles (app, db) and multistaging (production, stage). It also use [librarian-puppet](https://github.com/rodjek/librarian-puppet) to manage puppet modules.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
$ gem install pupcap
|
9
|
+
|
10
|
+
### Init
|
11
|
+
|
12
|
+
To init pupcap project and create file structure:
|
13
|
+
|
14
|
+
$ mkdir demo && cd demo && pupcap init .
|
15
|
+
|
16
|
+
After executing of this command you will have such file structure:
|
17
|
+
|
18
|
+
.keys/ # ssh keys to remote hosts
|
19
|
+
hieradata/ # hiera data
|
20
|
+
common.yaml # attributes shared for all environments
|
21
|
+
development.yaml # attributes for development
|
22
|
+
manifests/ # puppet manifests
|
23
|
+
site.pp # configuration example
|
24
|
+
modules/ # librarian-puppet modules
|
25
|
+
site-modules/ # puppet modules
|
26
|
+
Capfile # deploy config
|
27
|
+
Puppetfile # list of librarian-puppet modules
|
28
|
+
Vagrantfile # vagrant config to test the pupcap project configuration
|
29
|
+
hiera.yaml # hiera config
|
30
|
+
prepare.sh.erb # script to prepare remote server
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
### Prepare
|
36
|
+
|
37
|
+
This command installs ruby, rubygems, puppet and librarian-puppet on remote server. It's not necessary if such software is already installed on your server.
|
38
|
+
|
39
|
+
$ puppcap <captask> prepare
|
40
|
+
|
41
|
+
It will:
|
42
|
+
|
43
|
+
* generate ssh keys pair and save them into `.keys`
|
44
|
+
* add public key from `.keys` to the host's `.authorized_keys` if there is no pubkey yet
|
45
|
+
* execute prepare.sh.erb
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
### Apply
|
50
|
+
|
51
|
+
Executes installation of the Puppet confiration on remote server.
|
52
|
+
|
53
|
+
#Capfile
|
54
|
+
|
55
|
+
task :production do
|
56
|
+
set :environment, 'production'
|
57
|
+
role :app, 'app.example.com'
|
58
|
+
role :db, 'db.example.com'
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
$ pupcap production apply
|
63
|
+
|
64
|
+
Configurations from manifests/{app,db}.pp will be deployed on app.example.com and db.example.com with production environment.
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
## Vagrant
|
69
|
+
|
70
|
+
After pupcap initialization you will have `Vagrantfile` and `Capfile` already configured to deploy Puppet configuration to Vagrant VM.
|
71
|
+
|
72
|
+
$ pupcap vagrant prepare
|
73
|
+
$ pupcap vagrant apply
|
74
|
+
|
@@ -31,7 +31,7 @@ namespace :apply do
|
|
31
31
|
|
32
32
|
task :prepare do
|
33
33
|
run <<-EOF.compact
|
34
|
-
test -d /etc/puppet || (#{sudo} mkdir -p /etc/puppet && #{sudo} chown root:puppet /
|
34
|
+
test -d /etc/puppet || (#{sudo} mkdir -p /etc/puppet && #{sudo} chown root:puppet /etc/puppet) ;
|
35
35
|
test -f #{pupcap_hiera_config} && #{sudo} ln -nsf #{pupcap_hiera_config} /etc/puppet/hiera.yaml ;
|
36
36
|
#{sudo} rsync -as --delete #{pupcap_path}/hieradata/ /etc/puppet/hieradata/ ;
|
37
37
|
|
data/lib/pupcap/capistrano.rb
CHANGED
data/lib/pupcap/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupcap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -85,7 +85,7 @@ extra_rdoc_files: []
|
|
85
85
|
files:
|
86
86
|
- .gitignore
|
87
87
|
- Gemfile
|
88
|
-
- README
|
88
|
+
- README.md
|
89
89
|
- Rakefile
|
90
90
|
- bin/pupcap
|
91
91
|
- lib/pupcap.rb
|