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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5481fa32957d639e07e8ef7bfdaffc9f47026d95
4
- data.tar.gz: 754180507384aa297d4917d46571f2f2fb8cb2cc
3
+ metadata.gz: aaeed73b05202f3f4877d8b66401981199f0cafb
4
+ data.tar.gz: 91014ed7c211013ce70fb7fc6fa58bd77cd9d336
5
5
  SHA512:
6
- metadata.gz: ac6517dcd596bb8339cfd1c2a82cf47495be661c71711505fbbe5f0f6763c097124c879fd7c52c3d17191d6a4dd5baee4055e54932159ae1a23ad82e53e50fba
7
- data.tar.gz: f5eefaba927d55b1df4c724a123ef3537d62c668c6fc9afe001ef3b217b213871a5710b1f5a19ed54e5a91350ecfaa81acd4b94374f05db01ba0faa0d943fd02
6
+ metadata.gz: 0b0874066b83dfc35b9ff5fed4eedbe9a4746266c43d24f40a1aa5db8ca3821d5b4857b5bc119657f4e727dd4312c0837d881d346f6f346579635ea16653e466
7
+ data.tar.gz: 5ad397d2195e17abac2199953ced8b7674823cecec82084fd8dd5f9e5c804b7371cfa53a5287da4a78a077330721c6cf5066454b66ddb1d17a541ae153ed6a4e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
+ # 0.0.14
2
+
3
+ * current
4
+
1
5
  # 0.0.13
2
6
 
3
- * Current
7
+ * Let vagrant configure the private_key to use to connect to the VM
4
8
 
5
9
  # 0.0.12
6
10
 
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
 
@@ -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 #{@site}")
180
+ @ui.info("VM booted @#{@site} on #{@node}")
178
181
 
179
182
  end
180
183
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module G5K
3
- VERSION = '0.0.13'
3
+ VERSION = '0.0.14'
4
4
  end
5
5
  end
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.13
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-03 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iniparse