masterbaker 0.7.8 → 0.9.0
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.
- checksums.yaml +4 -4
- data/README.md +18 -18
- data/lib/masterbaker/cli.rb +1 -1
- data/lib/masterbaker/config.rb +5 -1
- data/lib/masterbaker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cb6d8b2217c6936eed3413e294d3f28ff0111dd
|
4
|
+
data.tar.gz: f11f0dfeae51472af02431c55d7ba880148d014d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69aa471f4e988f54f296c2a1fb1aa9632dd746cb60fc134b2cdfa4ce93755b8f765aa43a3f9c25061172101ace63bd1182788c2a0660e7c2af2a9c5d60d3b1f8
|
7
|
+
data.tar.gz: eadaec54939873dd0eee6c5799151d6eefa4c4fe5501077706898f0ee21e7a8ab771c5fc7bca46bb7f9901e5300e8974db1776eac62a6adf1747dd2200ebfa3b
|
data/README.md
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#
|
1
|
+
# Masterbaker
|
2
2
|
|
3
|
-
|
3
|
+
Masterbaker spawned from the [Soloist](https://github.com/mkocher/soloist) project, and lets you quickly and easily converge [Chef](http://opscode.com/chef) recipes using [chef-solo](http://wiki.opscode.com/display/chef/Chef+Solo). It does not require a Chef server, but can exploit [community cookbooks](http://community.opscode.com/cookbooks), github-hosted cookbooks and locally-sourced cookbooks through [Librarian](https://github.com/applicationsonline/librarian).
|
4
4
|
|
5
|
-
|
5
|
+
Masterbaker was designed with users in mind, allowing a global runlist as well as user-specific.
|
6
6
|
|
7
|
-
Using
|
7
|
+
Using Masterbaker
|
8
8
|
-------------
|
9
9
|
|
10
|
-
1. You'll need to have
|
10
|
+
1. You'll need to have Masterbaker installed:
|
11
11
|
|
12
|
-
$ gem install
|
12
|
+
$ gem install masterbaker
|
13
13
|
|
14
14
|
2. You'll need a `Cheffile` in your home directory that points Librarian to all the cookbooks you've included:
|
15
15
|
|
16
|
-
$ cat ~/.bakery/Cheffile // or ~/.
|
16
|
+
$ cat ~/.bakery/Cheffile // or ~/.masterbaker/masterbakerrc
|
17
17
|
site "http://community.opscode.com/api/v1"
|
18
18
|
cookbook "pivotal_workstation",
|
19
19
|
:git => "https://github.com/pivotal/pivotal_workstation"
|
20
20
|
|
21
|
-
3. You'll need to create a `~/.bakery/bakeryrc` or `~/.
|
21
|
+
3. You'll need to create a `~/.bakery/bakeryrc` or `~/.masterbaker/masterbakerrc` file in your home directory to tell Chef which recipes to converge:
|
22
22
|
|
23
23
|
$ cat /Users/pivotal/.bakery/bakeryrc
|
24
24
|
recipes:
|
@@ -30,7 +30,7 @@ Using Bakist
|
|
30
30
|
$ bake config
|
31
31
|
|
32
32
|
|
33
|
-
4. You'll need to run `
|
33
|
+
4. You'll need to run `masterbaker` for anything to happen:
|
34
34
|
|
35
35
|
$ bake
|
36
36
|
|
@@ -40,7 +40,7 @@ Examples
|
|
40
40
|
|
41
41
|
##### Running a set of recipes
|
42
42
|
|
43
|
-
Here's an example of a `~/.bakery/bakeryrc` or `~/.
|
43
|
+
Here's an example of a `~/.bakery/bakeryrc` or `~/.masterbaker/masterbakerrc`:
|
44
44
|
|
45
45
|
cookbook_paths:
|
46
46
|
- /opt/beans
|
@@ -49,12 +49,12 @@ Here's an example of a `~/.bakery/bakeryrc` or `~/.bakist/bakistrc`:
|
|
49
49
|
- beans::food_fight
|
50
50
|
- napkins
|
51
51
|
|
52
|
-
This tells
|
52
|
+
This tells Masterbaker to search in both `/opt/beans` and `./cookbooks` (relative to the `~/.bakery` or `~/.masterbaker` directories) for cookbooks to run. Then, it attempts to converge the `beans::chili`, `beans::food_fight` and `napkins` recipes.
|
53
53
|
|
54
54
|
|
55
55
|
##### Setting node attributes
|
56
56
|
|
57
|
-
|
57
|
+
Masterbaker lets you override node attributes. Let's say we've got a `bash::prompt` recipe for which we want to set `node['bash']['prompt']['color']='p!nk'`. No problem!
|
58
58
|
|
59
59
|
recipes:
|
60
60
|
- bash::prompt
|
@@ -64,11 +64,11 @@ Bakist lets you override node attributes. Let's say we've got a `bash::prompt`
|
|
64
64
|
color: p!nk
|
65
65
|
|
66
66
|
|
67
|
-
##### Conditionally modifying
|
67
|
+
##### Conditionally modifying Masterbaker
|
68
68
|
|
69
|
-
|
69
|
+
Masterbaker allows conditionally switching on environment variables. Let's say we only want to include the `embarrassment::parental` recipe when the `MEGA_PRODUCTION` environment variable is set to `juggalos`. Here's the `~/.bakery/bakeryrc` or `~/.masterbaker/masterbakerrc`:
|
70
70
|
|
71
|
-
cookbook_paths:
|
71
|
+
cookbook_paths:f
|
72
72
|
- /fresno
|
73
73
|
recipes:
|
74
74
|
- disaster
|
@@ -78,7 +78,7 @@ Bakist allows conditionally switching on environment variables. Let's say we on
|
|
78
78
|
recipes:
|
79
79
|
- embarrassment::parental
|
80
80
|
|
81
|
-
So now, this is the result of our
|
81
|
+
So now, this is the result of our Masterbaker run:
|
82
82
|
|
83
83
|
$ MEGA_PRODUCTION=juggalos bake
|
84
84
|
Installing disaster (1.0.0)
|
@@ -92,7 +92,7 @@ If we set `MEGA_PRODUCTION=godspeed`, the `embarrassment::parental` recipe is no
|
|
92
92
|
|
93
93
|
##### Running one-off recipes
|
94
94
|
|
95
|
-
|
95
|
+
Masterbaker can also run one-off recipes:
|
96
96
|
|
97
97
|
$ bake run_recipe lice::box
|
98
98
|
Installing lice (1.0.0)
|
@@ -105,7 +105,7 @@ This just runs the `lice::box` recipe from your current set of cookbooks. It st
|
|
105
105
|
|
106
106
|
##### Chef logging
|
107
107
|
|
108
|
-
|
108
|
+
Masterbaker runs `chef-solo` at log level `info` by default, which is helpful when you need to see what your Chef run is doing. If you need more information, you can set the `LOG_LEVEL` environment variable:
|
109
109
|
|
110
110
|
$ LOG_LEVEL=debug bake
|
111
111
|
|
data/lib/masterbaker/cli.rb
CHANGED
data/lib/masterbaker/config.rb
CHANGED
@@ -43,7 +43,7 @@ module Masterbaker
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def cookbook_paths
|
46
|
-
([royal_crown_cookbooks_directory] + compiled.cookbook_paths).map do |path|
|
46
|
+
([royal_crown_cookbooks_directory] + [masterbaker_cookbooks_directory] + compiled.cookbook_paths).map do |path|
|
47
47
|
File.expand_path(path, royal_crown_path)
|
48
48
|
end.uniq.select do |path|
|
49
49
|
File.directory?(path)
|
@@ -102,6 +102,10 @@ module Masterbaker
|
|
102
102
|
Process.uid == 0
|
103
103
|
end
|
104
104
|
|
105
|
+
def masterbaker_cookbooks_directory
|
106
|
+
File.expand_path("cookbooks", royal_crown_path.gsub(/\.bakery/, '.masterbaker'))
|
107
|
+
end
|
108
|
+
|
105
109
|
def royal_crown_cookbooks_directory
|
106
110
|
File.expand_path("cookbooks", royal_crown_path)
|
107
111
|
end
|
data/lib/masterbaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: masterbaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Mackintosh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|