stork-server
- Main Stork Server
Synopsis
stork-server [-h] [-v] [-m] [-u] [–dbhost] [-p] [-d] [–db-sslmode] [–db-sslcert] [–db-sslkey] [–db-sslrootcert] [–db-trace-queries=] [–rest-cleanup-timeout] [–rest-graceful-timeout] [–rest-max-header-size] [–rest-host] [–rest-port] [–rest-listen-limit] [–rest-keep-alive] [–rest-read-timeout] [–rest-write-timeout] [–rest-tls-certificate] [–rest-tls-key] [–rest-tls-ca] [–rest-static-files-dir]
Description
stork-server
provides the main Stork server capabilities. In
every Stork deployment, there should be exactly one Stork server.
Arguments
stork-server
takes the following arguments (equivalent environment variables are listed in square brackets, where applicable):
-h|--help
Returns the list of available parameters.
-v|--version
Returns the
stork-server
version.--hook-directory
The path to the hook directory.
[$STORK_SERVER_HOOK_DIRECTORY]
--env-file
Environment file location; applicable only if the use-env-file is provided. The default is
/etc/stork/server.env
.--use-env-file
Read the environment variables from the environment file. The default is
false
.-m|--metrics
Enables the periodic metrics collector and /metrics HTTP endpoint for Prometheus. This endpoint requires no authentication; it is recommended to restrict external access to it (e.g. using the HTTP proxy). It is disabled by default.
[$STORK_SERVER_ENABLE_METRICS]
--initial-puller-interval
Default interval used by pullers fetching data from Kea. If not provided the recommended values for each puller are used.
[$STORK_SERVER_INITIAL_PULLER_INTERVAL]
-u|--db-user
Specifies the user name to be used for database connections. The default is
stork
.[$STORK_DATABASE_USER_NAME]
--db-password=
Specifies the database password for database connections. If not specified, the user will be prompted for the password if necessary.
[$STORK_DATABASE_PASSWORD]
--db-url
Specifies the URL to locate and connect to database. It’s mutually exclusively with the host, port, username, and password.
[$STORK_DATABASE_URL]
--db-host
Specifies the name of the host, IP address or a socket path for the database connection. The default value depends on the system.
[$STORK_DATABASE_HOST]
-p|--db-port
Specifies the port on which the database is available. The default is 5432.
[$STORK_DATABASE_PORT]
-d|--db-name=
Specifies the name of the database to connect to. The default is
stork
.[$STORK_DATABASE_NAME]
--db-sslmode
Specifies the SSL mode for connecting to the database; possible values are
disable
,require
,verify-ca
orverify-full
. The default isdisable
.[$STORK_DATABASE_SSLMODE]
Acceptable values are:disable
Disables encryption between the Stork server and the PostgreSQL database.require
Uses secure communication but does not verify the server’s identity, unless the root certificate location is specified and that certificate exists. If the root certificate exists, the behavior is the same as in the case ofverify-ca
.verify-ca
Uses secure communication and verifies the server’s identity by checking it against the root certificate stored on the Stork server machine.verify-full
Uses secure communication and verifies the server’s identity against the root certificate. In addition, checks that the server hostname matches the name stored in the certificate.--db-sslcert
Specifies the location of the SSL certificate used by the server to connect to the database.
[$STORK_DATABASE_SSLCERT]
--db-sslkey
Specifies the location of the SSL key used by the server to connect to the database.
[$STORK_DATABASE_SSLKEY]
--db-sslrootcert
Specifies the location of the root certificate file used to verify the database server’s certificate.
[$STORK_DATABASE_SSLROOTCERT]
--db-trace-queries=
Enables tracing of SQL queries. Possible values are
run
- only runtime, without migrations,all
- both migrations and runtime, ornone
- disable the query logging.[$STORK_DATABASE_TRACE]
--rest-cleanup-timeout
Specifies the period to wait, in seconds, before killing idle connections. The default is 10.
--rest-graceful-timeout
Specifies the period to wait, in seconds, before shutting down the server. The default is 15.
--rest-max-header-size
Specifies the maximum number of bytes the server reads when parsing the request header’s keys and values, including the request line. It does not limit the size of the request body. The default is 1024 (1MB).
--rest-host
Specifies the IP address to listen on for connections over the RESTful API.
[$STORK_REST_HOST]
--rest-port
Specifies the port to listen on for connections over the RESTful API. The default is 8080.
[$STORK_REST_PORT]
--rest-listen-limit
Specifies the maximum number of outstanding requests.
--rest-keep-alive
Specifies the TCP keep-alive timeout, in minutes, on accepted connections. After this period, the server prunes dead TCP connections (e.g. when a laptop is closed mid-download). The default is 3.
--rest-read-timeout
Specifies the maximum duration, in seconds, before timing out a read of the request. The default is 30.
--rest-write-timeout
Specifies the maximum duration, in seconds, before timing out a write of the response. The default is 60.
--rest-tls-certificate
Specifies the certificate to use for secure connections.
[$STORK_REST_TLS_CERTIFICATE]
--rest-tls-key
Specifies the private key to use for secure connections.
[$STORK_REST_TLS_PRIVATE_KEY]
--rest-tls-ca
Specifies the Certificate Authority file to be used with a mutual TLS authority.
[$STORK_REST_TLS_CA_CERTIFICATE]
--rest-static-files-dir
Specifies the directory with static files for the UI.
[$STORK_REST_STATIC_FILES_DIR]
--rest-base-url
The base URL of the UI. Specify this flag if the UI is served from a subdirectory (not the root URL). It must start and end with a slash. Example: https://www.example.com/admin/stork/ would need to have ‘/admin/stork/’ as the base url. The default is
/
.[$STORK_REST_BASE_URL]
Note that there is no argument for the database password, as the command-line arguments can sometimes be seen
by other users. It can be passed using the STORK_DATABASE_PASSWORD
variable.
Stork logs on INFO level by default. Other levels can be configured using the
STORK_LOG_LEVEL
variable. Allowed values are: DEBUG, INFO, WARN, ERROR.
To control the logging colorization, Stork supports the CLICOLOR
and
CLICOLOR_FORCE
standard UNIX environment variables. Use CLICOLOR_FORCE
to
enforce enabling or disabling the ANSI colors usage. Set CLICOLOR
to 0
or
false
to disable colorization even if the TTY is attached.
The highest priority always have the command line flags. The parameters from the
environment file take precedence over the environment variables if the
--use-env-file
flag is used.
Mailing Lists and Support
There are public mailing lists available for the Stork project. stork-users (stork-users at lists.isc.org) is intended for Stork users. stork-dev (stork-dev at lists.isc.org) is intended for Stork developers, prospective contributors, and other advanced users. The lists are available at https://www.isc.org/mailinglists/. The community provides best-effort support on both of those lists.
History
stork-server
was first coded in November 2019 by Michal
Nowikowski and Marcin Siodelski.
See Also
stork-agent(8)