neptune 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -6,13 +6,13 @@ Neptune provides programmers with a simple interface
6
6
  by which they can deploy MPI, X10, MapReduce, UPC, and Erlang jobs
7
7
  to without needing to know the particulars of the underlying
8
8
  cloud platform. You only need to give Neptune your code,
9
- tell it how many machines to run on and where to put the output:
9
+ tell it how many machines to run on, and where to put the output:
10
10
  Neptune handles everything else. No more writing configuration
11
11
  files, having to start up NFS on all your machines, yada yada yada.
12
12
  Neptune works together with supported cloud platforms (currently
13
13
  AppScale is recommended) and can deploy over anything AppScale
14
14
  can - Xen or KVM virtual machines as well as Eucalyptus and
15
- Amazon EC2. There's nothing virtualization specific in there,
15
+ Amazon EC2. There's nothing virtualization-specific in there,
16
16
  so in theory any machine installed with the AppScale software
17
17
  should work fine.
18
18
 
@@ -21,30 +21,33 @@ it also can be used to deploy other types of software. For example,
21
21
  Neptune has support for user-specified scaling of the underlying
22
22
  cloud platform: users can write Neptune jobs that manually add
23
23
  load balancers, application servers, or database servers to a running
24
- AppScale deployment. Additionally, as of version 0.0.2, remote
25
- compiling can also be performed: just give Neptune the path to
26
- the directory you want to compile and be sure to include a Makefile
27
- in it! Neptune will run 'make' on it (you can specify which target
28
- to make as well) and return to you a folder containing the standard
29
- out and standard error of the make command.
24
+ AppScale deployment. Remote compiling can also be performed: just give
25
+ Neptune the path to the directory you want to compile and be sure to
26
+ include a Makefile in it! Neptune will run 'make' on it (you can specify
27
+ which target to make as well) and return to you a folder containing the
28
+ standard out and standard error of the make command.
30
29
 
31
30
  By default, Neptune jobs store their outputs in the underlying database
32
- that AppScale is running over. As of Neptune 0.0.5, job outputs can
33
- also be stored in Amazon S3, Eucalyptus Walrus, and Google Storage.
31
+ that AppScale is running over. Job outputs can also be stored in anything
32
+ that utilizes the Amazon S3 API. We have tested and confirmed compatibility
33
+ with Amazon S3, Eucalyptus Walrus, and Google Storage.
34
34
 
35
- Sample Neptune job scripts can be found in samples. Test cases can
36
- be found in the test folder, with the standard naming convention
35
+ Sample Neptune job scripts can be found in samples. Integration tests
36
+ can be found in test/integration, with the standard naming convention
37
37
  - ts_neptune is the test suite runner, with tc_* containing test
38
38
  cases for each type of job that Neptune offers. Before running
39
39
  ts_neptune, you should export the environment variable APPSCALE_HEAD_NODE,
40
40
  which should be set to the IP address of the AppScale machine that runs
41
- the Shadow daemon (a.k.a. the Master AppController). Running
42
- generate_coverage.sh in the top-level directory will run rcov
43
- and generate the coverage reports automatically via unit tests.
41
+ the Shadow daemon (a.k.a. the Master AppController).
44
42
 
45
- Developed by Chris Bunch as part of the AppScale project.
46
- See LICENSE for the specifics of the New BSD License
47
- by which Neptune is released.
43
+ Running generate_coverage.sh in the top-level directory will run rcov
44
+ and generate code coverage reports automatically via unit tests, found in
45
+ test/unit. Running test/unit/ts_all.rb will execute all unit tests, and
46
+ does not require AppScale to be running, or any special environment
47
+ variables to be set.
48
+
49
+ Developed by Chris Bunch as part of the AppScale project. See LICENSE for
50
+ the specifics of the New BSD License by which Neptune is released.
48
51
 
49
52
  Check us out on the web:
50
53
 
@@ -56,16 +59,18 @@ http://appscale.cs.ucsb.edu
56
59
  Contributors welcome! We would love to add support for other
57
60
  cloud platforms and test out Neptune more on non-virtualized
58
61
  deployments, as well as adding capabilities for other types
