b25bf940cf4564a9da43b254c08812b74bf8f528
[arvados.git] / services / nodemanager / doc / ec2.example.cfg
1 # EC2 configuration for Arvados Node Manager.
2 # All times are in seconds unless specified otherwise.
3
4 [Daemon]
5 # The dispatcher can customize the start and stop procedure for
6 # cloud nodes.  For example, the SLURM dispatcher drains nodes
7 # through SLURM before shutting them down.
8 #dispatcher = slurm
9
10 # Node Manager will ensure that there are at least this many nodes running at
11 # all times.  If node manager needs to start new idle nodes for the purpose of
12 # satisfying min_nodes, it will use the cheapest node type.  However, depending
13 # on usage patterns, it may also satisfy min_nodes by keeping alive some
14 # more-expensive nodes
15 min_nodes = 0
16
17 # Node Manager will not start any compute nodes when at least this
18 # many are running.
19 max_nodes = 8
20
21 # Upper limit on rate of spending (in $/hr), will not boot additional nodes
22 # if total price of already running nodes meets or exceeds this threshold.
23 # default 0 means no limit.
24 max_total_price = 0
25
26 # Poll EC2 nodes and Arvados for new information every N seconds.
27 poll_time = 60
28
29 # Polls have exponential backoff when services fail to respond.
30 # This is the longest time to wait between polls.
31 max_poll_time = 300
32
33 # If Node Manager can't succesfully poll a service for this long,
34 # it will never start or stop compute nodes, on the assumption that its
35 # information is too outdated.
36 poll_stale_after = 600
37
38 # If Node Manager boots a cloud node, and it does not pair with an Arvados
39 # node before this long, assume that there was a cloud bootstrap failure and
40 # shut it down.  Note that normal shutdown windows apply (see the Cloud
41 # section), so this should be shorter than the first shutdown window value.
42 boot_fail_after = 1800
43
44 # "Node stale time" affects two related behaviors.
45 # 1. If a compute node has been running for at least this long, but it
46 # isn't paired with an Arvados node, do not shut it down, but leave it alone.
47 # This prevents the node manager from shutting down a node that might
48 # actually be doing work, but is having temporary trouble contacting the
49 # API server.
50 # 2. When the Node Manager starts a new compute node, it will try to reuse
51 # an Arvados node that hasn't been updated for this long.
52 node_stale_after = 14400
53
54 # Scaling factor to be applied to nodes' available RAM size. Usually there's a
55 # variable discrepancy between the advertised RAM value on cloud nodes and the
56 # actual amount available.
57 # If not set, this value will be set to 0.95
58 node_mem_scaling = 0.95
59
60 # File path for Certificate Authorities
61 certs_file = /etc/ssl/certs/ca-certificates.crt
62
63 [Logging]
64 # Log file path
65 file = /var/log/arvados/node-manager.log
66
67 # Log level for most Node Manager messages.
68 # Choose one of DEBUG, INFO, WARNING, ERROR, or CRITICAL.
69 # WARNING lets you know when polling a service fails.
70 # INFO additionally lets you know when a compute node is started or stopped.
71 level = INFO
72
73 # You can also set different log levels for specific libraries.
74 # Pykka is the Node Manager's actor library.
75 # Setting this to DEBUG will display tracebacks for uncaught
76 # exceptions in the actors, but it's also very chatty.
77 pykka = WARNING
78
79 # Setting apiclient to INFO will log the URL of every Arvados API request.
80 apiclient = WARNING
81
82 [Arvados]
83 host = zyxwv.arvadosapi.com
84 token = ARVADOS_TOKEN
85 timeout = 15
86
87 # Accept an untrusted SSL certificate from the API server?
88 insecure = no
89
90 [Cloud]
91 provider = ec2
92
93 # It's usually most cost-effective to shut down compute nodes during narrow
94 # windows of time.  For example, EC2 bills each node by the hour, so the best
95 # time to shut down a node is right before a new hour of uptime starts.
96 # Shutdown windows define these periods of time.  These are windows in
97 # full minutes, separated by commas.  Counting from the time the node is
98 # booted, the node WILL NOT shut down for N1 minutes; then it MAY shut down
99 # for N2 minutes; then it WILL NOT shut down for N3 minutes; and so on.
100 # For example, "54, 5, 1" means the node may shut down from the 54th to the
101 # 59th minute of each hour of uptime.
102 # Specify at least two windows.  You can add as many as you need beyond that.
103 shutdown_windows = 54, 5, 1
104
105 [Cloud Credentials]
106 key = KEY
107 secret = SECRET_KEY
108 region = us-east-1
109 timeout = 60
110
111 [Cloud List]
112 # This section defines filters that find compute nodes.
113 # Tags that you specify here will automatically be added to nodes you create.
114 # Replace colons in Amazon filters with underscores
115 # (e.g., write "tag:mytag" as "tag_mytag").
116 instance-state-name = running
117 tag_arvados-class = dynamic-compute
118 tag_cluster = zyxwv
119
120 [Cloud Create]
121 # New compute nodes will send pings to Arvados at this host.
122 # You may specify a port, and use brackets to disambiguate IPv6 addresses.
123 ping_host = hostname:port
124
125 # Give the name of an SSH key on AWS...
126 ex_keyname = string
127
128 # ... or a file path for an SSH key that can log in to the compute node.
129 # (One or the other, not both.)
130 # ssh_key = path
131
132 # The EC2 IDs of the image and subnet compute nodes should use.
133 image_id = idstring
134 subnet_id = idstring
135
136 # Comma-separated EC2 IDs for the security group(s) assigned to each
137 # compute node.
138 security_groups = idstring1, idstring2
139
140
141 # You can define any number of Size sections to list EC2 sizes you're
142 # willing to use.  The Node Manager should boot the cheapest size(s) that
143 # can run jobs in the queue.
144 #
145 # Each size section MUST define the number of cores are available in this
146 # size class (since libcloud does not provide any consistent API for exposing
147 # this setting).
148 # You may also want to define the amount of scratch space (expressed
149 # in GB) for Crunch jobs.  You can also override Amazon's provided
150 # data fields (such as price per hour) by setting them here.
151
152 [Size m4.large]
153 cores = 2
154 price = 0.126
155 scratch = 100
156
157 [Size m4.xlarge]
158 cores = 4
159 price = 0.252
160 scratch = 100