System settings¶
Several global settings are available to be configured in Operations Center:
Network settings¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
Address of Operations Center which is used by managed servers to connect |
https://address |
same as |
|
Address/port over which the REST API will be served |
address:port |
|
Security settings¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
List of SHA256 certificate fingerprints belonging to trusted TLS clients |
list of strings |
|
|
List of X509 PEM encoded certificates belonging to trusted TLS clients |
list of strings |
|
|
OIDC configuration |
||
|
OpenFGA configuration |
||
|
ACME certificate renewal configuration |
The SHA256 fingerprint of every certificate in trusted_tls_client_certificates
is derived when the configuration is loaded and added to the trusted fingerprints
in memory, therefore both settings grant the respective client access to
Operations Center. The derived fingerprints are never written to the
configuration, so removing a certificate is all it takes to revoke the access it
grants.
In contrast to bare fingerprints, the certificates are additionally passed on to the servers and clusters deployed by Operations Center, so whoever has access to Operations Center also has access to what Operations Center deploys. See application configuration for how to opt out of this for a specific cluster.
A certificate is passed on at the time a system is deployed. Removing it from
trusted_tls_client_certificates therefore only revokes the access to Operations
Center itself, the already deployed systems keep trusting the certificate until
it is removed from their trust store as well.
OIDC¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
OIDC issuer |
string |
|
|
OIDC client ID used for communication with OIDC issuer |
string |
|
|
Scopes to be requested |
string |
|
|
Audience the OIDC tokens should be verified against |
string |
|
|
Claim which should be used to identify the user or subject |
string |
OpenFGA¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
API token used for communication with the OpenFGA system |
string |
|
|
URL of the OpenFGA API |
string |
|
|
ID of the OpenFGA store |
string |
ACME¶
Certificate renewal will be re-attempted every 24 hours, The certificate will be replaced after 80% of its validity period has passed.
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
Agree to ACME terms of service. |
true/false |
false |
|
URL to the directory resource of the ACME service. |
string |
|
|
ACME challenge type to use. |
HTTP-01 or DNS-01 |
|
|
Domain for which the certificate is issued. |
string |
|
|
Email address used for the account registration. |
string |
|
|
Address and interface for HTTP server (used by HTTP-01). |
string |
|
|
Backend provider for the challenge (used by DNS-01). |
string |
|
|
Environment variables to set during the challenge (used by DNS-01). |
list of strings |
|
|
List of DNS resolvers (used by DNS-01). |
list of strings |
Note
Renewal of ACME certificates after a change of the configuration is happening asynchronously in the background. It may take some time until the new certificates are available.
System settings¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
Default log level for Operations Center logs |
string |
|
|
Log levels per component, overriding |
map of string:string |
|
|
Scriptlet which is executed during server registration, see Server registration scriptlet below for details |
string |
|
|
Enable the pprof debug endpoints, see pprof debug endpoints below for details |
true/false |
false |
|
Enable the metrics endpoint, see Metrics components below for details |
true/false |
true |
|
Components that expose metrics, see Metrics components below for details |
list of strings |
|
The supported log levels are TRACE, DEBUG, INFO, WARN and ERROR.
Per component log levels¶
log_level applies to the whole daemon. log_levels raises or lowers the
verbosity for individual components, so a component under investigation can be
logged verbosely while the rest of the daemon stays quiet.
Component names are hierarchical, the levels are separated by dots. A level
configured for a component applies to all of its children as well and the most
specific configuration wins. Components without a matching entry use log_level.
settings:
log_level: WARN
log_levels:
provisioning: DEBUG
provisioning.server_repo: TRACE
With this configuration everything below provisioning is logged at DEBUG,
provisioning.server_repo is logged at TRACE and the rest of the daemon is
logged at WARN.
Every log record emitted by a component carries the component name in the
component log attribute.
A level configured for a component which is not known is rejected.
The top level component names are:
Component |
Covers |
|---|---|
|
The access log of the REST API |
|
Serving the REST API requests |
|
Applying a configuration change |
|
Startup and shutdown of the daemon, including one component per background task, e.g. |
|
The Incus image service |
|
The inventory of the cluster resources |
|
Servers, clusters, tokens, updates, channels and cluster templates |
|
Authentication ( |
|
The system settings |
|
The warnings |
Below the top level, the services, repositories and adapters of a component each
have a name of their own, e.g. provisioning.server_service,
provisioning.server_repo or inventory.image_server_client.
Complete list of log components
This is the complete list of the log components the daemon registers, grouped by their top level. A level configured for a component applies to all of its children as well, so a top level name is enough to cover everything below it.
access_log:
access_log
api:
api
config:
config
daemon:
daemondaemon.task.certificates_validity_checkdaemon.task.cluster_updatedaemon.task.poll_evacuating_serversdaemon.task.poll_pending_serversdaemon.task.poll_ready_serversdaemon.task.poll_rebooting_serversdaemon.task.poll_restoring_serversdaemon.task.poll_unresponsive_serversdaemon.task.poll_updating_application_serversdaemon.task.poll_updating_serversdaemon.task.prune_seed_image_cachedaemon.task.refresh_bmc_datadaemon.task.refresh_image_sourcesdaemon.task.refresh_inventorydaemon.task.refresh_updatesdaemon.task.renew_acme_certificatedaemon.task.server_deployment
image:
image.image_incus_file_repoimage.image_incus_repoimage.image_incus_serviceimage.incus_image_source_portimage.incus_image_source_repoimage.incus_image_source_serviceimage.simplestreams_port
inventory:
inventory.image_repoinventory.image_server_clientinventory.image_serviceinventory.instance_repoinventory.instance_server_clientinventory.instance_serviceinventory.inventory_aggregate_repoinventory.inventory_aggregate_serviceinventory.network_acl_repoinventory.network_acl_server_clientinventory.network_acl_serviceinventory.network_address_set_repoinventory.network_address_set_server_clientinventory.network_address_set_serviceinventory.network_forward_repoinventory.network_forward_server_clientinventory.network_forward_serviceinventory.network_integration_repoinventory.network_integration_server_clientinventory.network_integration_serviceinventory.network_load_balancer_repoinventory.network_load_balancer_server_clientinventory.network_load_balancer_serviceinventory.network_peer_repoinventory.network_peer_server_clientinventory.network_peer_serviceinventory.network_repoinventory.network_server_clientinventory.network_serviceinventory.network_zone_repoinventory.network_zone_server_clientinventory.network_zone_serviceinventory.profile_repoinventory.profile_server_clientinventory.profile_serviceinventory.project_repoinventory.project_server_clientinventory.project_serviceinventory.provisioning_cluster_serviceinventory.provisioning_server_serviceinventory.server_clientinventory.storage_bucket_repoinventory.storage_bucket_server_clientinventory.storage_bucket_serviceinventory.storage_pool_repoinventory.storage_pool_server_clientinventory.storage_pool_serviceinventory.storage_volume_repoinventory.storage_volume_server_clientinventory.storage_volume_service
provisioning:
provisioning.adapter.scriptlet.scriptlet_client_portprovisioning.bios_profile_portprovisioning.bmc_server_client_portprovisioning.channel_repoprovisioning.channel_serviceprovisioning.cluster_artifact_repoprovisioning.cluster_client_portprovisioning.cluster_provisioning_portprovisioning.cluster_repoprovisioning.cluster_serviceprovisioning.cluster_template_repoprovisioning.cluster_template_serviceprovisioning.flasher_portprovisioning.secure_boot_certificate_catalog_portprovisioning.secure_boot_certificate_source_portprovisioning.secure_boot_media_portprovisioning.seed_image_progress_portprovisioning.server_client_portprovisioning.server_repoprovisioning.server_scriptlet_portprovisioning.server_serviceprovisioning.token_client_portprovisioning.token_repoprovisioning.token_serviceprovisioning.update_files_repoprovisioning.update_repoprovisioning.update_serviceprovisioning.update_source_portprovisioning.warning_service_port
security:
security.authnsecurity.authn.oidcsecurity.authn.tlssecurity.authn.unixsocketsecurity.authzsecurity.authz.chainsecurity.authz.oidcsecurity.authz.openfgasecurity.authz.tlssecurity.authz.unixsocket
system:
system.backup_reposystem.cache_reposystem.database_reposystem.provisioning_cluster_servicesystem.provisioning_server_servicesystem.system_service
warning:
warning.warning_repowarning.warning_service
Changes to log_levels take effect immediately, a restart is not required. The
--verbose and --debug command line flags of operations-centerd only govern
the default log level, the per component log levels always apply.
Metrics components¶
Operations Center serves metrics at /1.0/metrics. See Metrics.
metrics_enabled enables or disables the endpoint. If it is false, the
endpoint returns an error and no metrics are collected.
metrics_components lists the components that expose metrics. A component
that is not in the list exposes no metrics.
Component names are hierarchical. Dots separate the levels. Enabling a component also enables all of its children.
settings:
metrics_enabled: true
metrics_components:
- runtime
Operations Center rejects an unknown component.
Complete list of metrics components
This is the complete list of the metrics components the daemon registers, grouped by their top level. Enabling a component enables all of its children as well, so a top level name is enough to cover everything below it.
runtime:
runtime
Changes to metrics_enabled and metrics_components take effect immediately.
A restart is not required.
pprof debug endpoints¶
Operations Center exposes the Go runtime profiling data in the format of
pprof on the REST API below
/1.0/debug/pprof/. This allows to collect CPU and memory profiles, goroutine
dumps and execution traces, e.g. when investigating an issue together with the
development team.
The endpoints are disabled by default and need to be enabled with the
pprof_enabled setting. They are served on the regular REST API listener and
require authentication. With OpenFGA, the can_debug entitlement on the server
is required, which is granted to the admin relation.
A profile is downloaded with the command line client:
operations-center admin debug pprof heap
operations-center admin debug pprof profile --seconds 30
operations-center admin debug pprof goroutine --debug 2
For profile and trace, --seconds sets the duration of the capture, which
is limited to 300 seconds. Only one capture runs at a time. The downloaded
profile can be analyzed with go tool pprof <file> respectively
go tool trace <file>.
Server registration scriptlet¶
The server registration scriptlet is a Starlark language (which is a subset of Python) scriptlet which is executed during server registration. It can be used to set properties of the registered server and perform additional actions against the server.
The entry point for the server registration scriptlet is the
server_registration function which takes a single argument candidate
which represents the server being registered.
Example:
def server_registration(candidate):
server.set_description("some description")
The functions available in the scriptlet are provided through different namespaces as follows:
Server namespace¶
Functions in the server namespace can be used to set properties of the server being registered:
Function |
Description |
|---|---|
|
Set the connection URL of the server being registered. |
|
Set the description of the server being registered. |
|
Set the name of the server being registered. |
|
Set the properties of the server being registered. Properties is a dictionary of string key-value pairs of type string. |
|
Set the update channel of the server being registered. Update channel is a string which should match the name of an existing update channel. |
IncusOS namespace¶
Functions in the incusos namespace can be used to get and set information (config, state) from the actual server being registered:
Function |
Description |
|---|---|
|
Add a non-primary application to the server. See the IncusOS documentation for the supported non-primary applications. |
|
Get the configuration of a service on the server being registered. Service is a string which identifies the service to get the configuration of, e.g. |
|
Get the state and configuration of a system resource from the server being registered. Resource is a string which identifies the resource to get, e.g. |
|
Set the configuration of a service on the server being registered. Service is a string which identifies the service to set the configuration of, e.g. |
|
Set the configuration of a system resource on the server being registered. Resource is a string which identifies the resource to set, e.g. |
|
Execute a command on the server being registered. Resource is a string which identifies the resource to execute the command on (e.g. |
Log namespace¶
The log namespace provides functions to log messages during server registration.
Function |
Description |
|---|---|
|
Add a log entry to operations-center’s log at error level. |
|
Add a log entry to operations-center’s log at info level. |
|
Add a log entry to operations-center’s log at warning level. |
Update settings¶
Configuration |
Description |
Value(s) |
Default |
|---|---|---|---|
|
Source is the URL of the origin, the updates should be fetched from |
string |
|
|
Certificate used to verify the signature of updates provided by |
string |
root certificate used to sign updates from default |
|
Filter expression to filter updates, see [update] for details |
string |
|
|
Filter expression to filter update files, see [update] for details |
string |
|
|
Default channel for updates, see [channel] for details |
string |
|
|
Default channel for servers/clusters, see [channel] for details |
string |
|