vagrant-g5k 0.0.5 → 0.0.6
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 +4 -4
- data/README.md +7 -1
- data/lib/vagrant-g5k/action/read_ssh_info.rb +15 -3
- data/lib/vagrant-g5k/util/g5k_utils.rb +0 -2
- 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: 86aa6692b587f6dafb5af922cd68f0093ef881dd
|
4
|
+
data.tar.gz: 34f959c39976c1a691fff4a56dea00936833f933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e830af79549e92e5eeea46ac5f916614da5f289e4660e5a5889975b97c2ae1f506ee314434834ed8f0e3e35d51165d36072da3ffd88866ee3e6b660429342ff6
|
7
|
+
data.tar.gz: 20e48f9704439fbe1b60a20e88244c4e31cf190ae837fa5b9e293848f4b9ad2a185b94af2c4423662a7780bbfe2ced3086c8ca5b7a723e78070fd058ed411d44
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Vagrant G5K Provider
|
2
2
|
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds an [G5K](https://www.grid5000.fr)
|
3
|
-
provider to Vagrant, allowing Vagrant to control and provision machines in
|
3
|
+
provider to Vagrant, allowing Vagrant to control and provision **virtual machines** in
|
4
4
|
Grid5000.
|
5
5
|
|
6
6
|
**NOTE:** This plugin requires Vagrant 1.2+,
|
@@ -25,3 +25,9 @@ $ vagrant up --provider=g5k
|
|
25
25
|
## Configuration
|
26
26
|
|
27
27
|
Check the Vagrantfile.
|
28
|
+
|
29
|
+
## Supported operations
|
30
|
+
|
31
|
+
* `vagrant up`
|
32
|
+
* `vagrant ssh`
|
33
|
+
* `vagrant destroy`
|
@@ -12,16 +12,28 @@ module VagrantPlugins
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def call(env)
|
15
|
-
|
15
|
+
ports = env[:machine].provider_config.ports
|
16
|
+
ssh_fwd = ports.select{ |x| x.split(':')[1] == '22'}.first
|
17
|
+
if ssh_fwd.nil?
|
18
|
+
env[:ui].error "SSH port 22 must be forwarded"
|
19
|
+
raise Error "SSh port 22 isn't forwarded"
|
20
|
+
end
|
21
|
+
ssh_fwd = ssh_fwd.split('-:')[0]
|
22
|
+
env[:machine_ssh_info] = read_ssh_info(env[:g5k_connection], env[:machine], ssh_fwd)
|
16
23
|
|
17
24
|
@app.call(env)
|
18
25
|
end
|
19
26
|
|
20
|
-
def read_ssh_info(conn, machine)
|
27
|
+
def read_ssh_info(conn, machine, ssh_fwd)
|
21
28
|
return nil if machine.id.nil?
|
22
29
|
|
30
|
+
if ssh_fwd.nil?
|
31
|
+
|
32
|
+
raise Error "ssh_port should be forwarded"
|
33
|
+
end
|
34
|
+
|
23
35
|
return { :host => conn.node,
|
24
|
-
:port =>
|
36
|
+
:port => ssh_fwd,
|
25
37
|
:proxy_command => "ssh #{conn.username}@access.grid5000.fr nc %h %p",
|
26
38
|
}
|
27
39
|
end
|
data/lib/vagrant-g5k/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu Simonin
|
@@ -129,7 +129,8 @@ 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/.
|
132
|
+
- lib/vagrant-g5k/action/.connect_g5k.rb.swp
|
133
|
+
- lib/vagrant-g5k/action/.read_ssh_info.rb.swp
|
133
134
|
- lib/vagrant-g5k/action/connect_g5k.rb
|
134
135
|
- lib/vagrant-g5k/action/create_local_working_dir.rb
|
135
136
|
- lib/vagrant-g5k/action/delete_job.rb
|