A default configuration is provided in this role. It establishes a cache service based on the freedesktop-sdk buildbox-casd Docker image with persistent storage. The following variables are defined:
casd_cache
: the path to the cache on the hostcasd_docker_host
: The path (or address) to use to connect to the docker API, can be used for example to run the container with podmancasd_image
: the Docker image to use in instantiating the containercasd_container
: the container namecasd_network
: the name of the Docker network to create and attach the service container tocasd_network_connected_containers
: a list of containers to connect to the network being created for buildbox-casdcasd_log_level
: set log level for casd, possible values debug, error, info, trace, warning. Default is errorcasd_log_driver
: the log driver to use for the buildbox-casd containercasd_log_options
: additional options to pass to the log drivercasd_port
: the port the service listens to in the container and which is exposed on the containercasd_published_ports
: a list of docker port specifications to be published. This does not affect whether the port on which buildbox-casd is listening is exposed.casd_bind_address
: the address the service listens to inside the containercasd_quota_high
: the maximum local cache sizecasd_quota_low
: local cache size to retain on LRU expiry, either as absolute size or as percentage ofcasd_quota_high
casd_reserved
: Reserved disk spacecasd_cache_mnt
: the path to bindmount the cache to in the containercasd_cmd
: the entrypoint of the containercasd_bind_path
: path to a UNIX socket to serve on. If set,casd_bind_address
andcasd_port
are ignored entirely and the service is not exposed.casd_extra_mounts
: additional docker volume mounts to add to the container. Useful for sharing a UNIX socketcasd_proxy_certdir
: the path to copy cert/key data to on the host, this step is skipped if the path is left emptycasd_proxy_{cas,ac,asset,execution}_url
: URL to a remote service to proxy requests tocasd_proxy_{cas,ac,asset,execution}_server_cert
: CA certificate to check the remote server againstcasd_proxy_{cas,ac,asset,execution}_client_{cert,key}
: TLS keypair used for client authentication against the remote servercasd_metrics_mode
: option passed to--metrics-mode
of buildbox-casdcasd_metrics_publish_interval_secs
: how often metrics get published by buildbox-casd, in secondscasd_metrics_prefix
: Set a prefix on metric names, if unset, the--metrics-prefix
argument is not passed to buildbox-casdcasd_labels
: a dictionary containing a set of labels applied to the container
Here the default should work just fine.
Acts as a caching proxy for requests to another REAPI cache.
Let's suppose we wish to act for a CAS and Action Cache operating at https://re.example.com
and a Remote Asset server at https://ra.example.com
.
Then, our configuration would look somewhat like:
casd_proxy_cas_url: "https://re.example.com"
casd_proxy_ac_url: "https://re.example.com"
casd_proxy_asset_url: "https://ra.example.com"
If the endpoints require different TLS certificates, then this can be handled by the appropriate variables.
It is also possible to have buildbox-casd
serving only on a UNIX socket.
In this case, we need to set the casd_bind_path
variable, which overrides the effects of casd_bind_address
and casd_port
.
casd_extra_mounts:
- "casd_sock:/sock"
casd_bind_path: "/sock/casd.sock"