vagrant-g5k 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +18 -3
- data/Vagrantfile +36 -65
- data/lib/vagrant-g5k/util/launch_vm.sh +1 -1
- 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: 66d54d0bd6561de0ae64704dd3d193bc33c9315c
|
4
|
+
data.tar.gz: cf831d202c096f406b2e5bd6fc28096f8aa041a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae8a2021bc6d8aa4fa49e2c9756a896a7170dbb75b15886f47d8eeef45aa02fdcfff91309c7913948ade786b230ae91d0b06bfdbd9e1394ddae7d2ad9a121f8
|
7
|
+
data.tar.gz: 27845918e8cb2457d69c89a20f97dc9236473b918087fd70a1276e5692c87a790556c6353a8f15459c55851c04b6f98b62e61b45bf9e26540eea4bf1011e4740
|
data/CHANGELOG.md
CHANGED
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
|
-
|
55
|
-
|
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
|
-
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
|
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.9.
|
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-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iniparse
|