ruby-cute 0.11 → 0.12
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 +6 -4
- data/debian/changelog +6 -0
- data/examples/g5k-tutorial.md +15 -10
- data/lib/cute/g5k_api.rb +3 -1
- data/lib/cute/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fa0a0d9d7a8e3f7cfd35add2bc9e4404329a516
|
4
|
+
data.tar.gz: faa35626a2faa2da58202c7fb4e1633e39bf0ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d18ecc0aecbb55541f65c61749013ac9bd62a16e2a1b1005a67ed1e0577f0fee279408ed39f4406672137a02d1b1e24c51826328b1d733945cda677cd183e835
|
7
|
+
data.tar.gz: 1a2fa49eb86f36bb3fa39ef37ee24a8c4f2001f39ef02374b40bbca17da0cf6872ef6ce0196e49defe35fc912a1123f7bb094a52142dfed6bb1ec66e86298238
|
data/README.md
CHANGED
@@ -33,10 +33,12 @@ By default you need to create a file called *.grid5000_api.yml* located in your
|
|
33
33
|
```bash
|
34
34
|
|
35
35
|
$ cat > ~/.grid5000_api.yml << EOF
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
uri: https://api.grid5000.fr/
|
37
|
+
username: user
|
38
|
+
password: **********
|
39
|
+
EOF
|
40
|
+
|
41
|
+
$ chmod og-r ~/.grid5000_api.yml
|
40
42
|
|
41
43
|
```
|
42
44
|
|
data/debian/changelog
CHANGED
data/examples/g5k-tutorial.md
CHANGED
@@ -53,16 +53,16 @@ The variable *$g5k* is available which can be used to access the Grid'5000 API t
|
|
53
53
|
let's request the name of the sites available in Grid'5000.
|
54
54
|
|
55
55
|
[2] pry(main)> $g5k.site_uids()
|
56
|
-
=> ["grenoble", "lille", "luxembourg", "lyon", "nancy", "nantes", "
|
56
|
+
=> ["grenoble", "lille", "luxembourg", "lyon", "nancy", "nantes", "rennes", "sophia"]
|
57
57
|
|
58
58
|
We can consult the name of the clusters available in a specific site.
|
59
59
|
|
60
60
|
[3] pry(main)> $g5k.cluster_uids("grenoble")
|
61
|
-
=> ["
|
61
|
+
=> ["edel", "genepi"]
|
62
62
|
|
63
63
|
It is possible to execute shell commands, however all commands have to be prefixed with a dot ".". For example we could generate a pair of SSH keys using:
|
64
64
|
|
65
|
-
[7] pry(main)> .ssh-keygen -b
|
65
|
+
[7] pry(main)> .ssh-keygen -b 4096 -N "" -t rsa -f ~/my_ssh_jobkey
|
66
66
|
|
67
67
|
Another advantage is the possibility of exploring the loaded Ruby modules.
|
68
68
|
Let's explore the [Cute](http://www.rubydoc.info/github/ruby-cute/ruby-cute/master/Cute) module.
|
@@ -159,20 +159,25 @@ We can observe that the variable `sites_infiniband` is now defined, telling us t
|
|
159
159
|
|
160
160
|
Then, create a pair of SSH keys (Necessary for OARSSH):
|
161
161
|
|
162
|
-
[23] pry(main)> .ssh-keygen -b
|
162
|
+
[23] pry(main)> .ssh-keygen -b 4096 -N "" -t rsa -f ~/my_ssh_jobkey
|
163
163
|
|
164
164
|
We send the generated keys to the chosen site (ssh configuration has be set up for the following command to work,
|
165
165
|
see [SSH Configuration](https://www.grid5000.fr/mediawiki/index.php/SSH_and_Grid%275000) for more information):
|
166
166
|
|
167
167
|
[24] pry(main)> .scp ~/my_ssh* nancy:~/
|
168
168
|
|
169
|
-
Now that we have found the sites, let's submit a job. You can use between
|
170
|
-
|
169
|
+
Now that we have found the sites, let's submit a job. You can use between
|
170
|
+
Grenoble and Nancy sites. If you take a look at
|
171
|
+
{https://www.grid5000.fr/mediawiki/index.php/Status Monika} you will see that in
|
172
|
+
Nancy we should use the OAR property 'ib_rate=20' and in Grenoble we should use
|
173
|
+
'ib_rate=10'. More simply you can use the property ib_count=1 which will give
|
174
|
+
you nodes with infiniband whatever the rate.
|
175
|
+
|
171
176
|
Given that the MPI bench uses just one MPI process, we will need in realty just one core of a given machine.
|
172
|
-
We will use OAR syntax to ask for two cores in two different nodes with
|
177
|
+
We will use OAR syntax to ask for two cores in two different nodes with ib_rate=10 in Grenoble.
|
173
178
|
|
174
|
-
[25] pry(main)> job = $g5k.reserve(:site => "nancy", :resources => "{
|
175
|
-
2015-12-04 14:07:31.370 => Reserving resources: {
|
179
|
+
[25] pry(main)> job = $g5k.reserve(:site => "nancy", :resources => "{ib_rate=20}/nodes=2/core=1",:walltime => '01:00:00', :keys => "~/my_ssh_jobkey" )
|
180
|
+
2015-12-04 14:07:31.370 => Reserving resources: {ib_rate=20}/nodes=2/core=1,walltime=01:00 (type: ) (in nancy)
|
176
181
|
2015-12-04 14:07:41.358 => Waiting for reservation 692665
|
177
182
|
2015-12-04 14:07:41.444 => Reservation 692665 should be available at 2015-12-04 14:07:34 +0100 (0 s)
|
178
183
|
2015-12-04 14:07:41.444 => Reservation 692665 ready
|
@@ -394,7 +399,7 @@ This can help you to assemble everything together in a whole script.
|
|
394
399
|
4: sites_infiniband
|
395
400
|
5: .ls ~/my_ssh*
|
396
401
|
6: .scp ~/my_ssh* nancy:~/
|
397
|
-
7: job = $g5k.reserve(:site => "nancy", :resources => "{
|
402
|
+
7: job = $g5k.reserve(:site => "nancy", :resources => "{ib_rate=20}/nodes=2/core=1",:walltime => '01:00:00', :keys => "~/my_ssh_jobkey" )
|
398
403
|
8: nodes = job["assigned_nodes"]
|
399
404
|
9: machine_file = Tempfile.open('machine_file')
|
400
405
|
10: nodes.each{ |node| machine_file.puts node }
|
data/lib/cute/g5k_api.rb
CHANGED
@@ -198,6 +198,8 @@ module Cute
|
|
198
198
|
class G5KRest
|
199
199
|
|
200
200
|
attr_reader :user
|
201
|
+
attr_accessor :user_agent
|
202
|
+
|
201
203
|
# Initializes a REST connection
|
202
204
|
# @param uri [String] resource identifier which normally is the URL of the Rest API
|
203
205
|
# @param user [String] user if authentication is needed
|
@@ -216,7 +218,7 @@ module Cute
|
|
216
218
|
end
|
217
219
|
|
218
220
|
machine =`uname -ov`.chop
|
219
|
-
@user_agent = "ruby-cute/#{VERSION}
|
221
|
+
@user_agent = "ruby-cute/#{VERSION} Ruby/#{RUBY_VERSION}"
|
220
222
|
@api = RestClient::Resource.new(@endpoint, :timeout => 30,:verify_ssl => false)
|
221
223
|
# some versions of restclient do not verify by default SSL certificates , :verify_ssl => true)
|
222
224
|
# SSL verify is disabled due to Grid'5000 API certificate problem
|
data/lib/cute/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-cute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.12'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algorille team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: 1.3.6
|
236
236
|
requirements: []
|
237
237
|
rubyforge_project:
|
238
|
-
rubygems_version: 2.5.2
|
238
|
+
rubygems_version: 2.5.2.1
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Critically Useful Tools for Experiments
|