11065: Merge branch 'master' into 11065-optional-audit-logging
[arvados.git] / services / crunch-dispatch-slurm / usage.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package main
6
7 import (
8         "flag"
9         "fmt"
10         "os"
11 )
12
13 var exampleConfigFile = []byte(`
14     {
15         "Client": {
16             "APIHost": "zzzzz.arvadosapi.com",
17             "AuthToken": "xyzzy",
18             "Insecure": false
19             "KeepServiceURIs": [],
20         },
21         "CrunchRunCommand": ["crunch-run"],
22         "PollPeriod": "10s",
23         "SbatchArguments": ["--partition=foo", "--exclude=node13"],
24         "ReserveExtraRAM": 268435456,
25         "BatchSize": 10000
26     }`)
27
28 func usage(fs *flag.FlagSet) {
29         fmt.Fprintf(os.Stderr, `
30 crunch-dispatch-slurm runs queued Arvados containers by submitting
31 SLURM batch jobs.
32
33 Options:
34 `)
35         fs.PrintDefaults()
36         fmt.Fprintf(os.Stderr, `
37 Example config file:
38 %s
39 `, exampleConfigFile)
40 }