fig2coreos 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fig2coreos.rb +2 -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: d31cdef9ccea5afb1cc3092142a9f8ce2c200b0d
|
4
|
+
data.tar.gz: f0850007a0131daf8bfcceb96ca4905ff76f2f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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\\",
|
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]
|