59
- of computation. We would also like to refactor Neptune to use
60
- symbols instead of instance variables for running jobs: this
61
- will likely appear in a future release as well.
62
+ of computation.
62
63
 
63
64
  Our academic paper on Neptune won best paper at ACM ScienceCloud 2011!
64
- <a href='http://www.neptune-lang.org/2011/6/Neptune-Picks-up-Best-Paper-at-ScienceCloud-2011'>
65
- Here's a link</a> to the abstract of the paper and the PDF.
65
+ View the abstract of the paper and the PDF here:
66
+ http://www.neptune-lang.org/2011/6/Neptune-Picks-up-Best-Paper-at-ScienceCloud-2011
66
67
 
67
68
  Version History:
68
69
 
70
+ December 6, 2011 - 0.1.4 released, allowing MPI jobs (and by extension,
71
+ UPC/X10/KDT jobs) to specify command-line arguments via :argv that should be
72
+ passed to the executable.
73
+
69
74
  December 4, 2011 - 0.1.3 released, adding support for KDT (Knowledge Discovery
70
75
  Toolkit) and Cicero, a framework for automatic task execution over Google
71
76
  App Engine and AppScale.
@@ -233,7 +233,7 @@ indicates whether or not the compilation was successful.</p>
233
233
  <div class="method-source-code"
234
234
  id="compile_code-source">
235
235
  <pre>
236
- <span class="ruby-comment"># File lib/neptune.rb, line 290</span>
236
+ <span class="ruby-comment"># File lib/neptune.rb, line 301</span>
237
237
  def compile_code(job_data, ssh_args, shadow_ip, shell=<span class="ruby-constant">Kernel</span>.method(:`))
238
238
  compiled_location = controller.compile_code(job_data)
239
239
 
@@ -333,7 +333,7 @@ job succeeded and if it failed, the reason for it.</p>
333
333
  <div class="method-source-code"
334
334
  id="get_input-source">
335
335
  <pre>
336
- <span class="ruby-comment"># File lib/neptune.rb, line 236</span>
336
+ <span class="ruby-comment"># File lib/neptune.rb, line 247</span>
337
337
  def get_input(job_data, ssh_args, shadow_ip, controller, file=<span class="ruby-constant">File</span>,
338
338
  shell=<span class="ruby-constant">Kernel</span>.method(:`))
339
339
  result = {:result =&gt; :success}
@@ -394,7 +394,7 @@ end</pre>
394
394
  <div class="method-source-code"
395
395
  id="get_job_data-source">
396
396
  <pre>
397
- <span class="ruby-comment"># File lib/neptune.rb, line 151</span>
397
+ <span class="ruby-comment"># File lib/neptune.rb, line 162</span>
398
398
  def get_job_data(params)
399
399
  job_data = {}
400
400
  params.each { |k, v|
@@ -470,7 +470,7 @@ not the job completed successfully (success = no errors).</p>
470
470
  <div class="method-source-code"
471
471
  id="get_std_out_and_err-source">
472
472
  <pre>
473
- <span class="ruby-comment"># File lib/neptune.rb, line 319</span>
473
+ <span class="ruby-comment"># File lib/neptune.rb, line 330</span>
474
474
  def get_std_out_and_err(location)
475
475
  result = {}
476
476
 
@@ -523,7 +523,7 @@ vice-versa).</p>
523
523
  <div class="method-source-code"
524
524
  id="neptune-source">
525
525
  <pre>
526
- <span class="ruby-comment"># File lib/neptune.rb, line 408</span>
526
+ <span class="ruby-comment"># File lib/neptune.rb, line 419</span>
527
527
  def neptune(params)
528
528
  puts <span class="ruby-string">&quot;Received a request to run a job.&quot;</span>
529
529
  puts params[:type]
@@ -694,6 +694,17 @@ def preprocess_mpi(job_data)
694
694
  end
695
695
  end
696
696
 
