Configuration

Contents

Config file

microbs is driven by a config file named config.yaml which is located in the $HOME/.microbs directory by default. The directory and file are created automatically when you install microbs or run microbs init.

Alternative files

By default, microbs expects to use a config file named config.yaml in $HOME/.microbs. You can specify the path to a different config directory when running commands in the CLI by using the -c or --config flag.

Example:

microbs help -c /path/to/your/config/directory

Validation

You can (and should) validate the syntax and correctness of your config file by running microbs validate. The validation script can't provide 100% guidance, but it does a good job.

Syntax

The microbs config file uses yaml syntax.

When you run a command with microbs, every field and value in config.yaml is converted to an environment variable and shared with all microbs application services on Kubernetes. Those values are stored in a Kubernetes Secret object named microbs-secrets. The field names are flattened and uppercased, and dots are replaced with underscores.

For example, the following configuration in config.yaml...

foo:
  bar_baz.abc: xyz

...would be shared with the application as the following environment variable:

FOO_BAR_BAZ_XYZ=xyz

Reference

Required fields

deployment.name

A name for the deployment. The plugins that come with microbs prefix this value with microbs- and use it as the name of the Kubernetes cluster or observability solution stack. For example, if the value of deployment.name is changeme, then the Kubernetes plugin would name the cluster microbs-changeme.

deployment.app

The name of an installed application to deploy.

deployment.plugins.kubernetes

The name of an installed Kubernetes plugin to use.

deployment.plugins.observability

The name of an installed observability plugin to use.

otlp.receiver.host

The OTLP gRPC destination host for the deployed application services. The apps and observability plugins that come with microbs expect this value to be otel-collector.

otlp.receiver.port

The OTLP gRPC destination port for the deployed application services. The apps and observability plugins that come with microbs expect this value to be 4317.

Optional fields

deployment.environment

A description of the environment (e.g. dev, test, prod).

deployment.plugins.alerts

The name of an installed alerts plugin to use.

docker.registry

A container image registry for the application services. This is used by the setup and rollout commands, which passes the value to skaffold run --default-repo=${docker.registry}. Read the skaffold docs fo more details on the behavior of this config.

Plugin configs

Each plugin has its own set of configurations that are specified in the same config file. Refer to the documentation for each plugin that you wish to use to ensure that the plugin is properly configured.

© 2022 Dave Moore.
Licensed under the Apache License, Version 2.0.
This website uses Google Analytics.

microbs is a project of the open source community. microbs is not officially supported by any vendors named in this documentation or the software (e.g. Cloud Native Computing Foundation, Amazon, Google, Microsoft, Elastic, Grafana), though employees or partners of those vendors may contribute to the project.