- sdk/python/crunch-utility-libraries.html.textile.liquid
- sdk/python/events.html.textile.liquid
- CLI:
- - sdk/cli/index.html.textile.liquid
- sdk/cli/install.html.textile.liquid
+ - sdk/cli/index.html.textile.liquid
- sdk/cli/reference.html.textile.liquid
- sdk/cli/subcommands.html.textile.liquid
- Go:
- sdk/go/example.html.textile.liquid
- Perl:
- sdk/perl/index.html.textile.liquid
+ - sdk/perl/example.html.textile.liquid
- Ruby:
- sdk/ruby/index.html.textile.liquid
+ - sdk/ruby/example.html.textile.liquid
- Java:
- sdk/java/index.html.textile.liquid
+ - sdk/java/example.html.textile.liquid
api:
- Concepts:
- api/index.html.textile.liquid
- install/configure-azure-blob-storage.html.textile.liquid
- install/install-keepproxy.html.textile.liquid
- install/install-keep-web.html.textile.liquid
- - Install Crunch v2 on SLURM:
+ - Containers API support on SLURM:
- install/crunch2-slurm/install-prerequisites.html.textile.liquid
- install/crunch2-slurm/install-compute-node.html.textile.liquid
- install/crunch2-slurm/install-dispatch.html.textile.liquid
- install/crunch2-slurm/install-test.html.textile.liquid
- - Install Crunch v1:
+ - Jobs API support (deprecated):
- install/install-crunch-dispatch.html.textile.liquid
- install/install-compute-node.html.textile.liquid
- Helpful hints:
<html>
<head>
<meta charset="utf-8">
- <title>{% unless page.title == "Arvados | Documentation" %} Arvados | Documentation | {% endunless %}{{ page.title }}</title>
+ <title>{% unless page.title == "Arvados | Documentation" %} Arvados {% if page.navmenu %}| {{ page.navmenu }} {% endif %} | {% endunless %}{{ page.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
---
layout: default
navsection: installguide
-title: Crunch v2 SLURM prerequisites
+title: Containers API SLURM prerequisites
...
-Crunch v2 containers can be dispatched to a SLURM cluster. The dispatcher sends work to the cluster using SLURM's @sbatch@ command, so it works in a variety of SLURM configurations.
+Containers can be dispatched to a SLURM cluster. The dispatcher sends work to the cluster using SLURM's @sbatch@ command, so it works in a variety of SLURM configurations.
In order to run containers, you must run the dispatcher as a user that has permission to set up FUSE mounts and run Docker containers on each compute node. This install guide refers to this user as the @crunch@ user. We recommend you create this user on each compute node with the same UID and GID, and add it to the @fuse@ and @docker@ system groups to grant it the necessary permissions. However, you can run the dispatcher under any account with sufficient permissions across the cluster.
navsection: sdk
navmenu: CLI
title: "Installation"
-
...
Arvados CLI tools are written in Ruby and Python. To use the @arv@ command, you can either install the @arvados-cli@ gem via RubyGems or build and install the package from source. The @arv@ command also relies on other Arvados tools. To get those, install the @arvados-python-client@ and @arvados-cwl-runner@ packages, either from PyPI or source.
layout: default
navsection: sdk
navmenu: Python
-title: Python SDK examples
+title: Examples
...
+h2. Initialize SDK
+
+<pre>
+import (
+ "git.curoverse.com/arvados.git/sdk/go/arvados"
+ "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
+}
+
+func main() {
+ arv, err := arvadosclient.MakeArvadosClient()
+ if err != nil {
+ log.Fatalf("Error setting up arvados client %s", err.Error())
+ }
+}
+</pre>
+
h2. create
<pre>
var collection arvados.Collection
- err := api.Create("collection", Dict{"collection": Dict{"name": "create example"}}, &collection)
+ err := api.Create("collections", Dict{"collection": Dict{"name": "create example"}}, &collection)
</pre>
h2. delete
<pre>
var collection arvados.Collection
- err := api.Delete("collection", "", Dict{"collection": Dict{"name": "create example"}}, &collection)
+ err := api.Delete("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{}, &collection)
</pre>
h2. get
<pre>
+ var collection arvados.Collection
+ err := api.Get("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{}, &collection)
</pre>
h2. list
<pre>
+ var collection arvados.Collection
+ err := api.List("collections", Dict{}, &collection)
</pre>
h2. update
<pre>
+ var collection arvados.Collection
+ err := api.Update("collections", "aaaaa-bbbbb-ccccccccccccccc", Dict{"collection": Dict{"name": "update example"}}, &collection)
+</pre>
+
+h2. Get current user
+
+<pre>
+ var user arvados.User
+ err := api.Get("users", "current", Dict{}, &user)
</pre>
+
+h2. Example program
+
+You can save this source as a .go file and run it:
+
+<notextile>{% code 'example_sdk_go' as go %}</notextile>
+
+A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree.
layout: default
navsection: sdk
navmenu: Go
-title: "Go SDK"
-
+title: "Installation"
...
The Go ("Golang":http://golang.org) SDK provides a generic set of wrappers so you can make API calls easily.
h3. Installation
-You don't need to install anything. Just import the client like this. The go tools will fetch the relevant code and dependencies for you.
+Use @go get git.curoverse.com/arvados.git/sdk/go/arvadosclient@. The go tools will fetch the relevant code and dependencies for you.
<notextile>{% code 'example_sdk_go_imports' as go %}</notextile>
If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://dev.arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados
-
-h3. Example
-
-You can save this source as a .go file and run it:
-
-<notextile>{% code 'example_sdk_go' as go %}</notextile>
-
-A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree.
---
layout: default
navsection: sdk
-title: "Arvados SDK Reference"
+title: "SDK Reference"
...
This section documents language bindings for the "Arvados API":{{site.baseurl}}/api and Keep that are available for various programming languages. Not all features are available in every SDK. The most complete SDK is the Python SDK. Note that this section only gives a high level overview of each SDK. Consult the "Arvados API":{{site.baseurl}}/api section for detailed documentation about Arvados API calls available on each resource.
* "Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html
-* "Command line SDK":{{site.baseurl}}/sdk/cli/index.html ("arv")
+* "Command line SDK":{{site.baseurl}}/sdk/cli/install.html ("arv")
* "Go SDK":{{site.baseurl}}/sdk/go/index.html
* "Perl SDK":{{site.baseurl}}/sdk/perl/index.html
* "Ruby SDK":{{site.baseurl}}/sdk/ruby/index.html
--- /dev/null
+---
+layout: default
+navsection: sdk
+navmenu: Java
+title: "Examples"
+...
+
+h2. Initialize SDK
+
+<pre>
+import org.arvados.sdk.Arvados;
+</pre>
+
+<pre>
+ String apiName = "arvados";
+ String apiVersion = "v1";
+
+ Arvados arv = new Arvados(apiName, apiVersion);
+</pre>
+
+h2. create
+
+<pre>
+ Map<String, String> collection = new HashMap<String, String>();
+ collection.put("name", "create example");
+
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("collection", collection);
+ Map response = arv.call("collections", "create", params);
+</pre>
+
+h2. delete
+
+<pre>
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("uuid", uuid);
+ Map response = arv.call("collections", "delete", params);
+</pre>
+
+h2. get
+
+<pre>
+ params = new HashMap<String, Object>();
+ params.put("uuid", userUuid);
+ Map response = arv.call("users", "get", params);
+</pre>
+
+h2. list
+
+<pre>
+ Map<String, Object> params = new HashMap<String, Object>();
+ Map response = arv.call("users", "list", params);
+
+ // get uuid of the first user from the response
+ List items = (List)response.get("items");
+
+ Map firstUser = (Map)items.get(0);
+ String userUuid = (String)firstUser.get("uuid");
+</pre>
+
+h2. update
+
+<pre>
+ Map<String, String> collection = new HashMap<String, String>();
+ collection.put("name", "update example");
+
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("uuid", uuid);
+ params.put("collection", collection);
+ Map response = arv.call("collections", "update", params);
+</pre>
+
+h2. Get current user
+
+<pre>
+ Map<String, Object> params = new HashMap<String, Object>();
+ Map response = arv.call("users", "current", params);
+</pre>
layout: default
navsection: sdk
navmenu: Java
-title: "Java SDK"
-
+title: "Installation"
...
The Java SDK provides a generic set of wrappers so you can make API calls in java.
h3. Introdution
* The Java SDK requires Java 6 or later
-
+
* The Java SDK is implemented as a maven project. Hence, you would need a working
maven environment to be able to build the source code. If you do not have maven setup,
-you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful.
+you may find the "Maven in 5 Minutes":http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html link useful.
* In this document $ARVADOS_HOME is used to refer to the directory where
arvados code is cloned in your system. For ex: $ARVADOS_HOME = $HOME/arvados
</notextile>
* Please see "api-tokens":{{site.baseurl}}/user/reference/api-tokens.html for full details.
-
+
h3. Building the Arvados SDK
<pre>
In Eclipse IDE:
Window -> Preferences -> Java -> Build Path -> Classpath Variables
- Click on the "New..." button and add a new
+ Click on the "New..." button and add a new
M2_REPO variable and set it to your local Maven repository
</pre>
</notextile>
--- /dev/null
+---
+layout: default
+navsection: sdk
+navmenu: Perl
+title: "Examples"
+...
+
+h2. Initialize SDK
+
+Set up an API client user agent:
+
+<notextile>
+<pre><code class="userinput">
+use Arvados;
+my $arv = Arvados->new('apiVersion' => 'v1');
+</code></pre>
+</notextile>
+
+The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.
+
+h2. create
+
+Create an object:
+
+<notextile>
+<pre><code class="userinput">my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
+</code></pre>
+</notextile>
+
+h2. delete
+
+<notextile>
+<pre><code class="userinput">my $some_user = $arv->{'collections'}->{'get'}->execute('uuid' => $collection_uuid);
+</code></pre>
+</notextile>
+
+h2. get
+
+Retrieve an object by ID:
+
+<notextile>
+<pre><code class="userinput">my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
+</code></pre>
+</notextile>
+
+Get the UUID of an object that was retrieved using the SDK:
+
+<notextile>
+<pre><code class="userinput">my $current_user_uuid = $current_user->{'uuid'}
+</code></pre>
+</notextile>
+
+h2. list
+
+Get a list of objects:
+
+<notextile>
+<pre><code class="userinput">my $repos = $arv->{'repositories'}->{'list'}->execute;
+print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
+</code></pre>
+</notextile>
+
+h2. update
+
+Update an object:
+
+<notextile>
+<pre><code class="userinput">my $test_link = $arv->{'links'}->{'update'}->execute(
+ 'uuid' => $test_link->{'uuid'},
+ 'link' => { 'properties' => { 'foo' => 'bar' } });
+</code></pre>
+</notextile>
+
+h2. Get current user
+
+Get the User object for the current user:
+
+<notextile>
+<pre><code class="userinput">my $current_user = $arv->{'users'}->{'current'}->execute;
+</code></pre>
+</notextile>
layout: default
navsection: sdk
navmenu: Perl
-title: "Perl SDK"
-
+title: "Installation"
...
The Perl SDK provides a generic set of wrappers so you can make API calls easily.
arvados.v1.users.current.full_name = 'Your Name'
</pre>
</notextile>
-
-h3. Examples
-
-Set up an API client user agent:
-
-<notextile>
-<pre><code class="userinput">my $arv = Arvados->new('apiVersion' => 'v1');
-</code></pre>
-</notextile>
-
-Get the User object for the current user:
-
-<notextile>
-<pre><code class="userinput">my $current_user = $arv->{'users'}->{'current'}->execute;
-</code></pre>
-</notextile>
-
-Get the UUID of an object that was retrieved using the SDK:
-
-<notextile>
-<pre><code class="userinput">my $current_user_uuid = $current_user->{'uuid'}
-</code></pre>
-</notextile>
-
-Retrieve an object by ID:
-
-<notextile>
-<pre><code class="userinput">my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
-</code></pre>
-</notextile>
-
-Create an object:
-
-<notextile>
-<pre><code class="userinput">my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
-</code></pre>
-</notextile>
-
-Update an object:
-
-<notextile>
-<pre><code class="userinput">my $test_link = $arv->{'links'}->{'update'}->execute(
- 'uuid' => $test_link->{'uuid'},
- 'link' => { 'properties' => { 'foo' => 'bar' } });
-</code></pre>
-</notextile>
-
-Get a list of objects:
-
-<notextile>
-<pre><code class="userinput">my $repos = $arv->{'repositories'}->{'list'}->execute;
-print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
-</code></pre>
-</notextile>
-
-The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.
layout: default
navsection: sdk
navmenu: Python
-title: Python SDK examples
+title: Examples
...
+h2. Initialize SDK
+
+<pre>
+import arvados
+api = arvados.api("v1")
+</pre>
+
h2. create
<pre>
h2. delete
<pre>
-result = api.collection().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
</pre>
h2. get
<pre>
-result = api.collection().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
</pre>
h2. list
<pre>
-result = api.collection().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
+result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
</pre>
h2. update
<pre>
-result = api.collection().update(uuid="aaaaa-bbbbb-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+result = api.collections().update(uuid="aaaaa-bbbbb-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+</pre>
+
+h2. Get current user
+
+<pre>
+result = api.users().current().execute()
</pre>
layout: default
navsection: sdk
navmenu: Python
-title: "Python SDK"
-
+title: "Installation"
...
The Python SDK provides access from Python to the Arvados API and Keep. It also includes a number of command line tools for using and administering Arvados and Keep, and some conveniences for use in Crunch scripts; see "Crunch utility libraries":crunch-utility-libraries.html for details.
--- /dev/null
+---
+layout: default
+navsection: sdk
+navmenu: Python
+title: Examples
+...
+
+h2. Initialize SDK
+
+Import the module and set up an API client user agent:
+
+<pre>
+require 'arvados'
+arv = Arvados.new(apiVersion: 'v1')
+</pre>
+
+The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.
+
+h2. create
+
+Create an object:
+
+<pre>
+new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
+</pre>
+
+h2. delete
+
+Delete an object:
+
+<pre>
+arv.link.delete(uuid: new_link[:uuid])
+</pre>
+
+h2. get
+
+Retrieve an object by ID:
+
+<pre>
+some_user = arv.user.get(uuid: current_user_uuid)
+</pre>
+
+1h2. list
+
+Get a list of objects:
+
+<pre>
+repos = arv.repository.list
+first_repo = repos[:items][0]
+puts "UUID of first repo returned is #{first_repo[:uuid]}"</code>
+UUID of first repo returned is qr1hi-s0uqq-b1bnybpx3u5temz
+</pre>
+
+h2. update
+
+Update an object:
+
+<pre>
+updated_link = arv.link.update(uuid: new_link[:uuid],
+ link: {properties: {foo: 'bar'}})
+</pre>
+
+h2. Get current user
+
+Get the User object for the current user:
+
+<pre>
+current_user = arv.user.current
+</pre>
+
+Get the UUID of an object that was retrieved using the SDK:
+
+<pre>
+current_user_uuid = current_user[:uuid]
+</pre>
layout: default
navsection: sdk
navmenu: Ruby
-title: "Ruby SDK"
-
+title: "Installation"
...
The Ruby SDK provides a generic set of wrappers so you can make API calls easily.
arvados.v1.users.current.full_name = 'Your Name'
</pre>
</notextile>
-
-h3. Examples
-
-Import the module (we skipped this step above by using "ruby -r arvados"):
-
-<notextile>
-<pre><code class="userinput">require 'arvados'
-</code></pre>
-</notextile>
-
-Set up an API client user agent:
-
-<notextile>
-<pre><code class="userinput">arv = Arvados.new(apiVersion: 'v1')
-</code></pre>
-</notextile>
-
-Get the User object for the current user:
-
-<notextile>
-<pre><code class="userinput">current_user = arv.user.current
-</code></pre>
-</notextile>
-
-Get the UUID of an object that was retrieved using the SDK:
-
-<notextile>
-<pre><code class="userinput">current_user_uuid = current_user[:uuid]
-</code></pre>
-</notextile>
-
-Retrieve an object by ID:
-
-<notextile>
-<pre><code class="userinput">some_user = arv.user.get(uuid: current_user_uuid)
-</code></pre>
-</notextile>
-
-Create an object:
-
-<notextile>
-<pre><code class="userinput">new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
-</code></pre>
-</notextile>
-
-Update an object:
-
-<notextile>
-<pre><code class="userinput">updated_link = arv.link.update(uuid: new_link[:uuid],
- link: {properties: {foo: 'bar'}})
-</code></pre>
-</notextile>
-
-Delete an object:
-
-<notextile>
-<pre><code class="userinput">arv.link.delete(uuid: new_link[:uuid])
-</code></pre>
-</notextile>
-
-Get a list of objects:
-
-<notextile>
-<pre><code class="userinput">repos = arv.repository.list
-first_repo = repos[:items][0]
-puts "UUID of first repo returned is #{first_repo[:uuid]}"</code>
-UUID of first repo returned is qr1hi-s0uqq-b1bnybpx3u5temz
-</pre>
-</notextile>
-
-The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.