Project

General

Profile

Feature #10865

Updated by Peter Amstutz over 6 years ago

h3. Background 

 Currently install docs say the jobs API (crunch1) is deprecated, but the installation procedure results in a system that tries to run crunch1 jobs. 

 h3. Requirements 

 A site that is already using the Jobs API should have the Jobs API enabled by default (but the sysadmin should be able to disable it). 

 A new install should have the Jobs API disabled by default (but the sysadmin should be able to enable it). 

 h3. Implementation 

 Add a config entry: 

 <pre> 
   # Enable the legacy Jobs API. 
   # auto -- (default) enable the Jobs API only if it has been used before 
   #           (i.e., there are job records in the database) 
   # true -- enable the Jobs API despite lack of existing records. 
   # false -- disable the Jobs API despite presence of existing records. 
   enable_legacy_jobs_api: auto 
 </pre> 

 If the legacy jobs API is disabled according to this config knob, API server should automatically disable all of the Jobs APIs, i.e., implicitly add these to Rails.configuration.disable_api_methods: 

 <pre> 
 disable_api_methods: 
  - jobs.create 
  - pipeline_instances.create 
  - pipeline_templates.create 
  - jobs.get 
  - pipeline_instances.get 
  - pipeline_templates.get 
  - jobs.list 
  - pipeline_instances.list 
  - pipeline_templates.list 
  - jobs.index 
  - pipeline_instances.index 
  - pipeline_templates.index 
  - jobs.update 
  - pipeline_instances.update 
  - pipeline_templates.update 
  - jobs.queue 
  - jobs.queue_size 
  - job_tasks.create 
  - job_tasks.get 
  - job_tasks.list 
  - job_tasks.index 
  - job_tasks.update 
  - jobs.show 
  - pipeline_instances.show 
  - pipeline_templates.show 
  - jobs.show 
  - job_tasks.show [jobs.create, pipeline_instances.create, pipeline_templates.create, jobs.get, pipeline_instances.get, pipeline_templates.get, jobs.list, pipeline_instances.list, pipeline_templates.list, jobs.index, pipeline_instances.index, pipeline_templates.index, jobs.update, pipeline_instances.update, pipeline_templates.update, jobs.queue, jobs.queue_size, job_tasks.create, job_tasks.get, job_tasks.list, job_tasks.index, job_tasks.update, jobs.show, pipeline_instances.show, pipeline_templates.show, jobs.show, job_tasks.show] 
 </pre> 

 Update the install documentation: 

 Add the enable_legacy_jobs_api option to the "Configure the API server" section on http://doc.arvados.org/install/install-api-server.html

Back