6676: Working through polishing SSO install documentation.
[arvados.git] / doc / install / install-api-server.html.textile.liquid
index 77a90e0f521f3c306f9e0e99b426e9be6f4cb128..0503609166af726cd4e05f3fd422259fc7f829e6 100644 (file)
@@ -6,35 +6,34 @@ title: Install the API server
 
 h2. Install prerequisites
 
-The Arvados package repository includes an API server package that can help automate much of the deployment.  It requires:
+The Arvados package repository includes an API server package that can help automate much of the deployment.
 
-* PostgreSQL 9.0+
-* "Ruby 2.1 and bundler":install-manual-prerequisites-ruby.html
-* Build tools and the curl and PostgreSQL development libraries, to build gem dependencies
-* Nginx
+h3(#install_ruby_and_bundler). Install Ruby and Bundler
+
+{% include 'install_ruby_and_bundler' %}
+
+h3(#install_postgres). Install PostgreSQL
+
+{% include 'install_postgres' %}
+
+h3(#build_tools_apiserver). Build tools
 
 On older distributions, you may need to use a backports repository to satisfy these requirements.  For example, on older Red Hat-based systems, consider using the "postgresql92":https://www.softwarecollections.org/en/scls/rhscl/postgresql92/ and "nginx16":https://www.softwarecollections.org/en/scls/rhscl/nginx16/ Software Collections.
 
 On a Debian-based system, install the following packages:
 
 <notextile>
-<pre><code>~$ <span class="userinput">sudo apt-get install bison build-essential libpq-dev libcurl4-openssl-dev postgresql git nginx arvados-api-server</span>
+<pre><code>~$ <span class="userinput">sudo apt-get install bison build-essential libcurl4-openssl-dev git nginx arvados-api-server</span>
 </code></pre>
 </notextile>
 
 On a Red Hat-based system, install the following packages:
 
 <notextile>
-<pre><code>~$ <span class="userinput">sudo yum install bison make automake gcc gcc-c++ libcurl-devel postgresql-server postgresql-devel nginx git arvados-api-server</span>
+<pre><code>~$ <span class="userinput">sudo yum install bison make automake gcc gcc-c++ libcurl-devel nginx git arvados-api-server</span>
 </code></pre>
 </notextile>
 
-{% include 'notebox_begin' %}
-
-If you intend to use specific versions of these packages from Software Collections, you may have to adapt some of the package names to match; e.g., @postgresql92-postgresql-server postgresql92-postgresql-devel nginx16@.
-
-{% include 'notebox_end' %}
-
 h2. Set up the database
 
 Generate a new database password. Nobody ever needs to memorize it or type it, so we'll make a strong one:
@@ -74,7 +73,6 @@ The API server package uses configuration files that you write to @/etc/arvados/
 <pre><code>~$ <span class="userinput">sudo mkdir -p /etc/arvados/api</span>
 ~$ <span class="userinput">sudo chmod 700 /etc/arvados/api</span>
 ~$ <span class="userinput">cd /var/www/arvados-api/current</span>
-/var/www/arvados-api/current$ <span class="userinput">sudo cp config/initializers/omniauth.rb.example /etc/arvados/api/omniauth.rb</span>
 /var/www/arvados-api/current$ <span class="userinput">sudo cp config/database.yml.sample /etc/arvados/api/database.yml</span>
 /var/www/arvados-api/current$ <span class="userinput">sudo cp config/application.yml.example /etc/arvados/api/application.yml</span>
 </code></pre>
@@ -124,7 +122,7 @@ h3. workbench_address
 
 Fill in the url of your workbench application in @workbench_address@, for example
 
-&nbsp;&nbsp;https://workbench.@prefix_uuid@.your.domain
+&nbsp;&nbsp;https://workbench.@uuid_prefix@.your.domain
 
 h3(#omniauth). sso_app_id, sso_app_secret, sso_provider_url
 
@@ -170,18 +168,21 @@ For best performance, we recommend you use Nginx as your Web server front-end, w
 <pre><code>#!/bin/bash
 
 set -e
+exec 2>&1
+
 # Uncomment the line below if you're using RVM.
 #source /etc/profile.d/rvm.sh
 
-envdir="/etc/sv/puma/env"
-root=/etc/sv/puma
-echo "Starting puma from ${root}"
-cd $root
-mkdir -p "${envdir}"
-exec 2>&1
+envdir="`pwd`/env"
+mkdir -p "$envdir"
+echo ws-only > "$envdir/ARVADOS_WEBSOCKETS"
+
 cd /var/www/arvados-api/current
+echo "Starting puma in `pwd`"
+
 # You may need to change arguments below to match your deployment, especially -u.
-exec chpst -e "${envdir}" -m 1073741824 -u www-data:www-data bundle exec puma -t 0:512 -e production -b tcp://127.0.0.1:8100
+exec chpst -m 1073741824 -u www-data:www-data -e "$envdir" \
+  bundle exec puma -t 0:512 -e production -b tcp://127.0.0.1:8100
 </code></pre>
 </li>
 
@@ -212,7 +213,7 @@ proxy_http_version 1.1;
 
 server {
   listen       <span class="userinput">[your public IP address]</span>:443 ssl;
-  server_name  <span class="userinput">uuid-prefix.your.domain</span>;
+  server_name  <span class="userinput">uuid_prefix.your.domain</span>;
 
   ssl on;
 
@@ -232,7 +233,7 @@ server {
 
 server {
   listen       <span class="userinput">[your public IP address]</span>:443 ssl;
-  server_name  ws.<span class="userinput">uuid-prefix.your.domain</span>;
+  server_name  ws.<span class="userinput">uuid_prefix.your.domain</span>;
 
   ssl on;