vagrant-g5k 0.9.1 → 0.9.2

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: bad549f807cf2aa5b7c6bc5bef799e00ea8bc5e7
4
- data.tar.gz: 8b56db026b2a0712f338a8a983c6540bfa8ed865
3
+ metadata.gz: 66d54d0bd6561de0ae64704dd3d193bc33c9315c
4
+ data.tar.gz: cf831d202c096f406b2e5bd6fc28096f8aa041a4
5
5
  SHA512:
6
- metadata.gz: c4cec907465a00958ab204513169098326701d52b1b19869b78dba7864739a394c260c5c3844b28db9c4d3d6f1007fe65e0bfbeb12dc467e3d22f2723d2afefd
7
- data.tar.gz: 7214b015047e8ec53868471c99477e6054a6543dc8ae0920a28c64b41e0128951c846c1e63faa38d248c9c6abd69331fff6e925996d65005cb6d68c5f3674b0f
6
+ metadata.gz: aae8a2021bc6d8aa4fa49e2c9756a896a7170dbb75b15886f47d8eeef45aa02fdcfff91309c7913948ade786b230ae91d0b06bfdbd9e1394ddae7d2ad9a121f8
7
+ data.tar.gz: 27845918e8cb2457d69c89a20f97dc9236473b918087fd70a1276e5692c87a790556c6353a8f15459c55851c04b6f98b62e61b45bf9e26540eea4bf1011e4740
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.9.2
2
+
3
+ * Make the monitor socket location unique
4
+
1
5
  # 0.9.1
2
6
 
3
7
  * Allow custom cpu and memory demands.
data/README.md CHANGED
@@ -51,8 +51,8 @@ The outside world can access the VMs on dedicated ports that are mapped in the h
51
51
  config.vm.provider "g5k" do |g5k|
52
52
  [...]
53
53
  g5k.net = {
54
- "type": "nat",
55
- "ports": ["2222-:22", "8080-":80]
54
+ :type => "nat",
55
+ :ports => ["2222-:22", "8080-":80]
56
56
  }
57
57
  end
58
58
  ```
@@ -65,13 +65,28 @@ e.g : Assuming `parapluie-1.rennes.grid5000.fr` hosts the VM. A SSH tunnel from
65
65
  config.vm.provider "g5k" do |g5k|
66
66
  [...]
67
67
  g5k.net = {
68
- "type": "bridge"
68
+ :type => "bridge"
69
69
  }
70
70
  end
71
71
  ```
72
72
 
73
73
  > Due to the dynamic nature of the subnet reserved on Grid'5000, IPs of the VMs will change accross reboots
74
74
 
75
+ ## Note on resource demand
76
+
77
+ CPU and memory demand can be ajusted with the following in your Vagrantfile.
78
+
79
+ ```
80
+ config.vm.provider "g5k" do |g5k|
81
+ [...]
82
+ g5k.resource = {
83
+ :cpu => 2,
84
+ :mem => 4096
85
+ }
86
+ end
87
+ ```
88
+ You can use `:cpu => -1` to express that you want all the cpu of the reserved node (but not necesseraly all the memory). Similarly `:mem => -1` will give you all the memory available on the reserved node. These are the default values.
89
+
75
90
 
76
91
  ## Supported operations
77
92
 
data/Vagrantfile CHANGED
@@ -3,77 +3,48 @@
3
3
  #
4
4
  # Sample Vagrantfile
5
5
  #
6
+ N = 3
6
7
  Vagrant.configure(2) do |config|
7
8
 
