Fix arvados-tests.sh to use python from a-c-r package if available.
[arvados.git] / doc / install / install-ws.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install the websocket server
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 The arvados-ws server provides event notifications to websocket clients. It can be installed anywhere with access to Postgres database and the Arvados API server, typically behind a web proxy that provides SSL support. See the "godoc page":http://godoc.org/github.com/arvados/arvados/services/ws for additional information.
13
14 # "Update config.yml":#update-config
15 # "Update nginx configuration":#update-nginx
16 # "Install arvados-ws package":#install-packages
17 # "Start the service":#start-service
18 # "Restart the API server and controller":#restart-api
19 # "Confirm working installation":#confirm-working
20
21 h2(#configure). Update config.yml
22
23 Edit the cluster config at @config.yml@ and set @Services.Websocket.ExternalURL@ and @Services.Websocket.InternalURLs@.  Replace @zzzzz@ with your cluster id.
24
25 <notextile>
26 <pre><code>    Services:
27       Websocket:
28         InternalURLs:
29           "http://localhost:8005"</span>: {}
30         ExternalURL: <span class="userinput">wss://ws.ClusterID.example.com/websocket</span>
31 </span></code></pre>
32 </notextile>
33
34 h2(#update-nginx). Update Nginx configuration
35
36 The arvados-ws service will be accessible from anywhere on the internet, so we recommend using SSL for transport encryption.
37
38 Use a text editor to create a new file @/etc/nginx/conf.d/arvados-ws.conf@ with the following configuration.  Options that need attention are marked in <span class="userinput">red</span>.
39
40 <notextile><pre>
41 upstream arvados-ws {
42   server                127.0.0.1:<span class="userinput">8005</span>;
43 }
44
45 server {
46   listen                443 ssl;
47   server_name           ws.<span class="userinput">ClusterID.example.com</span>;
48
49   proxy_connect_timeout 90s;
50   proxy_read_timeout    300s;
51
52   ssl                   on;
53   ssl_certificate       <span class="userinput">/YOUR/PATH/TO/cert.pem</span>;
54   ssl_certificate_key   <span class="userinput">/YOUR/PATH/TO/cert.key</span>;
55
56   location / {
57     proxy_pass          http://arvados-ws;
58     proxy_set_header    Upgrade         $http_upgrade;
59     proxy_set_header    Connection      "upgrade";
60     proxy_set_header    Host            $host;
61     proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
62   }
63 }
64 </pre></notextile>
65
66 {% assign arvados_component = 'arvados-ws' %}
67
68 {% include 'install_packages' %}
69
70 {% include 'start_service' %}
71
72 {% include 'restart_api' %}
73
74 h2(#confirm). Confirm working installation
75
76 Confirm the service is listening on its assigned port and responding to requests.
77
78 <notextile>
79 <pre><code>~$ <span class="userinput">curl https://<span class="userinput">ws.ClusterID.example.com</span>/websocket</span>
80 not websocket protocol
81 </code></pre>
82 </notextile>