4138: Simplify Node Manager GCE credential handling.
[arvados.git] / services / nodemanager / doc / gce.example.cfg
1 # Google Compute Engine configuration for Arvados Node Manager.
2 # All times are in seconds unless specified otherwise.
3
4 [Daemon]
5 # Node Manager will ensure that there are at least this many nodes
6 # running at all times.
7 min_nodes = 0
8
9 # Node Manager will not start any compute nodes when at least this
10 # many are running.
11 max_nodes = 8
12
13 # Poll compute nodes and Arvados for new information every N seconds.
14 poll_time = 60
15
16 # Polls have exponential backoff when services fail to respond.
17 # This is the longest time to wait between polls.
18 max_poll_time = 300
19
20 # If Node Manager can't succesfully poll a service for this long,
21 # it will never start or stop compute nodes, on the assumption that its
22 # information is too outdated.
23 poll_stale_after = 600
24
25 # "Node stale time" affects two related behaviors.
26 # 1. If a compute node has been running for at least this long, but it
27 # isn't paired with an Arvados node, do not shut it down, but leave it alone.
28 # This prevents the node manager from shutting down a node that might
29 # actually be doing work, but is having temporary trouble contacting the
30 # API server.
31 # 2. When the Node Manager starts a new compute node, it will try to reuse
32 # an Arvados node that hasn't been updated for this long.
33 node_stale_after = 14400
34
35 # File path for Certificate Authorities
36 certs_file = /etc/ssl/certs/ca-certificates.crt
37
38 [Logging]
39 # Log file path
40 file = /var/log/arvados/node-manager.log
41
42 # Log level for most Node Manager messages.
43 # Choose one of DEBUG, INFO, WARNING, ERROR, or CRITICAL.
44 # WARNING lets you know when polling a service fails.
45 # INFO additionally lets you know when a compute node is started or stopped.
46 level = INFO
47
48 # You can also set different log levels for specific libraries.
49 # Pykka is the Node Manager's actor library.
50 # Setting this to DEBUG will display tracebacks for uncaught
51 # exceptions in the actors, but it's also very chatty.
52 pykka = WARNING
53
54 # Setting apiclient to INFO will log the URL of every Arvados API request.
55 apiclient = WARNING
56
57 [Arvados]
58 host = zyxwv.arvadosapi.com
59 token = ARVADOS_TOKEN
60 timeout = 15
61
62 # Accept an untrusted SSL certificate from the API server?
63 insecure = no
64
65 [Cloud]
66 provider = gce
67
68 # XXX(twp): figure out good default settings for GCE
69 # It's usually most cost-effective to shut down compute nodes during narrow
70 # windows of time.  For example, EC2 bills each node by the hour, so the best
71 # time to shut down a node is right before a new hour of uptime starts.
72 # Shutdown windows define these periods of time.  These are windows in
73 # full minutes, separated by commas.  Counting from the time the node is
74 # booted, the node WILL NOT shut down for N1 minutes; then it MAY shut down
75 # for N2 minutes; then it WILL NOT shut down for N3 minutes; and so on.
76 # For example, "54, 5, 1" means the node may shut down from the 54th to the
77 # 59th minute of each hour of uptime.
78 # Specify at least two windows.  You can add as many as you need beyond that.
79 shutdown_windows = 54, 5, 1
80
81 [Cloud Credentials]
82 user_id = client_email_address@developer.gserviceaccount.com
83 key = path_to_certificate.pem
84 project = project-id-from-google-cloud-dashboard
85 timeout = 60
86
87 # Optional settings. For full documentation see
88 # http://libcloud.readthedocs.org/en/latest/compute/drivers/gce.html#libcloud.compute.drivers.gce.GCENodeDriver
89 #
90 # datacenter = us-central1-a
91 # auth_type = SA               # SA, IA or GCE
92 # scopes = https://www.googleapis.com/auth/compute
93 # credential_file =
94
95 [Cloud List]
96 # Keywords here will be used to populate the metadata field for a GCE node.
97
98 [Cloud Create]
99 # New compute nodes will send pings to Arvados at this host.
100 # You may specify a port, and use brackets to disambiguate IPv6 addresses.
101 ping_host = hostname:port
102
103 # A file path for an SSH key that can log in to the compute node.
104 # ssh_key = path
105
106 # The GCE image name and network zone name to use when creating new nodes.
107 # * Valid image aliases: https://cloud.google.com/sdk/gcloud/reference/compute/instances/create
108 # * Valid location (zone) names: https://cloud.google.com/compute/docs/zones
109 image = debian-7
110 location = us-central1-a
111
112 # JSON string of service account authorizations for this cluster.
113 # See http://libcloud.readthedocs.org/en/latest/compute/drivers/gce.html#specifying-service-account-scopes
114 # service_accounts = [{'email':'account@example.com', 'scopes':['storage-ro']}]
115
116 [Size n1-standard-2]
117 # You can define any number of Size sections to list node sizes you're
118 # willing to use.  The Node Manager should boot the cheapest size(s) that
119 # can run jobs in the queue (N.B.: defining more than one size has not been
120 # tested yet).
121 #
122 # The Size fields are interpreted the same way as with a libcloud NodeSize:
123 # http://libcloud.readthedocs.org/en/latest/compute/api.html#libcloud.compute.base.NodeSize
124 #
125 # See https://cloud.google.com/compute/docs/machine-types for a list
126 # of known machine types that may be used as a Size parameter.
127 #
128 # Each size section MUST define the number of cores are available in this
129 # size class (since libcloud does not provide any consistent API for exposing
130 # this setting).
131 # You may also want to define the amount of scratch space (expressed
132 # in GB) for Crunch jobs.
133 cores = 2
134 scratch = 100
135 ram = 512