697
+ if job_data[<span class="ruby-string">&quot;@argv&quot;</span>]
698
+ argv = job_data[<span class="ruby-string">&quot;@argv&quot;</span>]
699
+ if argv.class != <span class="ruby-constant">String</span> and argv.class != <span class="ruby-constant">Array</span>
700
+ abort(<span class="ruby-string">&quot;The value specified for :argv must be either a String or Array&quot;</span>)
701
+ end
702
+
703
+ if argv.class == <span class="ruby-constant">Array</span>
704
+ job_data[<span class="ruby-string">&quot;@argv&quot;</span>] = argv.join(<span class="ruby-string">' '</span>)
705
+ end
706
+ end
707
+
697
708
  return job_data
698
709
  end</pre>
699
710
  </div>
@@ -729,7 +740,7 @@ specify, convert it to be :trajectories.</p>
729
740
  <div class="method-source-code"
730
741
  id="preprocess_ssa-source">
731
742
  <pre>
732
- <span class="ruby-comment"># File lib/neptune.rb, line 133</span>
743
+ <span class="ruby-comment"># File lib/neptune.rb, line 144</span>
733
744
  def preprocess_ssa(job_data)
734
745
  if job_data[<span class="ruby-string">&quot;@simulations&quot;</span>] and job_data[<span class="ruby-string">&quot;@trajectories&quot;</span>]
