harbr 0.0.82 → 0.0.83
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/lib/harbr/job.rb +5 -37
- data/lib/harbr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d430278f6c0b2374000220255f6c4a9be3d197bc2fa9936e85b10c4cd4a7682
|
|
4
|
+
data.tar.gz: fe1c7d906c6d5bbce17d992702eb56758c39653f83bbf575157fe6faa71f1e6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e33577acec3ca405f68c21c00d6e74f40b8c3a89a81a7596acc16f2ff6afe201abc69c59b3192b2a3d8805c896c12143b63c2a9503c2c9e27653e13ea6925aee
|
|
7
|
+
data.tar.gz: 79332a0b2bd4cc7cf1ae681b0609aaae522766452af8117ea7c2bdb559578d3cc62507f5e3c467f633c36def1b3a723526078874a5fb46bfc1d646fbc7c9493f
|
data/lib/harbr/job.rb
CHANGED
|
@@ -77,7 +77,7 @@ module Harbr
|
|
|
77
77
|
script_template = <<~SCRIPT
|
|
78
78
|
#!/bin/sh
|
|
79
79
|
exec 2>&1
|
|
80
|
-
cd /var/harbr/#{@container_name}/current
|
|
80
|
+
cd /var/harbr/containers/#{@container_name}/current
|
|
81
81
|
exec ./exe/run #{@port}
|
|
82
82
|
SCRIPT
|
|
83
83
|
end
|
|
@@ -116,38 +116,6 @@ module Harbr
|
|
|
116
116
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
module Next
|
|
120
|
-
|
|
121
|
-
class Run
|
|
122
|
-
def initialize(container, port)
|
|
123
|
-
@container_name = container
|
|
124
|
-
@port = port
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def to_s
|
|
128
|
-
script_template = <<~SCRIPT
|
|
129
|
-
#!/bin/sh
|
|
130
|
-
exec 2>&1
|
|
131
|
-
cd /var/harbr/containers/#{@container_name}/next
|
|
132
|
-
exec ./exe/run #{@port}
|
|
133
|
-
SCRIPT
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
class Log
|
|
138
|
-
def initialize(container)
|
|
139
|
-
@container_name = container
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
def to_s
|
|
143
|
-
script_template = <<~SCRIPT
|
|
144
|
-
#!/bin/sh
|
|
145
|
-
exec svlogd -tt /var/log/harbr/#{@container_name}/next/
|
|
146
|
-
SCRIPT
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
end
|
|
151
119
|
end
|
|
152
120
|
|
|
153
121
|
def write_to_file(path, contents)
|
|
@@ -173,16 +141,16 @@ module Harbr
|
|
|
173
141
|
`mkdir -p /etc/sv/harbr/#{name}`
|
|
174
142
|
`mkdir -p /etc/sv/harbr/#{name}/log`
|
|
175
143
|
|
|
176
|
-
write_to_file "/etc/sv/harbr/#{name}/run", Runit::
|
|
144
|
+
write_to_file "/etc/sv/harbr/#{name}/run", Runit::Run.new(name, port).to_s
|
|
177
145
|
write_to_file "/etc/sv/harbr/#{name}/finish", Runit::Finish.new(port).to_s
|
|
178
|
-
write_to_file "/etc/sv/harbr/#{name}/log/run", Runit::
|
|
146
|
+
write_to_file "/etc/sv/harbr/#{name}/log/run", Runit::Log.new(name).to_s
|
|
179
147
|
|
|
180
148
|
`chmod +x /etc/sv/harbr/#{name}/run`
|
|
181
149
|
`chmod +x /etc/sv/harbr/#{name}/log/run`
|
|
182
150
|
`chmod +x /etc/sv/harbr/#{name}/finish`
|
|
183
151
|
|
|
184
|
-
system "ln -
|
|
185
|
-
system "ln -
|
|
152
|
+
system "ln -sf /var/harbr/containers/#{name}/versions/#{version} /var/harbr/containers/#{name}/current"
|
|
153
|
+
system "ln -sf /etc/sv/harbr/#{name}/next /etc/service/#{name}"
|
|
186
154
|
|
|
187
155
|
containers = collate_containers(name, manifest.host, port)
|
|
188
156
|
create_traefik_config(containers)
|
data/lib/harbr/version.rb
CHANGED