ruby-cute 0.11 → 0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6202a18499e60b25ccb685d69285251288e565a8
4
- data.tar.gz: 3878e7c9fb9822fc911889ca8fb48b6b28df7f7c
3
+ metadata.gz: 4fa0a0d9d7a8e3f7cfd35add2bc9e4404329a516
4
+ data.tar.gz: faa35626a2faa2da58202c7fb4e1633e39bf0ad5
5
5
  SHA512:
6
- metadata.gz: 2c929691eb5b0c87268c6626d70f45544cd144df051f02941cda40297e6b151ed0a18ab8bc83664c456f22f8c6ab5c44d1793dd0edace7e17c8a8cb6e69b8c43
7
- data.tar.gz: 5eec3f8391dc7c2462abdbec4c1ef5a5c2d994b1fc53faaa377007ff3b9504e1935824fd3d85b559de20f5a6a0233247570240257f69920c547cefd9b39ca19a
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
- uri: https://api.grid5000.fr/
37
- username: user
38
- password: **********
39
- EOF
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
 
@@ -1,3 +1,9 @@
1
+ ruby-cute (0.11) unstable; urgency=medium
2
+
3
+ * New release.
4
+
5
+ -- Lucas Nussbaum <lucas@debian.org> Fri, 16 Feb 2018 05:06:54 +0100
6
+
1
7
  ruby-cute (0.8) unstable; urgency=medium
2
8
 
3
9
  * New release.
@@ -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", "reims", "rennes", "sophia", "toulouse"]
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
- => ["adonis", "edel", "genepi"]
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 1024 -N "" -t rsa -f ~/my_ssh_jobkey
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 1024 -N "" -t rsa -f ~/my_ssh_jobkey
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 Grenoble and Nancy sites. If you
170
- take a look at {https://www.grid5000.fr/mediawiki/index.php/Status Monika} you will see that in Nancy we should use the OAR property 'ib20g' and in Grenoble we should use 'ib10g'.
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 ib10g in Grenoble.
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 => "{ib20g='YES'}/nodes=2/core=1",:walltime => '01:00:00', :keys => "~/my_ssh_jobkey" )
175
- 2015-12-04 14:07:31.370 => Reserving resources: {ib20g='YES'}/nodes=2/core=1,walltime=01:00 (type: ) (in nancy)
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 => "{ib20g='YES'}/nodes=2/core=1",:walltime => '01:00:00', :keys => "~/my_ssh_jobkey" )
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 }
@@ -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} (#{machine}) Ruby #{RUBY_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
@@ -1,3 +1,3 @@
1
1
  module Cute
2
- VERSION = "0.11"
2
+ VERSION = "0.12"
3
3
  end
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.11'
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: 2017-08-31 00:00:00.000000000 Z
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