Varnish Controller



This tutorial will show how to configure components such as agents and routers via the CLI/GUI using both individual configuration settings as well configuration-sets.

Configuration of Individual Components

Configuration is only possible for agents and routers that has been acknowledged by brainz. To create a configuration that is applied to components on startup, use config-sets instead. Changes to configuration overrides will be applied directly the the specific component.

# List available config options that can be changed in runtime for agent with ID 1.
$ vcli config ls -f type=agent -f overridable=true -f id=1
# Update flag `log` with 'debug' value, for the agent with ID 1.
$ vcli config update -f flag=log -f type=agent -f id=1 -v debug
# Remove the override for the same flag and agent
$ vcli config delete -f flag=log -f type=agent -f id=1
# Activate debug logging for all routers
$ vcli config update -f flag=log -f type=router -v debug
# View which configuration parameters has been set and from
# where on agent with ID 1
$ vcli config ls -f id=1 -f type=agent

Here we list all available config options that can be changed. We can edit config options by hovering an option and click on the pen icon.

Config on agent

When changing a configuration option we will also show what we will override.

Changing option modal

Configuration Using Tags

Components sharing identical configuration requirements can utilize ConfigSets via tags. A configset specifies one or more tags that should match the component and then the configuration options that are part of the ConfigSet will be applied to the matching components. A ConfigSet must specify which component type it should apply the configuration options for (e.g. agent or router). A ConfigSet will then be applied to all matching components for that type and tags. Changes to the configset will be applied directly to matching components.

# List configuration flags that are possible to change via a config-set
# and their default values.
$ vcli cs defaults -f overridable=true
# List configuration parameters that can be overridden for agents only.
$ vcli cs defaults -f type=agent -f overridable=true
# Create a ConfigSet for an agent with tag ID 1 with log set to debug.
$ vcli cs add mycs -t 1 --type agent -v log=debug
# Add a ConfigSet for agents with tag ID's 1 and 2 and weight 2, then set
# configuration 'base-url' and 'log'.
$ vcli cs add mycs -w 2 -t 1,2 --type agent -v base-url="" -v log=debug

Here we can set what agents/routers will get the configset by specifying tags. We can also specify a weight on the config set. Like when we are on a single agent/router we list all available config options that can be changed. We can edit config options by hovering an option and click on the pen icon.

Configset using tags

When configset is created we can also see what agents/routers is matching by clicking on a Config set and then Matching Servers.

Matching Servers