percheron 0.7.12 → 0.7.13
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 +3 -5
- data/lib/percheron/actions/build.rb +5 -4
- data/lib/percheron/commands/build.rb +2 -1
- data/lib/percheron/config.rb +8 -0
- data/lib/percheron/stack.rb +2 -2
- data/lib/percheron/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbe3a87573ec876ad368663f4da08e86f3d6f79
|
4
|
+
data.tar.gz: eedbde7448d4abd3a6e1e03d8ffa6da063ff98af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc7b8ed5c1f1e8fe65bc277873be95626488870e17c9ae0a8f1312783e169ea4f5b32385512daeb6292dc2dea3faf3b6bb59bd3850da06308f9e51187f51fce8
|
7
|
+
data.tar.gz: 309648e78a99688bca4f863de0ddc859b98331346db2287ea1d1daf91b45b66e08dafad90a1501744ff4b23b4c1531b214a95b4bd5ceabb10fabc2004708ec08
|
data/README.md
CHANGED
@@ -34,6 +34,8 @@ It is intended to be used in a test, development or prototyping scenario.
|
|
34
34
|
* Version control of images and units
|
35
35
|
* Partial template (liquid) support within `.percheron.yml`
|
36
36
|
* Generate Graphviz dependency graphs dynamically based purely on your `.percheron.yml`
|
37
|
+
* Support for userdata key/value pairs
|
38
|
+
* Support for secrets in YML format
|
37
39
|
* Written in Ruby :)
|
38
40
|
|
39
41
|
## Supported platforms
|
@@ -115,10 +117,6 @@ gem install percheron
|
|
115
117
|
|
116
118
|
```yaml
|
117
119
|
---
|
118
|
-
docker:
|
119
|
-
host: "https://boot2docker:2376"
|
120
|
-
ssl_verify_peer: false
|
121
|
-
|
122
120
|
stacks:
|
123
121
|
- name: consul-stack
|
124
122
|
description: A demo consul stack with one master and two agents
|
@@ -234,7 +232,7 @@ To debug Percheron and Docker, set the `DOCKER_DEBUG=true` environment variable.
|
|
234
232
|
* [Rails](https://github.com/ashmckenzie/percheron-rails#quickstart) - Rails 4.2, PostgreSQL, redis, HAProxy and postfix
|
235
233
|
* [Redis](https://github.com/ashmckenzie/percheron-redis#quickstart) - Redis cluster + sentinel, master, two slaves and tools
|
236
234
|
* [Torrent](https://github.com/ashmckenzie/percheron-torrent#quickstart) - Tracker (chihaya), seeder (aria2) and three peers (aria2)
|
237
|
-
* [SaltStack](https://github.com/ashmckenzie/percheron-saltstack#quickstart) - SaltStack
|
235
|
+
* [SaltStack](https://github.com/ashmckenzie/percheron-saltstack#quickstart) - SaltStack with master and two minions
|
238
236
|
|
239
237
|
## Testing
|
240
238
|
|
@@ -4,9 +4,10 @@ module Percheron
|
|
4
4
|
|
5
5
|
include Base
|
6
6
|
|
7
|
-
def initialize(unit, nocache: false, exec_scripts: true)
|
7
|
+
def initialize(unit, nocache: false, forcerm: false, exec_scripts: true)
|
8
8
|
@unit = unit
|
9
9
|
@nocache = nocache
|
10
|
+
@forcerm = forcerm
|
10
11
|
@exec_scripts = exec_scripts
|
11
12
|
end
|
12
13
|
|
@@ -21,14 +22,14 @@ module Percheron
|
|
21
22
|
|
22
23
|
private
|
23
24
|
|
24
|
-
attr_reader :unit, :nocache, :exec_scripts
|
25
|
+
attr_reader :unit, :nocache, :forcerm, :exec_scripts
|
25
26
|
alias_method :exec_scripts?, :exec_scripts
|
26
27
|
|
27
28
|
def options
|
28
29
|
{
|
29
30
|
'dockerfile' => dockerfile,
|
30
31
|
't' => unit.image_name,
|
31
|
-
'forcerm' =>
|
32
|
+
'forcerm' => forcerm,
|
32
33
|
'nocache' => nocache
|
33
34
|
}
|
34
35
|
end
|
@@ -52,7 +53,7 @@ module Percheron
|
|
52
53
|
end
|
53
54
|
|
54
55
|
def write_out_temp_dockerfile!
|
55
|
-
options = { 'secrets' => Config.secrets }
|
56
|
+
options = { 'secrets' => Config.secrets, 'userdata' => Config.userdata }
|
56
57
|
content = Liquid::Template.parse(unit.dockerfile.read).render(options)
|
57
58
|
File.open(temp_dockerfile, 'w') { |f| f.write(content) }
|
58
59
|
end
|
@@ -3,10 +3,11 @@ module Percheron
|
|
3
3
|
class Build < Abstract
|
4
4
|
|
5
5
|
default_parameters!
|
6
|
+
option('--forcerm', :flag, 'force removal of intermediate containers', default: false)
|
6
7
|
|
7
8
|
def execute
|
8
9
|
super
|
9
|
-
stack.build!(unit_names: unit_names)
|
10
|
+
stack.build!(unit_names: unit_names, forcerm: forcerm?)
|
10
11
|
end
|
11
12
|
end
|
12
13
|
end
|
data/lib/percheron/config.rb
CHANGED
data/lib/percheron/stack.rb
CHANGED
@@ -67,10 +67,10 @@ module Percheron
|
|
67
67
|
execute!(Actions::Restart, filter_unit_names(unit_names))
|
68
68
|
end
|
69
69
|
|
70
|
-
def build!(unit_names: [])
|
70
|
+
def build!(unit_names: [], forcerm: false)
|
71
71
|
unit_names = dependant_units_for(unit_names)
|
72
72
|
exec_on_dependant_units_for(unit_names) do |unit|
|
73
|
-
Actions::Build.new(unit).execute!
|
73
|
+
Actions::Build.new(unit, forcerm: forcerm).execute!
|
74
74
|
end
|
75
75
|
nil
|
76
76
|
end
|
data/lib/percheron/version.rb
CHANGED