8784: Fix test for latest firefox.
[arvados.git] / doc / install / install-nodemanager.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install Node Manager
5 ...
6
7 Arvados Node Manager provides elastic computing for Arvados and SLURM by creating and destroying virtual machines on demand.  Node Manager currently supports Amazon Web Services (AWS), Google Cloud Platform (GCP) and Microsoft Azure.
8
9 Note: node manager is only required for elastic computing cloud environments.  Fixed size clusters do not require node manager.
10
11 h2. Install
12
13 Node manager may run anywhere, however it must be able to communicate with the cloud provider's APIs, and use the command line tools @sinfo@, @squeue@ and @scontrol@ to communicate with the cluster's SLURM controller.
14
15 On Debian-based systems:
16
17 <notextile>
18 <pre><code>~$ <span class="userinput">sudo apt-get install arvados-node-manager</span>
19 </code></pre>
20 </notextile>
21
22 On Red Hat-based systems:
23
24 <notextile>
25 <pre><code>~$ <span class="userinput">sudo yum install arvados-node-manager</span>
26 </code></pre>
27 </notextile>
28
29 h2. Create compute image
30
31 Configure a virtual machine following the "instructions to set up a compute node.":{{site.baseurl}}/install/crunch2-slurm/install-compute-node.html and set it up to run a "ping script":{{site.baseurl}}/install/install-compute-ping.html at boot.
32
33 Create a virtual machine image using the commands provided by your cloud provider.  We recommend using a tool such as "Packer":https://www.packer.io/ to automate this process.
34
35 Configure node manager to use the image with the @image@ or @image_id@ parameter.
36
37 h2. Configure node manager
38
39 The configuration file at @/etc/arvados-node-manager/config.ini@ .  Some configuration details are specific to the cloud provider you are using:
40
41 * "Amazon Web Services":#aws
42 * "Google Cloud Platform":#gcp
43 * "Microsoft Azure":#azure
44
45 h3(#aws). Amazon Web Services
46
47 <pre>
48 # EC2 configuration for Arvados Node Manager.
49 # All times are in seconds unless specified otherwise.
50
51 [Manage]
52 # The management server responds to http://addr:port/status.json with
53 # a snapshot of internal state.
54
55 # Management server listening address (default 127.0.0.1)
56 #address = 0.0.0.0
57
58 # Management server port number (default -1, server is disabled)
59 #port = 8989
60
61 [Daemon]
62 # The dispatcher can customize the start and stop procedure for
63 # cloud nodes.  For example, the SLURM dispatcher drains nodes
64 # through SLURM before shutting them down.
65 dispatcher = slurm
66
67 # Node Manager will ensure that there are at least this many nodes running at
68 # all times.  If node manager needs to start new idle nodes for the purpose of
69 # satisfying min_nodes, it will use the cheapest node type.  However, depending
70 # on usage patterns, it may also satisfy min_nodes by keeping alive some
71 # more-expensive nodes
72 min_nodes = 0
73
74 # Node Manager will not start any compute nodes when at least this
75 # many are running.
76 max_nodes = 8
77
78 # Upper limit on rate of spending (in $/hr), will not boot additional nodes
79 # if total price of already running nodes meets or exceeds this threshold.
80 # default 0 means no limit.
81 max_total_price = 0
82
83 # Poll EC2 nodes and Arvados for new information every N seconds.
84 poll_time = 60
85
86 # Polls have exponential backoff when services fail to respond.
87 # This is the longest time to wait between polls.
88 max_poll_time = 300
89
90 # If Node Manager can't succesfully poll a service for this long,
91 # it will never start or stop compute nodes, on the assumption that its
92 # information is too outdated.
93 poll_stale_after = 600
94
95 # If Node Manager boots a cloud node, and it does not pair with an Arvados
96 # node before this long, assume that there was a cloud bootstrap failure and
97 # shut it down.  Note that normal shutdown windows apply (see the Cloud
98 # section), so this should be shorter than the first shutdown window value.
99 boot_fail_after = 1800
100
101 # "Node stale time" affects two related behaviors.
102 # 1. If a compute node has been running for at least this long, but it
103 # isn't paired with an Arvados node, do not shut it down, but leave it alone.
104 # This prevents the node manager from shutting down a node that might
105 # actually be doing work, but is having temporary trouble contacting the
106 # API server.
107 # 2. When the Node Manager starts a new compute node, it will try to reuse
108 # an Arvados node that hasn't been updated for this long.
109 node_stale_after = 14400
110
111 # Scaling factor to be applied to nodes' available RAM size. Usually there's a
112 # variable discrepancy between the advertised RAM value on cloud nodes and the
113 # actual amount available.
114 # If not set, this value will be set to 0.95
115 node_mem_scaling = 0.95
116
117 # File path for Certificate Authorities
118 certs_file = /etc/ssl/certs/ca-certificates.crt
119
120 [Logging]
121 # Log file path
122 file = /var/log/arvados/node-manager.log
123
124 # Log level for most Node Manager messages.
125 # Choose one of DEBUG, INFO, WARNING, ERROR, or CRITICAL.
126 # WARNING lets you know when polling a service fails.
127 # INFO additionally lets you know when a compute node is started or stopped.
128 level = INFO
129
130 # You can also set different log levels for specific libraries.
131 # Pykka is the Node Manager's actor library.
132 # Setting this to DEBUG will display tracebacks for uncaught
133 # exceptions in the actors, but it's also very chatty.
134 pykka = WARNING
135
136 # Setting apiclient to INFO will log the URL of every Arvados API request.
137 apiclient = WARNING
138
139 [Arvados]
140 host = zyxwv.arvadosapi.com
141 token = ARVADOS_TOKEN
142 timeout = 15
143
144 # Accept an untrusted SSL certificate from the API server?
145 insecure = no
146
147 [Cloud]
148 provider = ec2
149
150 # It's usually most cost-effective to shut down compute nodes during narrow
151 # windows of time.  For example, EC2 bills each node by the hour, so the best
152 # time to shut down a node is right before a new hour of uptime starts.
153 # Shutdown windows define these periods of time.  These are windows in
154 # full minutes, separated by commas.  Counting from the time the node is
155 # booted, the node WILL NOT shut down for N1 minutes; then it MAY shut down
156 # for N2 minutes; then it WILL NOT shut down for N3 minutes; and so on.
157 # For example, "54, 5, 1" means the node may shut down from the 54th to the
158 # 59th minute of each hour of uptime.
159 # Specify at least two windows.  You can add as many as you need beyond that.
160 shutdown_windows = 54, 5, 1
161
162 [Cloud Credentials]
163 key = KEY
164 secret = SECRET_KEY
165 region = us-east-1
166 timeout = 60
167
168 [Cloud List]
169 # This section defines filters that find compute nodes.
170 # Tags that you specify here will automatically be added to nodes you create.
171 # Replace colons in Amazon filters with underscores
172 # (e.g., write "tag:mytag" as "tag_mytag").
173 instance-state-name = running
174 tag_arvados-class = dynamic-compute
175 tag_cluster = zyxwv
176
177 [Cloud Create]
178 # New compute nodes will send pings to Arvados at this host.
179 # You may specify a port, and use brackets to disambiguate IPv6 addresses.
180 ping_host = hostname:port
181
182 # Give the name of an SSH key on AWS...
183 ex_keyname = string
184
185 # ... or a file path for an SSH key that can log in to the compute node.
186 # (One or the other, not both.)
187 # ssh_key = path
188
189 # The EC2 IDs of the image and subnet compute nodes should use.
190 image_id = idstring
191 subnet_id = idstring
192
193 # Comma-separated EC2 IDs for the security group(s) assigned to each
194 # compute node.
195 security_groups = idstring1, idstring2
196
197
198 # You can define any number of Size sections to list EC2 sizes you're
199 # willing to use.  The Node Manager should boot the cheapest size(s) that
200 # can run jobs in the queue.
201 #
202 # Each size section MUST define the number of cores are available in this
203 # size class (since libcloud does not provide any consistent API for exposing
204 # this setting).
205 # You may also want to define the amount of scratch space (expressed
206 # in GB) for Crunch jobs.  You can also override Amazon's provided
207 # data fields (such as price per hour) by setting them here.
208
209 [Size m4.large]
210 cores = 2
211 price = 0.126
212 scratch = 100
213
214 [Size m4.xlarge]
215 cores = 4
216 price = 0.252
217 scratch = 100
218 </pre>
219
220 h3(#gcp). Google Cloud Platform
221
222 <pre>
223 # Google Compute Engine configuration for Arvados Node Manager.
224 # All times are in seconds unless specified otherwise.
225
226 [Manage]
227 # The management server responds to http://addr:port/status.json with
228 # a snapshot of internal state.
229
230 # Management server listening address (default 127.0.0.1)
231 #address = 0.0.0.0
232
233 # Management server port number (default -1, server is disabled)
234 #port = 8989
235
236 [Daemon]
237 # Node Manager will ensure that there are at least this many nodes running at
238 # all times.  If node manager needs to start new idle nodes for the purpose of
239 # satisfying min_nodes, it will use the cheapest node type.  However, depending
240 # on usage patterns, it may also satisfy min_nodes by keeping alive some
241 # more-expensive nodes
242 min_nodes = 0
243
244 # Node Manager will not start any compute nodes when at least this
245 # running at all times.  By default, these will be the cheapest node size.
246 max_nodes = 8
247
248 # Poll compute nodes and Arvados for new information every N seconds.
249 poll_time = 60
250
251 # Upper limit on rate of spending (in $/hr), will not boot additional nodes
252 # if total price of already running nodes meets or exceeds this threshold.
253 # default 0 means no limit.
254 max_total_price = 0
255
256 # Polls have exponential backoff when services fail to respond.
257 # This is the longest time to wait between polls.
258 max_poll_time = 300
259
260 # If Node Manager can't succesfully poll a service for this long,
261 # it will never start or stop compute nodes, on the assumption that its
262 # information is too outdated.
263 poll_stale_after = 600
264
265 # "Node stale time" affects two related behaviors.
266 # 1. If a compute node has been running for at least this long, but it
267 # isn't paired with an Arvados node, do not shut it down, but leave it alone.
268 # This prevents the node manager from shutting down a node that might
269 # actually be doing work, but is having temporary trouble contacting the
270 # API server.
271 # 2. When the Node Manager starts a new compute node, it will try to reuse
272 # an Arvados node that hasn't been updated for this long.
273 node_stale_after = 14400
274
275 # Scaling factor to be applied to nodes' available RAM size. Usually there's a
276 # variable discrepancy between the advertised RAM value on cloud nodes and the
277 # actual amount available.
278 # If not set, this value will be set to 0.95
279 node_mem_scaling = 0.95
280
281 # File path for Certificate Authorities
282 certs_file = /etc/ssl/certs/ca-certificates.crt
283
284 [Logging]
285 # Log file path
286 file = /var/log/arvados/node-manager.log
287
288 # Log level for most Node Manager messages.
289 # Choose one of DEBUG, INFO, WARNING, ERROR, or CRITICAL.
290 # WARNING lets you know when polling a service fails.
291 # INFO additionally lets you know when a compute node is started or stopped.
292 level = INFO
293
294 # You can also set different log levels for specific libraries.
295 # Pykka is the Node Manager's actor library.
296 # Setting this to DEBUG will display tracebacks for uncaught
297 # exceptions in the actors, but it's also very chatty.
298 pykka = WARNING
299
300 # Setting apiclient to INFO will log the URL of every Arvados API request.
301 apiclient = WARNING
302
303 [Arvados]
304 host = zyxwv.arvadosapi.com
305 token = ARVADOS_TOKEN
306 timeout = 15
307
308 # Accept an untrusted SSL certificate from the API server?
309 insecure = no
310
311 [Cloud]
312 provider = gce
313
314 # Shutdown windows define periods of time when a node may and may not
315 # be shut down.  These are windows in full minutes, separated by
316 # commas.  Counting from the time the node is booted, the node WILL
317 # NOT shut down for N1 minutes; then it MAY shut down for N2 minutes;
318 # then it WILL NOT shut down for N3 minutes; and so on.  For example,
319 # "54, 5, 1" means the node may shut down from the 54th to the 59th
320 # minute of each hour of uptime.
321 # GCE bills by the minute, and does not provide information about when
322 # a node booted.  Node Manager will store this information in metadata
323 # when it boots a node; if that information is not available, it will
324 # assume the node booted at the epoch.  These shutdown settings are
325 # very aggressive.  You may want to adjust this if you want more
326 # continuity of service from a single node.
327 shutdown_windows = 20, 999999
328
329 [Cloud Credentials]
330 user_id = client_email_address@developer.gserviceaccount.com
331 key = path_to_certificate.pem
332 project = project-id-from-google-cloud-dashboard
333 timeout = 60
334
335 # Valid location (zone) names: https://cloud.google.com/compute/docs/zones
336 datacenter = us-central1-a
337
338 # Optional settings. For full documentation see
339 # http://libcloud.readthedocs.org/en/latest/compute/drivers/gce.html#libcloud.compute.drivers.gce.GCENodeDriver
340 #
341 # auth_type = SA               # SA, IA or GCE
342 # scopes = https://www.googleapis.com/auth/compute
343 # credential_file =
344
345 [Cloud List]
346 # A comma-separated list of tags that must be applied to a node for it to
347 # be considered a compute node.
348 # The driver will automatically apply these tags to nodes it creates.
349 tags = zyxwv, compute
350
351 [Cloud Create]
352 # New compute nodes will send pings to Arvados at this host.
353 # You may specify a port, and use brackets to disambiguate IPv6 addresses.
354 ping_host = hostname:port
355
356 # A file path for an SSH key that can log in to the compute node.
357 # ssh_key = path
358
359 # The GCE image name and network zone name to use when creating new nodes.
360 image = debian-7
361 # network = your_network_name
362
363 # JSON string of service account authorizations for this cluster.
364 # See http://libcloud.readthedocs.org/en/latest/compute/drivers/gce.html#specifying-service-account-scopes
365 # service_accounts = [{'email':'account@example.com', 'scopes':['storage-ro']}]
366
367
368 # You can define any number of Size sections to list node sizes you're
369 # willing to use.  The Node Manager should boot the cheapest size(s) that
370 # can run jobs in the queue.
371 #
372 # The Size fields are interpreted the same way as with a libcloud NodeSize:
373 # http://libcloud.readthedocs.org/en/latest/compute/api.html#libcloud.compute.base.NodeSize
374 #
375 # See https://cloud.google.com/compute/docs/machine-types for a list
376 # of known machine types that may be used as a Size parameter.
377 #
378 # Each size section MUST define the number of cores are available in this
379 # size class (since libcloud does not provide any consistent API for exposing
380 # this setting).
381 # You may also want to define the amount of scratch space (expressed
382 # in GB) for Crunch jobs.
383 # You can also override Google's provided data fields (such as price per hour)
384 # by setting them here.
385
386 [Size n1-standard-2]
387 cores = 2
388 price = 0.076
389 scratch = 100
390
391 [Size n1-standard-4]
392 cores = 4
393 price = 0.152
394 scratch = 200
395 </pre>
396
397 h3(#azure). Microsoft Azure
398
399 <pre>
400 # Azure configuration for Arvados Node Manager.
401 # All times are in seconds unless specified otherwise.
402
403 [Manage]
404 # The management server responds to http://addr:port/status.json with
405 # a snapshot of internal state.
406
407 # Management server listening address (default 127.0.0.1)
408 #address = 0.0.0.0
409
410 # Management server port number (default -1, server is disabled)
411 #port = 8989
412
413 [Daemon]
414 # The dispatcher can customize the start and stop procedure for
415 # cloud nodes.  For example, the SLURM dispatcher drains nodes
416 # through SLURM before shutting them down.
417 dispatcher = slurm
418
419 # Node Manager will ensure that there are at least this many nodes running at
420 # all times.  If node manager needs to start new idle nodes for the purpose of
421 # satisfying min_nodes, it will use the cheapest node type.  However, depending
422 # on usage patterns, it may also satisfy min_nodes by keeping alive some
423 # more-expensive nodes
424 min_nodes = 0
425
426 # Node Manager will not start any compute nodes when at least this
427 # many are running.
428 max_nodes = 8
429
430 # Upper limit on rate of spending (in $/hr), will not boot additional nodes
431 # if total price of already running nodes meets or exceeds this threshold.
432 # default 0 means no limit.
433 max_total_price = 0
434
435 # Poll Azure nodes and Arvados for new information every N seconds.
436 poll_time = 60
437
438 # Polls have exponential backoff when services fail to respond.
439 # This is the longest time to wait between polls.
440 max_poll_time = 300
441
442 # If Node Manager can't succesfully poll a service for this long,
443 # it will never start or stop compute nodes, on the assumption that its
444 # information is too outdated.
445 poll_stale_after = 600
446
447 # If Node Manager boots a cloud node, and it does not pair with an Arvados
448 # node before this long, assume that there was a cloud bootstrap failure and
449 # shut it down.  Note that normal shutdown windows apply (see the Cloud
450 # section), so this should be shorter than the first shutdown window value.
451 boot_fail_after = 1800
452
453 # "Node stale time" affects two related behaviors.
454 # 1. If a compute node has been running for at least this long, but it
455 # isn't paired with an Arvados node, do not shut it down, but leave it alone.
456 # This prevents the node manager from shutting down a node that might
457 # actually be doing work, but is having temporary trouble contacting the
458 # API server.
459 # 2. When the Node Manager starts a new compute node, it will try to reuse
460 # an Arvados node that hasn't been updated for this long.
461 node_stale_after = 14400
462
463 # Scaling factor to be applied to nodes' available RAM size. Usually there's a
464 # variable discrepancy between the advertised RAM value on cloud nodes and the
465 # actual amount available.
466 # If not set, this value will be set to 0.95
467 node_mem_scaling = 0.95
468
469 # File path for Certificate Authorities
470 certs_file = /etc/ssl/certs/ca-certificates.crt
471
472 [Logging]
473 # Log file path
474 file = /var/log/arvados/node-manager.log
475
476 # Log level for most Node Manager messages.
477 # Choose one of DEBUG, INFO, WARNING, ERROR, or CRITICAL.
478 # WARNING lets you know when polling a service fails.
479 # INFO additionally lets you know when a compute node is started or stopped.
480 level = INFO
481
482 # You can also set different log levels for specific libraries.
483 # Pykka is the Node Manager's actor library.
484 # Setting this to DEBUG will display tracebacks for uncaught
485 # exceptions in the actors, but it's also very chatty.
486 pykka = WARNING
487
488 # Setting apiclient to INFO will log the URL of every Arvados API request.
489 apiclient = WARNING
490
491 [Arvados]
492 host = zyxwv.arvadosapi.com
493 token = ARVADOS_TOKEN
494 timeout = 15
495
496 # Accept an untrusted SSL certificate from the API server?
497 insecure = no
498
499 [Cloud]
500 provider = azure
501
502 # Shutdown windows define periods of time when a node may and may not be shut
503 # down.  These are windows in full minutes, separated by commas.  Counting from
504 # the time the node is booted, the node WILL NOT shut down for N1 minutes; then
505 # it MAY shut down for N2 minutes; then it WILL NOT shut down for N3 minutes;
506 # and so on.  For example, "20, 999999" means the node may shut down between
507 # the 20th and 999999th minutes of uptime.
508 # Azure bills by the minute, so it makes sense to agressively shut down idle
509 # nodes.  Specify at least two windows.  You can add as many as you need beyond
510 # that.
511 shutdown_windows = 20, 999999
512
513 [Cloud Credentials]
514 # Use "azure account list" with the azure CLI to get these values.
515 tenant_id = 00000000-0000-0000-0000-000000000000
516 subscription_id = 00000000-0000-0000-0000-000000000000
517
518 # The following directions are based on
519 # https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/
520 #
521 # azure config mode arm
522 # azure ad app create --name "<Your Application Display Name>" --home-page "<https://YourApplicationHomePage>" --identifier-uris "<https://YouApplicationUri>" --password <Your_Password>
523 # azure ad sp create "<Application_Id>"
524 # azure role assignment create --objectId "<Object_Id>" -o Owner -c /subscriptions/{subscriptionId}/
525 #
526 # Use <Application_Id> for "key" and the <Your_Password> for "secret"
527 #
528 key = 00000000-0000-0000-0000-000000000000
529 secret = PASSWORD
530 timeout = 60
531 region = East US
532
533 [Cloud List]
534 # The resource group in which the compute node virtual machines will be created
535 # and listed.
536 ex_resource_group = ArvadosResourceGroup
537
538 [Cloud Create]
539 # The compute node image, as a link to a VHD in Azure blob store.
540 image = https://example.blob.core.windows.net/system/Microsoft.Compute/Images/images/zyxwv-compute-osDisk.vhd
541
542 # Path to a local ssh key file that will be used to provision new nodes.
543 ssh_key = /home/arvadosuser/.ssh/id_rsa.pub
544
545 # The account name for the admin user that will be provisioned on new nodes.
546 ex_user_name = arvadosuser
547
548 # The Azure storage account that will be used to store the node OS disk images.
549 ex_storage_account = arvadosstorage
550
551 # The virtual network the VMs will be associated with.
552 ex_network = ArvadosNetwork
553
554 # Optional subnet of the virtual network.
555 #ex_subnet = default
556
557 # Node tags
558 tag_arvados-class = dynamic-compute
559 tag_cluster = zyxwv
560
561 # the API server to ping
562 ping_host = hostname:port
563
564 # You can define any number of Size sections to list Azure sizes you're willing
565 # to use.  The Node Manager should boot the cheapest size(s) that can run jobs
566 # in the queue.  You must also provide price per hour as the Azure driver
567 # compute currently does not report prices.
568 #
569 # See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/
570 # for a list of known machine types that may be used as a Size parameter.
571 #
572 # Each size section MUST define the number of cores are available in this
573 # size class (since libcloud does not provide any consistent API for exposing
574 # this setting).
575 # You may also want to define the amount of scratch space (expressed
576 # in GB) for Crunch jobs.  You can also override Microsoft's provided
577 # data fields by setting them here.
578
579 [Size Standard_D3]
580 cores = 4
581 price = 0.56
582
583 [Size Standard_D4]
584 cores = 8
585 price = 1.12
586 </pre>
587
588 h2. Running
589
590 <pre>
591 $ arvados-node-manager --config /etc/arvados-node-manager/config.ini
592 </pre>