8
- config.vm.provider "g5k" do |g5k|
9
- # project id must be unique accross all
10
- # your projects using vagrant-g5k to avoid conflict
11
- # on vm disks
12
- g5k.project_id = "vagrant-g5k"
13
- g5k.site = "rennes"
14
- g5k.username = ENV["USER"]
15
- g5k.gateway = "access.grid5000.fr"
16
- g5k.walltime = "01:00:00"
17
-
18
- ## Image backed by the ceph cluster
19
- #g5k.image = {
20
- # :pool => "msimonin_rbds",
21
- # :rbd => "bases/ubuntu1404-9p",
22
- # :snapshot => "parent",
23
- # :id => "$USER",
24
- # :conf => "$HOME/.ceph/config",
25
- # :backing => "copy"
26
- #}
27
-
28
- # Image backed on the frontend filesystem
29
- g5k.image = {
30
- :path => "/grid5000/virt-images/alpine_docker.qcow2",
31
- :backing => "copy"
32
- }
33
-
34
- ## Bridged network : this allow VMs to communicate
35
- #g5k.net = {
36
- # :type => "bridge"
37
- #}
38
-
39
- ## Nat network : VMs will only have access to the external world
40
- ## Forwarding ports will allow you to access services hosted inside the
41
- ## VM.
42
- g5k.net = {
43
- :type => "nat",
44
- :ports => ["2222-:22"]
45
- }
46
-
47
- ## OAR selection of resource
48
- g5k.oar = "virtual != 'none'"
49
-
50
- ## VM size customization default values are
51
- ## cpu => -1 -> all the cpu of the reserved node
52
- ## mem => -1 -> all the mem of the reserved node
53
- ##
54
- #g5k.resources = {
55
- # :cpu => 1,
56
- # :mem => 2048
57
- #}
58
- end #g5k
59
-
60
9
  ## This define a VM.
61
10
  ## a g5k provider section will override top level options
62
11
  ## To define multiple VMs you can
63
12
  ## * either repeat the block
64
13
  ## * loop over using (1..N).each block
65
- config.vm.define "vm" do |my|
66
- my.vm.box = "dummy"
67
-
68
- ## Access to the vm
69
- ## This is specific to alpine_docker
70
- ## It's better to use a vagrant image
71
- ## converted to qcow2
72
- my.ssh.username = "root"
73
- my.ssh.password = ""
74
-
75
- end #vm
76
-
77
- end
14
+ (1..N).each do |i|
15
+ config.vm.define "vm#{i}" do |my|
16
+ my.vm.box = "dummy"
17
+
18
+ ## Access to the vm
19
+ ## This is specific to alpine_docker
20
+ ## It's better to use a vagrant image
21
+ ## converted to qcow2
22
+ my.ssh.username = "root"
23
+ my.ssh.password = ""
24
+ my.vm.provider "g5k" do |g5k|
25
+ g5k.project_id = "vagrant-g5k"
26
+ g5k.site = "lille"
27
+ g5k.username = ENV["USER"]
28
+ g5k.gateway = "access.grid5000.fr"
29
+ g5k.walltime = "01:00:00"
30
+ g5k.image = {
31
+ :path => "public/alpine_docker.qcow2",
32
+ :backing => "snapshot"
33
+ }
34
+ g5k.net = {
35
+ :type => "nat",
36
+ :ports => ["222#{i}-:22"]
37
+ }
38
+
39
+ g5k.oar = "virtual != 'none'"
40
+
41
+ g5k.resources = {
42
+ :cpu => 1,
43
+ :mem => 2048
44
+ }
45
+ end #g5k
46
+ end
47
+ end
48
+ end
78
49
 
79
50
 
@@ -79,7 +79,7 @@ clean_shutdown() {
79
79
  trap clean_shutdown 12
80
80
 
81
81
  # Launch virtual machine
82
- kvm -m $VM_MEM -smp cores=$SMP,threads=1,sockets=1 -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 $net $@ &
82
+ kvm -m $VM_MEM -smp cores=$SMP,threads=1,sockets=1 -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.$OAR_JOB_ID.mon,server,nowait -localtime -enable-kvm $net $@ &
83
83
 
84
84
  wait
85
85
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module G5K
3
- VERSION = '0.9.1'
3
+ VERSION = '0.9.2'
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.9.1
4
+ version: 0.9.2
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-11-14 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iniparse