Install the websocket server

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 for additional information.

  1. Update config.yml
  2. Update nginx configuration
  3. Install arvados-ws package
  4. Start the service
  5. Restart the API server and controller
  6. Confirm working installation

Update config.yml

Edit the cluster config at config.yml and set Services.Websocket.ExternalURL and Services.Websocket.InternalURLs. Replace zzzzz with your cluster id.

    Services:
      Websocket:
        InternalURLs:
	  "http://localhost:8005": {}
        ExternalURL: wss://ws.ClusterID.example.com/websocket

Update Nginx configuration

The arvados-ws service will be accessible from anywhere on the internet, so we recommend using SSL for transport encryption.

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 red.

upstream arvados-ws {
  server                127.0.0.1:8005;
}

server {
  listen                443 ssl;
  server_name           ws.ClusterID.example.com;

  proxy_connect_timeout 90s;
  proxy_read_timeout    300s;

  ssl                   on;
  ssl_certificate       /YOUR/PATH/TO/cert.pem;
  ssl_certificate_key   /YOUR/PATH/TO/cert.key;

  location / {
    proxy_pass          http://arvados-ws;
    proxy_set_header    Upgrade         $http_upgrade;
    proxy_set_header    Connection      "upgrade";
    proxy_set_header    Host            $host;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

Install arvados-ws

Red Hat, AlmaLinux, and Rocky Linux

# dnf install arvados-ws

Debian and Ubuntu

# apt install arvados-ws

Start the service

# systemctl enable --now arvados-ws
# systemctl status arvados-ws
[...]

If systemctl status indicates it is not running, use journalctl to check logs for errors:

# journalctl --since -5min -u arvados-ws

Restart the API server and controller

Make sure the cluster config file is up to date on the API server host then restart the API server and controller processes to ensure the configuration changes are visible to the whole cluster.

# systemctl restart nginx arvados-controller
# arvados-server check

Confirm working installation

We recommend using the Cluster diagnostics tool.

Here are some other checks you can perform manually.

Confirm the service is listening on its assigned port and responding to requests.

~$ curl https://ws.ClusterID.example.com/websocket
not websocket protocol

Previous: Set up web based login Next: Install Workbench 2

The content of this documentation is licensed under the Creative Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.