puts request
@prov_svg = ProvenanceHelper::create_provenance_graph(u.provenance, "provenance_svg",
{:request => request,
- :direction => :top_down,
+ :direction => :bottom_up,
:combine_jobs => :script_only}) rescue nil
@used_by_svg = ProvenanceHelper::create_provenance_graph(u.used_by, "used_by_svg",
{:request => request,
end
end
+ def url_for u
+ p = { :host => @opts[:request].host,
+ :port => @opts[:request].port,
+ :protocol => @opts[:request].protocol }
+ p.merge! u
+ Rails.application.routes.url_helpers.url_for (p)
+ end
+
def determine_fillcolor(n)
fillcolor = %w(aaaaaa aaffaa aaaaff aaaaaa ffaaaa)[n || 0] || 'aaaaaa'
"style=filled,fillcolor=\"##{fillcolor}\""
rsc = ArvadosBase::resource_class_for_uuid uuid.to_s
if rsc
- href = Rails.application.routes.url_helpers.url_for ({:controller => rsc.to_s.tableize,
- :action => :show,
- :id => uuid.to_s,
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => rsc.to_s.tableize,
+ :action => :show,
+ :id => uuid.to_s })
#"\"#{uuid}\" [label=\"#{rsc}\\n#{uuid}\",href=\"#{href}\"];\n"
if rsc == Collection
end
end
end
- return "\"#{uuid}\" [label=\"#{rsc}\",href=\"#{href}\",#{bgcolor}];\n"
end
+ return "\"#{uuid}\" [label=\"#{rsc}\",href=\"#{href}\",#{bgcolor}];\n"
end
"\"#{uuid}\" [#{bgcolor}];\n"
end
@pdata.each do |k, link|
if link[:head_uuid] == uuid.to_s and link[:link_class] == "provenance"
- href = Rails.application.routes.url_helpers.url_for ({:controller => Link.to_s.tableize,
- :action => :show,
- :id => link[:uuid],
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => Link.to_s.tableize,
+ :action => :show,
+ :id => link[:uuid] })
gr += describe_node(link[:tail_uuid])
gr += edge(link[:head_uuid], link[:tail_uuid], {:label => link[:name], :href => href})
def describe_jobs
gr = ""
@jobs.each do |k, v|
- href = Rails.application.routes.url_helpers.url_for ({:controller => Job.to_s.tableize,
- :action => :index,
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => Job.to_s.tableize,
+ :action => :index })
gr += "\"#{k}\" [href=\"#{href}?"
themes_for_rails
resources :keep_disks
- resources :user_agreements
- post '/user_agreements/sign' => 'user_agreements#sign'
+ resources :user_agreements do
+ put 'sign', on: :collection
+ get 'signatures', on: :collection
+ end
get '/user_agreements/signatures' => 'user_agreements#signatures'
resources :nodes
resources :humans
gem 'zenweb'
gem 'liquid'
gem 'RedCloth'
-gem 'colorize'
\ No newline at end of file
+gem 'colorize'
- admin/cheat_sheet.html.textile.liquid
installguide:
- Install:
- - install/install-api-server.html.md.liquid
- install/index.html.md.liquid
+ - install/install-api-server.html.md.liquid
- install/install-workbench-app.html.md.liquid
- install/client.html.textile.liquid
- install/create-standard-objects.html.textile.liquid
1. A GNU/Linux (virtual) machine
2. A domain name for your api server
3. Ruby >= 2.0.0
-4. Bundler
+4. Bundler: `gem install bundler`
+5. Curl libraries: `sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev`
## Download the source tree
git clone https://github.com/curoverse/arvados.git
+ cd arvados
See also: [Downloading the source code](https://arvados.org/projects/arvados/wiki/Download) on the Arvados wiki.
-## Configure the API server
+## Install gem dependencies
-First install the gems:
+ cd services/api && bundle install
- cd arvados/services/api
- bundle install
+## Configure the API server
-Next, configure the database:
+Configure the database:
cp -i config/database.yml.sample config/database.yml
-Edit `database.yml` to your liking and make sure the database and db user exist.
-Then set up the database:
+Edit `config/database.yml` to your liking and make sure the database
+and db user exist. Then set up the database:
- RAILS_ENV=production rake db:setup
+ RAILS_ENV=production bundle exec rake db:setup
Then set up omniauth:
Make sure your Omniauth provider knows about your *APP_ID* and *APP_SECRET*
combination.
-You also need to update `config/initializers/secret_token.rb`.
-Generate a new secret with
-
- rake secret
-
-and put it in `config/initializers/secret_token.rb`:
-
- Server::Application.config.secret_token = 'your-new-secret-here'
+Edit the main configuration.
-Edit the main configuration:
+ cp -i config/application.yml.example config/application.yml
- cp -i config/config.yml.example config/config.yml
+First, choose a unique 5-character alphanumeric string to use as your
+`uuid_prefix`. An example is given that generates a 5-character string
+based on a hash of your hostname. The `uuid_prefix` is a unique
+identifier for your API server. It also serves as the first part of
+the hostname for your API server:
-First, you want to make sure that
+ {{ site.arvados_api_host }}
- uuid_prefix
+For a development site, use your own domain instead of arvadosapi.com.
-is set to a unique 5-character alphanumeric string. An example is
-given that generates a 5-character string based on a hash of your
-hostname.
+You also need to install a secret_token for signing cookies. Generate
+a new secret:
-The `uuid_prefix` is a unique identifier for your API server. It also
-serves as the first part of the hostname for your API server, for
-instance
+ rake secret
- {{ site.arvados_api_host }}
+Put it in `config/application.yml` in the production or common section:
-For a development site, use your own domain instead of arvadosapi.com.
+ secret_token: your-new-secret-here
You will also want to change `compute_node_nameservers` to suit your
environment.
-Consult `config.defaults.yml` for a full list of configuration
-options. Always put your local configuration in `config.yml` instead
-of editing `config.defaults.yml`.
+Consult `application.default.yml` for a full list of configuration
+options. Always put your local configuration in `application.yml`
+instead of editing `application.default.yml`.
## Apache/Passenger
$command .=
"&& perl -";
}
- $ENV{"PYTHONPATH"} =~ s{^}{:} if $ENV{"PYTHONPATH"};
- $ENV{"PYTHONPATH"} =~ s{^}{$ENV{CRUNCH_SRC}/sdk/python}; # xxx hack
- $ENV{"PYTHONPATH"} =~ s{^}{$ENV{CRUNCH_SRC}/arvados/sdk/python:}; # xxx hack
- $ENV{"PYTHONPATH"} =~ s{$}{:/usr/local/arvados/src/sdk/python}; # xxx hack
$command .=
"&& exec arv-mount $ENV{TASK_KEEPMOUNT} --exec $ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
my @execargs = ('bash', '-c', $command);
# wait until the driver is finished initializing
operations.initlock.wait()
+ rc = 255
try:
rc = subprocess.call(args.exec_args, shell=False)
- except:
- rc = 255
+ except OSError as e:
+ sys.stderr.write('arv-mount: %s -- exec %s\n' % (str(e), args.exec_args))
+ rc = e.errno
+ except Exception as e:
+ sys.stderr.write('arv-mount: %s\n' % str(e))
finally:
subprocess.call(["fusermount", "-u", "-z", args.mountpoint])
Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
end << '172.16.0.23'
%>
- # You must customize these. See config.defaults.yml for information.
+ # You must customize these. See application.default.yml for information.
compute_node_ami: ~
compute_node_ec2_tag_enable: ~
compute_node_domain: ~