735
746
  abort(<span class="ruby-string">&quot;Both :simulations and :trajectories cannot be specified - use one&quot;</span> +
@@ -778,7 +789,7 @@ as well as information about the node to send the request to.</p>
778
789
  <div class="method-source-code"
779
790
  id="run_job-source">
780
791
  <pre>
781
- <span class="ruby-comment"># File lib/neptune.rb, line 365</span>
792
+ <span class="ruby-comment"># File lib/neptune.rb, line 376</span>
782
793
  def run_job(job_data, ssh_args, shadow_ip, secret,
783
794
  controller=<span class="ruby-constant">AppControllerClient</span>, file=<span class="ruby-constant">File</span>)
784
795
  controller = controller.new(shadow_ip, secret)
@@ -843,7 +854,7 @@ end</pre>
843
854
  <div class="method-source-code"
844
855
  id="upload_app_for_cicero-source">
845
856
  <pre>
846
- <span class="ruby-comment"># File lib/neptune.rb, line 337</span>
857
+ <span class="ruby-comment"># File lib/neptune.rb, line 348</span>
847
858
  def upload_app_for_cicero(job_data)
848
859
  if !job_data[<span class="ruby-string">&quot;@app&quot;</span>]
849
860
  puts <span class="ruby-string">&quot;No app specified, not uploading...&quot;</span>
@@ -899,7 +910,7 @@ end</pre>
899
910
  <div class="method-source-code"
900
911
  id="validate_storage_params-source">
901
912
  <pre>
902
- <span class="ruby-comment"># File lib/neptune.rb, line 195</span>
913
+ <span class="ruby-comment"># File lib/neptune.rb, line 206</span>
903
914
  def validate_storage_params(job_data)
904
915
  if !job_data[<span class="ruby-string">&quot;@storage&quot;</span>]
905
916
  job_data[<span class="ruby-string">&quot;@storage&quot;</span>] = <span class="ruby-string">&quot;appdb&quot;</span>
@@ -969,7 +980,7 @@ location.</p>
969
980
  <div class="method-source-code"
970
981
  id="wait_for_compilation_to_finish-source">
971
982
  <pre>
972
- <span class="ruby-comment"># File lib/neptune.rb, line 269</span>
983
+ <span class="ruby-comment"># File lib/neptune.rb, line 280</span>
973
984
  def wait_for_compilation_to_finish(ssh_args, shadow_ip, compiled_location,
974
985
  shell=<span class="ruby-constant">Kernel</span>.method(:`))
975
986
  loop {
@@ -1,5 +1,5 @@
1
- Sun, 04 Dec 2011 11:46:34 -0800
1
+ Tue, 06 Dec 2011 14:24:38 -0800
2
2
  bin/neptune Sun, 15 May 2011 22:52:56 -0700
3
- lib/neptune.rb Sat, 03 Dec 2011 23:03:43 -0800
3
+ lib/neptune.rb Tue, 06 Dec 2011 13:21:57 -0800
4
4
  lib/app_controller_client.rb Tue, 25 Oct 2011 23:47:47 -0700
5
5
  lib/common_functions.rb Wed, 26 Oct 2011 10:37:34 -0700
@@ -24,7 +24,7 @@
24
24
  <div id="metadata">
25
25
  <dl>
26
26
  <dt class="modified-date">Last Modified</dt>
27
- <dd class="modified-date">Sat Dec 03 23:03:43 -0800 2011</dd>
27
+ <dd class="modified-date">Tue Dec 06 13:21:57 -0800 2011</dd>
28
28
 
29
29
 
30
30
  <dt class="requires">Requires</dt>
@@ -123,6 +123,17 @@ def preprocess_mpi(job_data)
123
123
  end
124
124
  end
125
125
 
126
+ if job_data["@argv"]
127
+ argv = job_data["@argv"]
128
+ if argv.class != String and argv.class != Array
129
+ abort("The value specified for :argv must be either a String or Array")
130
+ end
131
+
132
+ if argv.class == Array
133
+ job_data["@argv"] = argv.join(' ')
134
+ end
135
+ end
136
+
126
137
  return job_data
127
138
  end
128
139
 
@@ -81,17 +81,46 @@ class TestNeptune < Test::Unit::TestCase
81
81
  end
82
82
 
83
83
  def test_preprocess_mpi
84
+ # not specifying nodes to use or procs to use should throw an error
84
85
  job_data_1 = {}
85
86
  assert_raise(SystemExit) { preprocess_mpi(job_data_1) }
86
87
 
88
+ # not specifying procs to use should throw an error
87
89
  job_data_2 = {"@nodes_to_use" => 4}
88
90
  assert_raise(SystemExit) { preprocess_mpi(job_data_2) }
89
91
 
92
+ # specifying procs to use == nodes to use should not throw an error
90
93
  job_data_3 = {"@nodes_to_use" => 4, "@procs_to_use" => 4}
91
94
  assert_equal(job_data_3, preprocess_mpi(job_data_3))
92
95
 
96
+ # specifying procs to use < nodes to use should throw an error
93
97
  job_data_4 = {"@nodes_to_use" => 4, "@procs_to_use" => 1}
94
98
  assert_raise(SystemExit) { preprocess_mpi(job_data_4) }
99
+
100
+ # specifying an empty string for argv should be ok
101
+ job_data_5 = {"@nodes_to_use" => 4, "@procs_to_use" => 4, "@argv" => ""}
102
+ assert_equal(job_data_5, preprocess_mpi(job_data_5))
103
+
104
+ # specifying an empty array for argv should be ok
105
+ job_data_6 = {"@nodes_to_use" => 4, "@procs_to_use" => 4, "@argv" => []}
106
+ expected_job_data_6 = job_data_6.dup
107
+ expected_job_data_6["@argv"] = ""
108
+ assert_equal(expected_job_data_6, preprocess_mpi(job_data_6))
109
+
110
+ # specifying something that's not a string or array for argv should throw
111
+ # an error
112
+ job_data_7 = {"@nodes_to_use" => 4, "@procs_to_use" => 4, "@argv" => 2}
113
+ assert_raise(SystemExit) { preprocess_mpi(job_data_7) }
114
+
115
+ # specifying a non-empty string for argv should be ok
116
+ job_data_8 = {"@nodes_to_use" => 4, "@procs_to_use" => 4, "@argv" => "--file coo"}
117
+ assert_equal(job_data_8, preprocess_mpi(job_data_8))
118
+
119
+ # specifying a non-empty array for argv should be ok
120
+ job_data_9 = {"@nodes_to_use" => 4, "@procs_to_use" => 4, "@argv" => ["--file", "coo"]}
121
+ expected_job_data_9 = job_data_9.dup
122
+ expected_job_data_9["@argv"] = "--file coo"
123
+ assert_equal(expected_job_data_9, preprocess_mpi(job_data_9))
95
124
  end
96
125
 
97
126
  def test_preprocess_ssa
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neptune
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Bunch
@@ -15,7 +15,7 @@ autorequire: neptune
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-04 00:00:00 -08:00
18
+ date: 2011-12-06 00:00:00 -08:00
19
19
  default_executable: neptune
20
20
  dependencies: []
21
21