vagrant-g5k 0.9.3 → 0.9.4
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 +2 -1
- data/Vagrantfile +55 -59
- data/Vagrantfile.multi +47 -0
- data/Vagrantfile.old +69 -55
- data/lib/vagrant-g5k/network/nat.rb +2 -0
- data/lib/vagrant-g5k/util/launch_vm.sh +1 -1
- data/lib/vagrant-g5k/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 434ab6db97a6c01d75354834cde480eeab3d174b
|
4
|
+
data.tar.gz: dd8d702c1e0245781af2503ccc37f7b7c8634643
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e499327e153f8a18e80af8d7c2ddd724b42518ed01618381a7a492a6bb550c074d0ab1a05ecb879da49bbe5e01f6414335b7b94acacc0e5406859783325177cb
|
7
|
+
data.tar.gz: 95349e887d1802f26b0a2871faf3cef7c3a8f399b44906c422c9d9edd53c678146136409f4fe4600d66617be4385e1d0d401522182e220d49880b9102be741d8
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/Vagrantfile
CHANGED
@@ -4,72 +4,68 @@
|
|
4
4
|
# Sample Vagrantfile
|
5
5
|
#
|
6
6
|
Vagrant.configure(2) do |config|
|
7
|
-
config.hostmanager.enabled = true
|
8
|
-
config.hostmanager.manage_guest = true
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
g5k.project_id = "test-vagrant-g5k"
|
8
|
+
config.vm.provider "g5k" do |g5k, override|
|
9
|
+
# This is mandatory for the shared folders to work correctly
|
10
|
+
override.nfs.functional = false
|
11
|
+
# project id must be unique accross all
|
12
|
+
# your projects using vagrant-g5k to avoid conflict
|
13
|
+
# on vm disks
|
14
|
+
g5k.project_id = "test-vagrant-g5k"
|
18
15
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
#g5k.site = "igrida"
|
17
|
+
g5k.site = "rennes"
|
18
|
+
g5k.username = "msimonin"
|
19
|
+
g5k.gateway = "access.grid5000.fr"
|
20
|
+
g5k.walltime = "00:10:00"
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
22
|
+
# Image backed on the frontend filesystem
|
23
|
+
g5k.image = {
|
24
|
+
:path => "/home/msimonin/public/ubuntu1404-9p.qcow2",
|
25
|
+
:backing => "snapshot"
|
26
|
+
}
|
31
27
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
## Bridged network : this allow VMs to communicate
|
29
|
+
#g5k.net = {
|
30
|
+
# :type => "bridge"
|
31
|
+
#}
|
36
32
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
33
|
+
## Nat network : VMs will only have access to the external world
|
34
|
+
## Forwarding ports will allow you to access services hosted inside the
|
35
|
+
## VM.
|
36
|
+
g5k.net = {
|
37
|
+
:type => "nat",
|
38
|
+
:ports => ["2222-:22"]
|
39
|
+
}
|
44
40
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
## OAR selection of resource
|
42
|
+
g5k.oar = "virtual != 'none'"
|
43
|
+
#g5k.oar = "virtual != 'None' and network_address in ('paranoia-2.rennes.grid5000.fr')"
|
44
|
+
#g5k.oar = "network_address in ('igrida12-12.irisa.fr')"
|
49
45
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
46
|
+
## VM size customization default values are
|
47
|
+
## cpu => -1 -> all the cpu of the reserved node
|
48
|
+
## mem => -1 -> all the mem of the reserved node
|
49
|
+
##
|
50
|
+
g5k.resources = {
|
51
|
+
:cpu => 1,
|
52
|
+
:mem => 2048
|
53
|
+
}
|
54
|
+
end #g5k
|
59
55
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
56
|
+
## This define a VM.
|
57
|
+
## a g5k provider section will override top level options
|
58
|
+
## To define multiple VMs you can
|
59
|
+
## * either repeat the block
|
60
|
+
## * loop over using (1..N).each block
|
61
|
+
config.vm.define "test" do |my|
|
62
|
+
my.vm.box = "dummy"
|
63
|
+
## Configure the shared folders between your host and the VM
|
64
|
+
my.vm.synced_folder ".", "/vagrant", type: "rsync", disabled: false
|
65
|
+
## This is mandatory until #6 is fixed
|
66
|
+
## In particular this is needed for the shared folders
|
67
|
+
my.ssh.insert_key = false
|
68
|
+
|
69
|
+
end #vm
|
72
70
|
|
73
|
-
end #vm
|
74
|
-
end
|
75
71
|
end
|
data/Vagrantfile.multi
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
#
|
4
|
+
# Sample Vagrantfile
|
5
|
+
#
|
6
|
+
Vagrant.configure(2) do |config|
|
7
|
+
|
8
|
+
|
9
|
+
## This define a VM.
|
10
|
+
## a g5k provider section will override top level options
|
11
|
+
## To define multiple VMs you can
|
12
|
+
## * either repeat the block
|
13
|
+
## * loop over using (1..N).each block
|
14
|
+
(1..3).each do |i|
|
15
|
+
config.vm.define "test-#{i}" do |my|
|
16
|
+
my.vm.box = "dummy"
|
17
|
+
## Configure the shared folders between your host and the VM
|
18
|
+
my.vm.synced_folder ".", "/vagrant", type: "rsync", disabled: false
|
19
|
+
## This is mandatory until #6 is fixed
|
20
|
+
## In particular this is needed for the shared folders
|
21
|
+
my.ssh.insert_key = false
|
22
|
+
my.vm.provider "g5k" do |g5k, override|
|
23
|
+
override.nfs.functional = false
|
24
|
+
g5k.project_id = "test-vagrant-g5k"
|
25
|
+
g5k.site = "rennes"
|
26
|
+
g5k.username = "msimonin"
|
27
|
+
g5k.gateway = "access.grid5000.fr"
|
28
|
+
g5k.walltime = "00:10:00"
|
29
|
+
g5k.image = {
|
30
|
+
:path => "/home/msimonin/public/ubuntu1404-9p.qcow2",
|
31
|
+
:backing => "snapshot"
|
32
|
+
}
|
33
|
+
g5k.net = {
|
34
|
+
:type => "bridge",
|
35
|
+
# :ports => ["#{2222+i}-:22"]
|
36
|
+
}
|
37
|
+
g5k.oar = "virtual != 'none'"
|
38
|
+
g5k.resources = {
|
39
|
+
:cpu => 1,
|
40
|
+
:mem => 2048
|
41
|
+
}
|
42
|
+
end #g5k
|
43
|
+
|
44
|
+
end #vm
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
data/Vagrantfile.old
CHANGED
@@ -3,70 +3,84 @@
|
|
3
3
|
#
|
4
4
|
# Sample Vagrantfile
|
5
5
|
#
|
6
|
+
$script = <<SCRIPT
|
7
|
+
add-apt-repository ppa:ubuntu-lxc/lxd-stable
|
8
|
+
apt-get update
|
9
|
+
apt-get install -y lxd
|
10
|
+
lxd init --auto
|
11
|
+
lxc network attach-profile br0 default eth0
|
12
|
+
SCRIPT
|
13
|
+
|
14
|
+
|
6
15
|
Vagrant.configure(2) do |config|
|
16
|
+
config.hostmanager.enabled = true
|
17
|
+
config.hostmanager.manage_guest = true
|
7
18
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
(0..0).each do |i|
|
20
|
+
config.vm.provider "g5k" do |g5k, override|
|
21
|
+
# This is mandatory for the shared folders to work correctly
|
22
|
+
override.nfs.functional = false
|
23
|
+
# project id must be unique accross all
|
24
|
+
# your projects using vagrant-g5k to avoid conflict
|
25
|
+
# on vm disks
|
26
|
+
g5k.project_id = "test-vagrant-g5k"
|
15
27
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
28
|
+
#g5k.site = "igrida"
|
29
|
+
g5k.site = "rennes"
|
30
|
+
g5k.username = "msimonin"
|
31
|
+
g5k.gateway = "access.grid5000.fr"
|
32
|
+
g5k.walltime = "02:00:00"
|
21
33
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
34
|
+
# Image backed on the frontend filesystem
|
35
|
+
g5k.image = {
|
36
|
+
# :path => "/udd/msimonin/precise.qcow2",
|
37
|
+
:path => "/home/msimonin/public/ubuntu1404-9p.qcow2",
|
38
|
+
:backing => "snapshot"
|
39
|
+
}
|
28
40
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
41
|
+
## Bridged network : this allow VMs to communicate
|
42
|
+
g5k.net = {
|
43
|
+
:type => "bridge"
|
44
|
+
}
|
33
45
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
:type => "nat",
|
39
|
-
:ports => ["2222-:22"]
|
40
|
-
|
46
|
+
## Nat network : VMs will only have access to the external world
|
47
|
+
## Forwarding ports will allow you to access services hosted inside the
|
48
|
+
## VM.
|
49
|
+
#g5k.net = {
|
50
|
+
# :type => "nat",
|
51
|
+
# :ports => ["2222-:22"]
|
52
|
+
#}
|
41
53
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
54
|
+
## OAR selection of resource
|
55
|
+
g5k.oar = "virtual != 'none'"
|
56
|
+
#g5k.oar = "virtual != 'None' and network_address in ('paranoia-2.rennes.grid5000.fr')"
|
57
|
+
#g5k.oar = "network_address in ('igrida12-12.irisa.fr')"
|
46
58
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
:cpu => 1,
|
53
|
-
:mem => 2048
|
54
|
-
|
55
|
-
|
59
|
+
## VM size customization default values are
|
60
|
+
## cpu => -1 -> all the cpu of the reserved node
|
61
|
+
## mem => -1 -> all the mem of the reserved node
|
62
|
+
##
|
63
|
+
#g5k.resources = {
|
64
|
+
# :cpu => 1,
|
65
|
+
# :mem => 2048
|
66
|
+
#}
|
67
|
+
end #g5k
|
56
68
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
## This define a VM.
|
70
|
+
## a g5k provider section will override top level options
|
71
|
+
## To define multiple VMs you can
|
72
|
+
## * either repeat the block
|
73
|
+
## * loop over using (1..N).each block
|
74
|
+
config.vm.define "exp#{i}" do |my|
|
75
|
+
my.vm.box = "dummy"
|
76
|
+
## Configure the shared folders between your host and the VM
|
77
|
+
my.vm.synced_folder ".", "/vagrant", type: "rsync", disabled: true
|
78
|
+
## This is mandatory until #6 is fixed
|
79
|
+
## In particular this is needed for the shared folders
|
80
|
+
my.ssh.insert_key = false
|
69
81
|
|
70
|
-
|
82
|
+
my.vm.provision "shell", inline: $script
|
83
|
+
end #vm
|
71
84
|
|
85
|
+
end
|
72
86
|
end
|
@@ -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.$OAR_JOB_ID.mon,server,nowait -localtime -enable-kvm
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu Simonin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iniparse
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- LICENSE
|
147
147
|
- README.md
|
148
148
|
- Vagrantfile
|
149
|
+
- Vagrantfile.multi
|
149
150
|
- Vagrantfile.old
|
150
151
|
- dummy.box
|
151
152
|
- lib/vagrant-g5k.rb
|