vagrant-g5k 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Vagrantfile +5 -0
- data/lib/vagrant-g5k/config.rb +7 -0
- data/lib/vagrant-g5k/util/g5k_utils.rb +5 -2
- data/lib/vagrant-g5k/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaeed73b05202f3f4877d8b66401981199f0cafb
|
4
|
+
data.tar.gz: 91014ed7c211013ce70fb7fc6fa58bd77cd9d336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b0874066b83dfc35b9ff5fed4eedbe9a4746266c43d24f40a1aa5db8ca3821d5b4857b5bc119657f4e727dd4312c0837d881d346f6f346579635ea16653e466
|
7
|
+
data.tar.gz: 5ad397d2195e17abac2199953ced8b7674823cecec82084fd8dd5f9e5c804b7371cfa53a5287da4a78a077330721c6cf5066454b66ddb1d17a541ae153ed6a4e
|
data/CHANGELOG.md
CHANGED
data/Vagrantfile
CHANGED
@@ -57,6 +57,11 @@ Vagrant.configure(2) do |config|
|
|
57
57
|
|
58
58
|
# ports to expose (at least ssh has to be forwarded)
|
59
59
|
g5k.ports = ['2222-:22']
|
60
|
+
|
61
|
+
# Custom oar ressource filtering
|
62
|
+
# This may be specific on the oar ressource declaration
|
63
|
+
# of the used platform
|
64
|
+
# g5k.oar = "virtual != 'none'"
|
60
65
|
end
|
61
66
|
|
62
67
|
|
data/lib/vagrant-g5k/config.rb
CHANGED
@@ -46,12 +46,19 @@ module VagrantPlugins
|
|
46
46
|
# @return [Array]
|
47
47
|
attr_accessor :ports
|
48
48
|
|
49
|
+
# OAR resource selection
|
50
|
+
#
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
attr_accessor :oar
|
54
|
+
|
49
55
|
def initialize()
|
50
56
|
@username = ENV['USER']
|
51
57
|
@project_id = nil
|
52
58
|
@site = nil
|
53
59
|
@gateway = nil
|
54
60
|
@walltime = "01:00:00"
|
61
|
+
@oar = ""
|
55
62
|
end
|
56
63
|
|
57
64
|
def finalize!()
|
@@ -39,6 +39,8 @@ module VagrantPlugins
|
|
39
39
|
|
40
40
|
attr_accessor :ports
|
41
41
|
|
42
|
+
attr_accessor :oar
|
43
|
+
|
42
44
|
@@instance = nil
|
43
45
|
|
44
46
|
def self.instance
|
@@ -57,6 +59,7 @@ module VagrantPlugins
|
|
57
59
|
@ports = @provider_config.ports
|
58
60
|
@image= @provider_config.image
|
59
61
|
@gateway = @provider_config.gateway
|
62
|
+
@oar = "{#{@provider_config.oar}}/" if @provider_config.oar != ""
|
60
63
|
# grab the network config of the vm
|
61
64
|
@networks = env[:machine].config.vm.networks
|
62
65
|
# to log to the ui
|
@@ -157,7 +160,7 @@ module VagrantPlugins
|
|
157
160
|
args = [drive, net].join(" ")
|
158
161
|
# Submitting a new job
|
159
162
|
# Getting the job_id as a ruby string
|
160
|
-
job_id = exec("oarsub --json -t allow_classic_ssh -l \"nodes=1,walltime=#{@walltime}\" --name #{env[:machine].name} --checkpoint 60 --signal 12 \"#{launcher_remote_path} #{args}\" | grep \"job_id\"| cut -d':' -f2").gsub(/"/,"").strip
|
163
|
+
job_id = exec("oarsub --json -t allow_classic_ssh -l \"#{@oar}nodes=1,walltime=#{@walltime}\" --name #{env[:machine].name} --checkpoint 60 --signal 12 \"#{launcher_remote_path} #{args}\" | grep \"job_id\"| cut -d':' -f2").gsub(/"/,"").strip
|
161
164
|
|
162
165
|
begin
|
163
166
|
retryable(:on => VagrantPlugins::G5K::Errors::JobNotRunning, :tries => 100, :sleep => 2) do
|
@@ -174,7 +177,7 @@ module VagrantPlugins
|
|
174
177
|
@ui.error("Tired of waiting")
|
175
178
|
raise VagrantPlugins::G5K::Errors::JobNotRunning
|
176
179
|
end
|
177
|
-
@ui.info("VM booted on #{@
|
180
|
+
@ui.info("VM booted @#{@site} on #{@node}")
|
178
181
|
|
179
182
|
end
|
180
183
|
|
data/lib/vagrant-g5k/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-g5k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu Simonin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iniparse
|