vagrant-g5k 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 86aa6692b587f6dafb5af922cd68f0093ef881dd
4
- data.tar.gz: 34f959c39976c1a691fff4a56dea00936833f933
3
+ metadata.gz: d881ded22e0ffd6c634d6404ee9b0b6d2216cc6b
4
+ data.tar.gz: 7191c5867fce7ff80f0216b10f5129891fc31bab
5
5
  SHA512:
6
- metadata.gz: e830af79549e92e5eeea46ac5f916614da5f289e4660e5a5889975b97c2ae1f506ee314434834ed8f0e3e35d51165d36072da3ffd88866ee3e6b660429342ff6
7
- data.tar.gz: 20e48f9704439fbe1b60a20e88244c4e31cf190ae837fa5b9e293848f4b9ad2a185b94af2c4423662a7780bbfe2ced3086c8ca5b7a723e78070fd058ed411d44
6
+ metadata.gz: 25932a96059c4e8afe177439e258b55a933a188c08975b96f7eee3d2b0290f0ebb316ab4bd5e40ba53b4c31dde8d46e798c070ada62667cd4841e5b6e7242832
7
+ data.tar.gz: 2700541904729a15a3e2344ec26ec4f4ca82a6212e34635cf18d749cc40510e82a10b362af0210b45a2cff65d6eaabdf0d363f0a255302e5619b2c6dc11a029f
@@ -19,7 +19,8 @@ module VagrantPlugins
19
19
  :username => env[:machine].provider_config.username,
20
20
  :image_location => env[:machine].provider_config.image_location,
21
21
  :site => env[:machine].provider_config.site,
22
- :ports => env[:machine].provider_config.ports
22
+ :ports => env[:machine].provider_config.ports,
23
+ :backing_strategy => env[:machine].provider_config.backing_strategy
23
24
  )
24
25
  @app.call(env)
25
26
  end
@@ -18,29 +18,23 @@ module VagrantPlugins
18
18
  # @return [String]
19
19
  attr_accessor :image_location
20
20
 
21
- # G5K image location (path)
22
- #
23
- # @return [String]
24
- attr_accessor :image_type
25
-
26
- # G5K image strategy
27
- #
28
- #
29
- # @return [String]
30
- attr_accessor :image_strategy
31
-
32
21
  # G5K ports mapping
33
22
  #
34
23
  #
35
24
  # @return [Array]
36
25
  attr_accessor :ports
37
26
 
27
+ # G5K backing strategy
28
+ #
29
+ #
30
+ # @return [String]
31
+ attr_accessor :backing_strategy
32
+
38
33
  def initialize()
39
34
  @username = nil
40
35
  @image_location = nil
41
36
  @site = "rennes"
42
- @image_type = "local"
43
- @image_strategy = "snapshot"
37
+ @backing_strategy = ""
44
38
  end
45
39
 
46
40
  def finalize!()
@@ -30,6 +30,9 @@ module VagrantPlugins
30
30
 
31
31
  attr_accessor :ports
32
32
 
33
+ attr_accessor :backing_strategy
34
+
35
+ # legacy
33
36
  @@locations = [
34
37
  {
35
38
  :path => "/grid5000/virt-images",
@@ -97,7 +100,10 @@ module VagrantPlugins
97
100
  # Generate partial arguments for the kvm command
98
101
  drive = _generate_drive()
99
102
  net = _generate_net()
100
- args = [drive, net].join(" ")
103
+ # TODO implement different backing strategy
104
+ snapshot_flag = "-snapshot" if @backing_strategy == "snapshot"
105
+
106
+ args = [drive, net, snapshot_flag].join(" ")
101
107
  # Submitting a new job
102
108
  @logger.info("Starting a new job")
103
109
  job_id = exec("oarsub -t allow_classic_ssh -l \"{virtual!=\'none\'}/nodes=1,walltime=#{WALLTIME}\" --name #{env[:machine].name} --checkpoint 60 --signal 12 \"#{launcher_remote_path} #{args}\" | grep OAR_JOB_ID | cut -d '=' -f2").chomp
@@ -37,7 +37,7 @@ trap clean_shutdown 12
37
37
  # Launch virtual machine
38
38
  #kvm -m $VM_MEM -smp $SMP -drive file=/grid5000/images/KVM/alpine_docker.qcow2,if=virtio -snapshot -fsdev local,security_model=none,id=fsdev0,path=$HOME -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare -nographic -net nic,model=virtio,macaddr=$MAC_ADDR -net tap,ifname=$TAP,script=no -monitor unix:/tmp/alpine_docker_vm.mon,server,nowait -localtime -enable-kvm &
39
39
  #kvm -m $VM_MEM -smp $SMP -drive file=$IMAGE,if=virtio -snapshot -fsdev local,security_model=none,id=fsdev0,path=$HOME -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare -nographic -net nic,model=virtio,macaddr=$MAC_ADDR -net tap,ifname=$TAP,script=no -monitor unix:/tmp/vagrant-g5k.mon,server,nowait -localtime -enable-kvm &
40
- kvm -m $VM_MEM -smp $SMP -snapshot -fsdev local,security_model=none,id=fsdev0,path=$HOME -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare -nographic -monitor unix:/tmp/vagrant-g5k.mon,server,nowait -localtime -enable-kvm $@ &
40
+ kvm -m $VM_MEM -smp $SMP -fsdev local,security_model=none,id=fsdev0,path=$HOME -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare -nographic -monitor unix:/tmp/vagrant-g5k.mon,server,nowait -localtime -enable-kvm $@ &
41
41
 
42
42
  wait
43
43
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module G5K
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-g5k
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Simonin
@@ -129,8 +129,6 @@ files:
129
129
  - lib/vagrant-g5k.rb
130
130
  - lib/vagrant-g5k/.config.rb.swp
131
131
  - lib/vagrant-g5k/action.rb
132
- - lib/vagrant-g5k/action/.connect_g5k.rb.swp
133
- - lib/vagrant-g5k/action/.read_ssh_info.rb.swp
134
132
  - lib/vagrant-g5k/action/connect_g5k.rb
135
133
  - lib/vagrant-g5k/action/create_local_working_dir.rb
136
134
  - lib/vagrant-g5k/action/delete_job.rb