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