Project

General

Profile

Lifecycle of an Arvados compute node » History » Version 1

Brett Smith, 10/09/2014 02:07 PM

1 1 Brett Smith
h1. Lifecycle of an Arvados compute node
2
3
Many components work in concert to prepare a compute node to receive Crunch jobs.  This page describes that process from start to finish.
4
5
h2. Arvados node creation
6
7
Before you can set up a compute node, you need to create an Arvados node record.  The API server will assign a random @ping_secret@ value in the node's @info@ hash.
8
9
h2. Node setup
10
11
When a compute node comes up, it registers itself with Arvados by sending a "node ping action":http://doc.arvados.org/api/methods/nodes.html.  This ping includes basic information that Arvados needs to talk to the server, such as its IP address.  It should send pings regularly as long as it's available to do compute work.
12
13
The ping request must include the previously-assigned ping secret.  Different deployments may use different strategies to get the ping secret onto the new node.  Here's how we do it on Curoverse EC2 cloud installations of Arvados:
14
15
* We've prepared an EC2 node image that includes the ping script, and the cron jobs necessary to run it regularly.
16
* When we spin up a new node (e.g., in Node Manager), we put a base ping URL, including the ping secret, in the node's  "user data."  This is set at node creation time, and the ping script can read it via a special file on the filesystem.
17
18
h2. Node association with Arvados
19
20
When the API server receives a ping, it will update the node record with the provided information, and automatically assign any fields that are necessary for operation but not yet set (e.g., hostname).  At this point, crunch-dispatch will see that the node is available to do work, and send jobs to it.
21
22
You may want to propagate some information assigned by the API server back to the real node, or other places.  For example, on EC2 clouds, we update the node's name tag with the name assigned by the API server.
23
24
h2. Node shutdown
25
26
Nodes can go down for any number of reasons, planned or unplanned.  There is no explicit shutdown mechanism.  Instead, Arvados components that care should assume that a node that has not sent a ping in some time is down, or at least unable to do compute work.