percheron 0.7.12 → 0.7.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3d3fe11591f768bc7d5867837dc546b679bbf85
4
- data.tar.gz: ab113fd870d359c2ba383340feab044e42861b26
3
+ metadata.gz: 6fbe3a87573ec876ad368663f4da08e86f3d6f79
4
+ data.tar.gz: eedbde7448d4abd3a6e1e03d8ffa6da063ff98af
5
5
  SHA512:
6
- metadata.gz: d0b7b65daffc775d0606a6d11a5b55a26387c0d4362f4a75fcded15f4c9246ec35a732b992dc14f944a12d1521ce017665b5f762c81aba8b1cd99eab72c8f377
7
- data.tar.gz: 3426521b489b6b91d5bbfad9b9fae2bae6c9e89bfaa3d3dfa2b75552571bbcbf5943c5d02d4cd992d0975be21c10ac071e6282c326c4bfe482c85d80e038b069
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 v2015.5.0 with master and two minions
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' => true,
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
@@ -47,6 +47,14 @@ module Percheron
47
47
  secrets_file ? Hashie::Mash.new(YAML.load_file(secrets_file)) : {}
48
48
  end
49
49
 
50
+ def self.userdata
51
+ instance.userdata
52
+ end
53
+
54
+ def userdata
55
+ contents.userdata || {}
56
+ end
57
+
50
58
  def self.docker
51
59
  instance.docker
52
60
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Percheron
2
- VERSION = '0.7.12'
2
+ VERSION = '0.7.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percheron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: 0.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash McKenzie