fig2coreos 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fig2coreos.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a76ac0e62fd0adba35cad54a706584ef2ba1ed20
4
- data.tar.gz: 5555233bfcf74dbb6eec72fc69abdf380d97c276
3
+ metadata.gz: d31cdef9ccea5afb1cc3092142a9f8ce2c200b0d
4
+ data.tar.gz: f0850007a0131daf8bfcceb96ca4905ff76f2f59
5
5
  SHA512:
6
- metadata.gz: 2eb504aed6ac00e5d85992f3cd990d3574c1d359b923075184b91b7ee90120294af2bb3812facc1e88f44fc03a31a805c5e2c1be53fff1a5f82145313eea7602
7
- data.tar.gz: 8c00a2cb33e4aa73984b9194edd92a76f1905c36c9aeaf3acd2f6c090f4c2a39bea1614ffc215a56456f03ba541b7d3d7a82711eff4b0766a9aea114c6a2eb82
6
+ metadata.gz: 8e359ef41c5d0611448d86a520688900be5681a5bd7b24fb5dcbd6afaa2fb0f57de4ee791efacd9e85a2645d11a018f90f53c12f7e9aa0b6ddd5eb7facc1ea17
7
+ data.tar.gz: 5802d7170572ee6e628b1d6d22e10724e74fdcbd85a23f085dadfa53abf633760879fea00e7bd535ba64b0a4f71d84071639fe421ea139edc5e9275314dc02f1
data/lib/fig2coreos.rb CHANGED
@@ -71,13 +71,14 @@ eof
71
71
  end
72
72
 
73
73
  File.open(File.join(base_path, "#{service_name}-discovery.1.service"), "w") do |file|
74
+ port = %{\\"port\\": #{service["ports"].first.to_s.split(":").first}, } if service["ports"].to_a.size > 0
74
75
  file << <<-eof
75
76
  [Unit]
76
77
  Description=Announce #{service_name}_1
77
78
  BindsTo=#{service_name}.1.service
78
79
 
79
80
  [Service]
80
- ExecStart=/bin/sh -c "while true; do etcdctl set /services/#{service_name}/#{service_name}_1 '{ \\"host\\": \\"%H\\", \\"port\\": #{service["ports"].first.to_s.split(":").first}, \\"version\\": \\"52c7248a14\\" }' --ttl 60;sleep 45;done"
81
+ ExecStart=/bin/sh -c "while true; do etcdctl set /services/#{service_name}/#{service_name}_1 '{ \\"host\\": \\"%H\\", #{port}\\"version\\": \\"52c7248a14\\" }' --ttl 60;sleep 45;done"
81
82
  ExecStop=/usr/bin/etcdctl rm /services/#{service_name}/#{service_name}_1
82
83
 
83
84
  [X-Fleet]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fig2coreos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson