ood_core 0.24.1 → 0.25.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad05a0d8cf307f0237329f0e33e8a66f809781e5b164ddf20b9f03d65078451d
|
4
|
+
data.tar.gz: 396dde55b4b5aaa321ccaf6fbc3cb049d01239335533c35c39ee9a11a1aa5d9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1d7cb53117266c577eaa7792d867508f3e94ef78f2f9af7817882ad1f6165d5d43e8179e17163a83dd438627215700501ea75281204ee6b7d900649c77de9f
|
7
|
+
data.tar.gz: 4aaf01f40d43e7b496a053e2ef85548769beb169c78e954cd055659ecc08f2e8ef7221561f94a184eb986b9f13d52c2efda30ffdd07faeb697fab4d9d4411ce7
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
# [0.25.0] - 03-27-2024
|
11
|
+
|
12
|
+
- [828](https://github.com/OSC/ood_core/pull/828) and [826](https://github.com/OSC/ood_core/pull/826)
|
13
|
+
add configurable heartbeats to noVNC connections.
|
14
|
+
|
15
|
+
# [0.24.2] - 01-24-2024
|
16
|
+
|
17
|
+
- [823](https://github.com/OSC/ood_core/pull/823) Corrected a mistake in converting duration to seconds.
|
18
|
+
- [821](https://github.com/OSC/ood_core/pull/821) add container_start_args to pass options to the start command.
|
19
|
+
|
10
20
|
## [0.24.1] - 11-29-2023
|
11
21
|
|
12
22
|
[820](https://github.com/OSC/ood_core/pull/820) Reverts [818](https://github.com/OSC/ood_core/pull/818)
|
@@ -524,7 +534,10 @@ Functionally the same as [0.17.3] but with some CI updates.
|
|
524
534
|
### Added
|
525
535
|
- Initial release!
|
526
536
|
|
527
|
-
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.
|
537
|
+
[Unreleased]: https://github.com/OSC/ood_core/compare/v0.24.2...HEAD
|
538
|
+
[0.24.2]: https://github.com/OSC/ood_core/compare/v0.24.1...v0.24.2
|
539
|
+
[0.24.1]: https://github.com/OSC/ood_core/compare/v0.24.0...v0.24.1
|
540
|
+
[0.24.0]: https://github.com/OSC/ood_core/compare/v0.23.5...v0.24.0
|
528
541
|
[0.23.5]: https://github.com/OSC/ood_core/compare/v0.23.4...v0.23.5
|
529
542
|
[0.23.4]: https://github.com/OSC/ood_core/compare/v0.23.3...v0.23.4
|
530
543
|
[0.23.3]: https://github.com/OSC/ood_core/compare/v0.23.2...v0.23.3
|
@@ -24,6 +24,9 @@ module OodCore
|
|
24
24
|
# @option context [#to_s] :websockify_cmd
|
25
25
|
# ("${WEBSOCKIFY_CMD:-/opt/websockify/run}") the path to the
|
26
26
|
# websockify script (assumes you don't modify `:after_script`)
|
27
|
+
# @option context [#to_s] :websockify_heartbeat_seconds
|
28
|
+
# ("${WEBSOCKIFY_HEARTBEAT_SECONDS:-30}") the websockify heartbeat
|
29
|
+
# duration in seconds. (assumes you don't modify `:after_script`)
|
27
30
|
# @option context [#to_s] :vnc_log ("vnc.log") path to vnc server log
|
28
31
|
# file (assumes you don't modify `:before_script` or `:after_script`)
|
29
32
|
# @option context [#to_s] :vnc_passwd ("vnc.passwd") path to the file
|
@@ -130,7 +133,8 @@ module OodCore
|
|
130
133
|
# successful connections so that the password can be reset
|
131
134
|
def after_script
|
132
135
|
websockify_cmd = context.fetch(:websockify_cmd, "${WEBSOCKIFY_CMD:-/opt/websockify/run}").to_s
|
133
|
-
|
136
|
+
websockify_hb = context.fetch(:websockify_heartbeat_seconds, "${WEBSOCKIFY_HEARTBEAT_SECONDS:-30}").to_s
|
137
|
+
|
134
138
|
<<-EOT.gsub(/^ {14}/, "")
|
135
139
|
#{super}
|
136
140
|
|
@@ -139,7 +143,7 @@ module OodCore
|
|
139
143
|
start_websockify() {
|
140
144
|
local log_file="./websockify.log"
|
141
145
|
# launch websockify in background and redirect all output to a file.
|
142
|
-
#{websockify_cmd} $1 $2 &> $log_file &
|
146
|
+
#{websockify_cmd} $1 --heartbeat=#{websockify_hb} $2 &> $log_file &
|
143
147
|
local ws_pid=$!
|
144
148
|
local counter=0
|
145
149
|
|
@@ -70,6 +70,8 @@ module OodCore
|
|
70
70
|
# empty string.
|
71
71
|
# @option context [#to_s] :container_command ("singularity") the
|
72
72
|
# singularity or apptainer execution command
|
73
|
+
# @option context [#to_a] :container_start_args ([]) Additional
|
74
|
+
# arguements you wish to pass to the container start command.
|
73
75
|
# @param instance_name (uuid) a name for the instance
|
74
76
|
# @see Template
|
75
77
|
|
@@ -99,8 +101,8 @@ module OodCore
|
|
99
101
|
export INSTANCE_NAME="#{@instance_name}"
|
100
102
|
export instance_name="#{@instance_name}"
|
101
103
|
echo "Starting instance..."
|
102
|
-
#{container_command} instance start #{container_path} #{@instance_name}
|
103
|
-
|
104
|
+
#{container_command} instance start #{container_start_args} #{container_path} #{@instance_name}
|
105
|
+
|
104
106
|
# Setup one-time use passwords and initialize the VNC password
|
105
107
|
function change_passwd () {
|
106
108
|
echo "Setting VNC password..."
|
@@ -219,6 +221,10 @@ module OodCore
|
|
219
221
|
context.fetch(:container_command, "singularity").to_s
|
220
222
|
end
|
221
223
|
|
224
|
+
def container_start_args
|
225
|
+
context.fetch(:container_start_args, []).to_a.join(' ')
|
226
|
+
end
|
227
|
+
|
222
228
|
# Arguments sent to `vncserver` command
|
223
229
|
def vnc_args
|
224
230
|
context.fetch(:vnc_args) do
|
@@ -386,9 +386,8 @@ module OodCore
|
|
386
386
|
# Convert duration to seconds
|
387
387
|
def duration_in_seconds(time)
|
388
388
|
return 0 if time.nil? or time == "-"
|
389
|
-
|
390
|
-
|
391
|
-
time.split(':').map { |v| v.to_i }.inject(0) { |total, v| total * 60 + v }
|
389
|
+
matched = time.match(/\((\d+\))/)
|
390
|
+
return matched ? matched[1].to_i : 0
|
392
391
|
end
|
393
392
|
|
394
393
|
# Convert seconds to duration
|
data/lib/ood_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-03-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ood_support
|