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 +28 -23
- data/doc/Object.html +21 -10
- data/doc/created.rid +2 -2
- data/doc/lib/neptune_rb.html +1 -1
- data/lib/neptune.rb +11 -0
- data/test/unit/test_neptune.rb +29 -0
- metadata +4 -4
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
|
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.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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.
|
33
|
-
|
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.
|
36
|
-
be found in
|
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).
|
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
|
-
|
46
|
-
|
47
|
-
|
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.
|
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
|
-
|
65
|
-
|
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.
|
data/doc/Object.html
CHANGED
@@ -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
|
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
|
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 => :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
|
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
|
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
|
526
|
+
<span class="ruby-comment"># File lib/neptune.rb, line 419</span>
|
527
527
|
def neptune(params)
|
528
528
|
puts <span class="ruby-string">"Received a request to run a job."</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">"@argv"</span>]
|
698
|
+
argv = job_data[<span class="ruby-string">"@argv"</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">"The value specified for :argv must be either a String or Array"</span>)
|
701
|
+
end
|
702
|
+
|
703
|
+
if argv.class == <span class="ruby-constant">Array</span>
|
704
|
+
job_data[<span class="ruby-string">"@argv"</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
|
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">"@simulations"</span>] and job_data[<span class="ruby-string">"@trajectories"</span>]
|
735
746
|
abort(<span class="ruby-string">"Both :simulations and :trajectories cannot be specified - use one"</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
|
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
|
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">"@app"</span>]
|
849
860
|
puts <span class="ruby-string">"No app specified, not uploading..."</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
|
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">"@storage"</span>]
|
905
916
|
job_data[<span class="ruby-string">"@storage"</span>] = <span class="ruby-string">"appdb"</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
|
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 {
|
data/doc/created.rid
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
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
|
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
|
data/doc/lib/neptune_rb.html
CHANGED
data/lib/neptune.rb
CHANGED
@@ -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
|
|
data/test/unit/test_neptune.rb
CHANGED
@@ -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:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
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-
|
18
|
+
date: 2011-12-06 00:00:00 -08:00
|
19
19
|
default_executable: neptune
|
20
20
|
dependencies: []
|
21
21
|
|