a1f7872df4bff34e520d26c2f33680fdaec031a6
[arvados.git] / doc / admin / config-migration.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Migrating Configuration from v1.4 to v2.0
5 ...
6
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 {% include 'notebox_begin_warning' %}
14 _New installations of Arvados 2.0+ can skip this section_
15 {% include 'notebox_end' %}
16
17 Arvados 2.0 migrates to a centralized configuration file for all components.  The centralized Arvados configuration is @/etc/arvados/config.yml@.  Components that support the new centralized configuration are listed below.  During the migration period, legacy configuration files are still loaded and take precedence over the centralized configuration file.
18
19 h2. API server
20
21 The legacy API server configuration is stored in @config/application.yml@ and @config/database.yml@.  After migration to @/etc/arvados/config.yml@, both of these files should be moved out of the way and/or deleted.
22
23 Change to the API server directory and use the following commands:
24
25 <pre>
26 $ RAILS_ENV=production bundle exec rake config:migrate > config.yml
27 $ cp config.yml /etc/arvados/config.yml
28 </pre>
29
30 This will print the contents of @config.yml@ after merging the legacy @application.yml@ and @database.yml@ into the existing systemwide @config.yml@.  It may be redirected to a file and copied to @/etc/arvados/config.yml@ (it is safe to copy over, all configuration items from the existing @/etc/arvados/config.yml@ will be included in the migrated output).
31
32 If you wish to update @config.yml@ configuration by hand, or check that everything has been migrated, use @config:diff@ to print configuration items that differ between @application.yml@ and the system @config.yml@.
33
34 <pre>
35 $ RAILS_ENV=production bundle exec rake config:diff
36 </pre>
37
38 This command will also report if no migrations are required.
39
40 h2. Workbench
41
42 The legacy workbench configuration is stored in @config/application.yml@.  After migration to @/etc/arvados/config.yml@, this file should be moved out of the way and/or deleted.
43
44 Change to the workbench server directory and use the following commands:
45
46 <pre>
47 $ RAILS_ENV=production bundle exec rake config:migrate > config.yml
48 $ cp config.yml /etc/arvados/config.yml
49 </pre>
50
51 This will print the contents of @config.yml@ after merging the legacy @application.yml@ into the existing systemwide @config.yml@.  It may be redirected to a file and copied to @/etc/arvados/config.yml@ (it is safe to copy over, all configuration items from the existing @/etc/arvados/config.yml@ will be included in the migrated output).
52
53 If you wish to update @config.yml@ configuration by hand, or check that everything has been migrated, use @config:diff@ to print configuration items that differ between @application.yml@ and the system @config.yml@.
54
55 <pre>
56 $ RAILS_ENV=production bundle exec rake config:diff
57 </pre>
58
59 This command will also report if no migrations are required.
60
61 h2. keepstore, keep-web, crunch-dispatch-slurm, arvados-ws, keepproxy, arv-git-httpd, keep-balance
62
63 The legacy config for each component (loaded from @/etc/arvados/component/component.yml@ or a different location specified via the -legacy-component-config command line argument) takes precedence over the centralized config. After you migrate everything from the legacy config to the centralized config, you should delete @/etc/arvados/component/component.yml@ and/or stop using the corresponding -legacy-component-config argument.
64
65 To migrate a component configuration, do this on each node that runs an Arvados service:
66
67 # Ensure that the latest @config.yml@ is installed on the current node
68 # Install @arvados-server@ using @apt-get@ or @yum@.
69 # Run @arvados-server config-check@, review and apply the recommended changes to @/etc/arvados/config.yml@
70 # After applying changes, re-run @arvados-server config-check@ again to check for additional warnings and recommendations.
71 # When you are satisfied, delete the legacy config file, restart the service, and check its startup logs.
72 # Copy the updated @config.yml@ file to your next node, and repeat the process there.
73 # When you have a @config.yml@ file that includes all volumes on all keepstores, it is important to add a 'Rendezvous' parameter to the InternalURLs entries to make sure the old volume identifiers line up with the new config. If you don't do this, @keep-balance@ will want to shuffle all the existing data around to match the new volume order. The 'Rendezvous' value should be the last 15 characters of the keepstore's UUID in the old configuration. Here's an example:
74
75 <notextile>
76 <pre><code>Clusters:
77   xxxxx:
78     Services:
79       Keepstore:
80         InternalURLs:
81           "http://keep1.xxxxx.arvadosapi.com:25107": {Rendezvous: "eim6eefaibesh3i"}
82           "http://keep2.xxxxx.arvadosapi.com:25107": {Rendezvous: "yequoodalai7ahg"}
83           "http://keep3.xxxxx.arvadosapi.com:25107": {Rendezvous: "eipheho6re1shou"}
84           "http://keep4.xxxxx.arvadosapi.com:25107": {Rendezvous: "ahk7chahthae3oo"}
85 </code></pre>
86 </notextile>
87
88 In this example, the keepstore with the name `keep1` had the uuid `xxxxx-bi6l4-eim6eefaibesh3i` in the old configuration.
89
90 After migrating and removing all legacy config files, make sure the @/etc/arvados/config.yml@ file is identical across all system nodes -- API server, keepstore, etc. -- and restart all services to make sure they are using the latest configuration.
91
92 h2. Cloud installations only: node manager
93
94 Node manager is deprecated and replaced by @arvados-dispatch-cloud@.  No automated config migration is available.  Follow the instructions to "install the cloud dispatcher":../install/crunch2-cloud/install-dispatch-cloud.html
95
96 *Only one dispatch process should be running at a time.* If you are migrating a system that currently runs Node manager and @crunch-dispatch-slurm@, it is safest to remove the @crunch-dispatch-slurm@ service entirely before installing @arvados-dispatch-cloud@.
97
98 <notextile>
99 <pre><code>~$ <span class="userinput">sudo systemctl --now disable crunch-dispatch-slurm</span>
100 ~$ <span class="userinput">sudo apt-get remove crunch-dispatch-slurm</span>
101 </code></pre>
102 </notextile>
103
104 h2. arvados-controller, arvados-dispatch-cloud
105
106 Already uses centralized config exclusively.  No migration needed.