9. Server command line reference

The vipu-server command line has the following syntax:

vipu-server [GlobalOptions]

$ vipu-server --storage /opt/vipu-server/vipu-server.json

9.1. Global options

Global options work with all vipu-server commands. You can also pass global options as environment variables or in a configuration file.

Table 9.1 Global options

Option

Description

--autodiscovery-listen-interfaces stringSlice --a stringSlice

A comma separated list of network interface names where the agent autodiscovery service will listen for multicast messages from the V-IPU agents (default: autodiscovery service disabled)

--check-db-migration bool

Returns whether the storage needs to be migrated by running vipu-server –migrate-db

--config string

Choose a configuration file explicitly; do not look in the default locations

--default-user-id string

Provides a default user ID that will be used to administer the server when running in secure mode (default: admin) (default admin))

--exporter-activate bool

When using this option vipu-server will run the builtin V-IPU prometheus metrics exporter (default: exporter is disabled)

--exporter-listen string

Address and port where the prometheus metrics exporter will listen to. Metrics will be available over HTTP. (default: “:2113”) (default :2113))

--exporter-metrics-path string

URL where the exporter metrics will be exposed from (default: “/metrics”) (default /metrics))

--init bool

Initialise server storage and security

--listen string

The server listening address for the admin API (default “:8090”) (default :8090))

--listen-user string

The server listening address for the user-only API (default: disabled; both admin and user APIs are served by the address defined with the “–listen” option)

--local-sock-only bool

Server only listens to the local unix socket ignoring the “–listen” / “–listen-user” options (default: server listens to both the addresses defined by “–listen” / “–listen-user” and a local socket)

--max-partition-mapping-options int32

Specifies maximum partition mapping options to send (default 64)

--max-partitionop-retries int32

Specifies maximum partition option retries in the controller (default 10)

--max-partitionop-retries-without-new-allocation int32

Specifies maximum partition option retries without new allocation in the controller (default 2)

--migrate-db bool

Migrate storage to the next DB schema version. Please ensure you have a backup of your DB before migrating. This will look for the “vipu-server.json” file to update in the current directory, unless you specify a different location with “–storage”

--partition-healthcheck-interval int32

Specifies partition health check interval in seconds (default 60)

--partitionop-retry-interval int32

Specifies partition operation retry interval in seconds (default 60)

--prometheus-sd-config-file string

Points to a file where the server will write the V-IPU exporter entries associated with the managed V-IPU agents. This file is in a JSON format compatible with the prometheus file-based discovery service (https://prometheus.io/docs/guides/file-sd/)

--relocatable-partitions-by-default bool

Specifies whether relocatable partitions will be used by default or not (default true)

--secure bool

Run server in the secure mode

--socket string

The path where the server local unix socket will be created to (default: “./vipu-server.sock”) (default vipu-server.sock))

--storage string

File for storing server state in (default “./vipu-server.json”) (default vipu-server.json))

--storage-init bool

Initialise the server storage state. “vipu-server” must be called explicitly with this option the very first time to initialise the server storage

--timeout int

Timeout for the agent calls (default 200)

--tls-init bool

Generate server/client TLS certificates

--version bool

Show the version number

9.1.1. Using a configuration file

All the options listed in Section 9.1, Global options can be overridden with a vipu-server configuration file. The option names in the configuration file are identical but without the leading hyphens. For example, if you start vipu-server with the following command from the shell:

$ vipu-server --listen :8100 --exporter-activate --exporter-listen localhost:2113

The corresponding vipu-server options can be overridden in a configuration file that looks like this:

// Listens to the non-default port 8100
listen = ":8100"
// Activates the V-IPU exporter
exporter-activate = true
// V-IPU exporter only listens to localhost:2113
exporter-listen = "localhost:2113"

The server will look for a configuration file in the following ordered list of directories and will load the first configuration file found:

  1. Configuration file provided with the --config option

  2. ./.vipu-server-config.hcl

  3. $HOME/.vipu-server-config.hcl

  4. /etc/vipu/vipu-server-config.hcl

9.1.2. Using environment variables

All the options listed in Section 9.1, Global options can be overridden using environment variables using the syntax: VIPU_SERVER_OPTION_NAME.

Everything should be upper case and without the leading hyphens. The remaining hyphens (-) should be replaced by underscores (_). For example, if you start vipu-server with the following command from the shell:

$ vipu-server --listen :8100 --exporter-activate --exporter-listen localhost:2113

The corresponding options can be specified with the following environment variables:

$ export VIPU_SERVER_LISTEN=":8100"
$ export VIPU_SERVER_EXPORTER_ACTIVATE="true"
$ export VIPU_SERVER_EXPORTER_LISTEN="localhost:2113"