apt stresstest #4

Supports: bionic focal xenial
Add to new model

Description

When this charm is deployed and related to a Telegraf instance it will continually monitor apt performance for the archive mirror environment it is deployed into. It runs in two ways. 1. With no mirror config it will just monitor its main archive mirror. 2. With a set of mirror to ip bindings it will manually test performance against every front-end a user may be resolved to.

The test itself works by spinning out a chrooted environment. Within the chrooted environment three apt operations are made and the time taken is measured. The operations are two apt-get update and then an apt-get download of a package.

When this charm is related to telegraf:exec interface it will emit output in the influx line protocol, suitable for consumption by telegraf and prometheus.


Overview

Charm to gather and publish metrics for archive mirrors.

Usage

To deploy the charm:

juju deploy cs:apt-stresstest

Configuration

apt-package
(string) The package or packages (space-separated) that apt will attempt to download. Specify at least one small (cacheable) and one large (non-cacheable) package.
bash ubuntu-wallpapers-xenial
download-timeout
(string) Download timeout in seconds. The timeout is applied to individual download operations. For global timeout see stresstest-timeout option
60
extra_packages
(string) Space separated list of extra deb packages to install.
install_keys
(string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
install_sources
(string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
package_status
(string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
install
stresstest-mirror-config
(string) A string containing YAML configuration consisting of a list of domain name to ip address pairs. Example: - ap-northeast-1.ec2.archive.ubuntu.com: 54.168.13.207 - ap-northeast-1.ec2.archive.ubuntu.com: 54.168.29.123 - ap-northeast-1.ec2.archive.ubuntu.com: 54.248.192.197 - ap-northeast-1.ec2.archive.ubuntu.com: 54.248.7.22
stresstest-timeout
(string) The overall timeout for apt-stresstest script runs, including downloading of packages and a cloud image.
600s
update-timeout
(string) apt-get update timeout in seconds
20