percheron 0.7.15 → 0.7.16

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: a3d390c7370c3f9ed4da778a0c5bff35a0bb1a3e
4
- data.tar.gz: db80598848ec004fcd08433c973a2c4df01fcfbf
3
+ metadata.gz: 4b3358819570477f97ff3f4c1b21b689a7007390
4
+ data.tar.gz: 04f82dae87c48a51b0ebff986bf4bab889036c7b
5
5
  SHA512:
6
- metadata.gz: 6072c3f0c9c2761014a1a2c53279cc08c43c7d48929a7bfb4ad80169a4a073b4eef9a351c5cd61d81fae61c9e8e5f8f8292796e8dd403f2182b0443f9709d6b4
7
- data.tar.gz: 92733cea3b69b070ec201e61d01f35e14d6d426b39d6da4f07b90839a68bdfa577d2c13efc779baa65a898516f799139fc23be6ce3e2fc42d8bf17311ae406ec
6
+ metadata.gz: 4cafe93d3bddf33b7098cdae3aa87afbe4a4a27d78f65b3e3a36c96808cd9867bbd2881a3a6499f7f334d97a1f8565402129117c93b32cbe32b04a44432005d0
7
+ data.tar.gz: 502ca1ee96c79cda8f55b347cb1b3ba30f61645374540a057143ea4b3b6ff0cca0ce06ab450f982e812a315ecd5798b9cd12ca6e1875a5fe4550af62485a8e85
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.7.16 / 2015-08-07
2
+
3
+ * Improved graph look
4
+
1
5
  ## v0.7.15 / 2015-08-06
2
6
 
3
7
  * Allow --force to be used when recreating
@@ -0,0 +1,19 @@
1
+ ---
2
+ stacks:
3
+ - name: consul-stack
4
+ description: A demo consul stack with one master and two agents
5
+ units:
6
+ - name: master
7
+ version: 1.0.0
8
+ docker_image: gliderlabs/consul-server:0.5
9
+ start_args: [ "-bootstrap", "-client", "0.0.0.0", "-data-dir", "/data", "-ui-dir", "/ui" ]
10
+ ports:
11
+ - 8500:8500
12
+ - 8600:53/udp
13
+ - name: agent
14
+ version: 1.0.0
15
+ instances: 2
16
+ docker_image: gliderlabs/consul-agent:0.5
17
+ start_args: [ "-join", "master" ]
18
+ dependent_unit_names:
19
+ - master
@@ -33,24 +33,31 @@ module Percheron
33
33
  end
34
34
 
35
35
  def graph_opts
36
- { type: :digraph, nodesep: 0.75, ranksep: 1.0, label: header_label, fontsize: 12 }
36
+ { type: :digraph, nodesep: 0.75, ranksep: 1.0, label: header_label }
37
37
  end
38
38
 
39
- def units
40
- @units ||= stack.units
39
+ def header_label
40
+ '<
41
+ <table border="0" cellborder="0">
42
+ <tr><td height="36" valign="bottom">
43
+ <font face="Arial Bold" point-size="14">%s</font>
44
+ </td></tr>
45
+ <tr><td height="18"><font face="Arial Italic" point-size="11">%s</font></td></tr>
46
+ </table>
47
+ >' % [ stack.name, stack_description ]
41
48
  end
42
49
 
43
- def header_label
44
- '\n%s\n%s\n' % [ stack.name, stack.description ]
50
+ def stack_description
51
+ stack.description || ' '
52
+ end
53
+
54
+ def units
55
+ @units ||= stack.units
45
56
  end
46
57
 
47
58
  def add_nodes
48
59
  units.each do |_, unit|
49
- if unit.pseudo?
50
- add_pseudo_node(unit)
51
- else
52
- add_node(unit)
53
- end
60
+ unit.pseudo? ? add_pseudo_node(unit) : add_node(unit)
54
61
  end
55
62
  end
56
63
 
@@ -70,14 +77,17 @@ module Percheron
70
77
  end
71
78
 
72
79
  def cluster_opts(unit)
73
- { label: unit.pseudo_name, style: 'filled', color: 'lightgrey' }
80
+ label = '<<font face="Arial Bold">%s</font>>' % unit.pseudo_name
81
+ { label: label, style: 'filled', color: 'lightgrey', fontsize: 13 }
74
82
  end
75
83
 
76
84
  def node_opts(unit)
77
85
  shape = unit.startable? ? 'box' : 'ellipse'
78
- label = [ unit.name ]
79
- unit.ports.each { |ports| label << 'public: %s, internal: %s' % ports.split(':') }
80
- { shape: shape, label: label.join("\n"), fontname: 'arial', fontsize: 12 }
86
+ label = [ '<font face="Arial Bold" point-size="12">%s</font><br/>' % unit.name ]
87
+ unit.ports.each do |ports|
88
+ label << '<font point-size="11">p: %s, i: %s</font>' % ports.split(':')
89
+ end
90
+ { shape: shape, label: '<%s>' % label.join('<br/>'), fontname: 'arial' }
81
91
  end
82
92
 
83
93
  def pseudo_node_opts(unit)
@@ -1,3 +1,3 @@
1
1
  module Percheron
2
- VERSION = '0.7.15'
2
+ VERSION = '0.7.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percheron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.15
4
+ version: 0.7.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash McKenzie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -312,6 +312,7 @@ files:
312
312
  - README.md
313
313
  - Rakefile
314
314
  - bin/percheron
315
+ - examples/consul/.percheron.yml
315
316
  - lib/percheron.rb
316
317
  - lib/percheron/actions.rb
317
318
  - lib/percheron/actions/base.rb