Project

General

Profile

Installing controller service » History » Version 6

Tom Clegg, 07/17/2018 08:42 PM

1 1 Tom Clegg
h1. Installing controller service
2
3 2 Tom Clegg
refs #13497
4
5 6 Tom Clegg
h2. Add controller to an existing cluster
6
7 1 Tom Clegg
Add to "upgrading to master" section of doc.arvados.org:
8 4 Tom Clegg
* Create @/etc/arvados/config.yml@ on your API server node, if you haven't already
9
* Add to @/etc/arvados/config.yml@: <pre><code class="yaml">
10 1 Tom Clegg
Clusters:
11
  {your-uuid-prefix}:
12 3 Tom Clegg
    NodeProfiles:
13 4 Tom Clegg
      apiserver:
14 1 Tom Clegg
        arvados-controller:
15
          Listen: ":9004" # choose a port
16
        arvados-api-server:
17
          Listen: ":8000" # must match Rails server port in your Nginx config
18
</code></pre>
19 4 Tom Clegg
* Create @/etc/arvados/environment@ containing one line, @ARVADOS_NODE_PROFILE=apiserver@
20 1 Tom Clegg
* Install the arvados-controller package on your API server node
21
* Update your Nginx configuration so incoming traffic for $ARVADOS_API_HOST is routed to port 9004 (or whichever port you chose for arvados-controller in your config).
22
** Add: <pre>
23
upstream arvados-controller {
24
  server                  127.0.0.1:9004;
25
}
26
</pre>
27
** Update server section that currently forwards traffic to @http://api@: <pre><code class="diff">
28
 server {
29
   listen                  [your public IP address]:443 ssl;
30
   server_name             uuid_prefix.your.domain;
31
   # ...
32
   location  / {
33
-    proxy_pass            http://api;
34
+    proxy_pass            http://arvados-controller;
35
     # ...
36
   }
37
 }
38
</code></pre>
39
40 6 Tom Clegg
h2. Install controller in a new cluster
41
42 1 Tom Clegg
Update install docs:
43
* Add arvados-controller to the list of deb/rpm packages to install
44 4 Tom Clegg
* Create @/etc/arvados/config.yml@ (as above)
45 1 Tom Clegg
* Create @/etc/arvados/environment@ (as above)
46 5 Nico César
* If using systemd, run @systemctl start arvados-controller@ and confirm running status
47
* If not using systemd, set up a supervised service using runit
48 1 Tom Clegg
49 6 Tom Clegg
h2. Verify controller is working
50 1 Tom Clegg
51 6 Tom Clegg
Watch controller's log messages.
52
53
<pre>
54
apiserver# journalctl -fu arvados-controller.service
55
</pre>
56
57
When the controller service starts, you should see startup messages:
58
59
<pre>
60
Jul 17 20:29:16 4xphq.arvadosapi.com systemd[1]: Starting Arvados controller...
61
Jul 17 20:29:16 4xphq.arvadosapi.com arvados-controller[28118]: {"Listen":"[::]:9004","Service":"arvados-controller","level":"info","msg":"listening","time":"2018-07-17T20:29:16.287796594Z"}
62
Jul 17 20:29:16 4xphq.arvadosapi.com systemd[1]: Started Arvados controller.
63
</pre>
64
65
When clients access the API, you should see "request" and "response" log messages:
66
67
<pre>
68
Jul 17 20:41:01 4xphq.arvadosapi.com arvados-controller[28118]: {"RequestID":"req-5o2lhd2i1peunbmat2u2","level":"info","msg":"request","remoteAddr":"127.0.0.1:17192","reqBytes":140,"reqForwardedFor":"10.20.49.0","reqHost":"4xphq.arvadosapi.com","reqMethod":"POST","reqPath":"arvados/v1/collections","reqQuery":"","time":"2018-07-17T20:41:01.816350482Z"}
69
Jul 17 20:41:02 4xphq.arvadosapi.com arvados-controller[28118]: {"RequestID":"req-5o2lhd2i1peunbmat2u2","level":"info","msg":"response","remoteAddr":"127.0.0.1:17192","reqBytes":140,"reqForwardedFor":"10.20.49.0","reqHost":"4xphq.arvadosapi.com","reqMethod":"POST","reqPath":"arvados/v1/collections","reqQuery":"","respBytes":6138,"respStatus":"OK","respStatusCode":200,"time":"2018-07-17T20:41:02.135405529Z","timeToStatus":0.318963,"timeTotal":0.319050,"timeWriteBody":0.000086}
70
</pre>