This repository contains the source code for the Resource-Metrics.Dashboard image, the image that contains an instance of the Grafana dashboard application.
- The Grafana application. The version of which is determined by the
default['grafana']['version']attribute in the
default.rbattributes file in the cookbook.
The configuration for the Grafana instance comes from a Consul-Template template file which replaces some of the template parameters with values from the Consul Key-Value store.
Important parts of the configuration file are
- Authentication is done via LDAP which is configued to use an Active Directory system.
- Dashboards and data sources are assumed to be obtained from the Consul Key-Value store via Consul-Template using the Grafana provisioning feature.
- Metrics are pushed to Telegraf via the Graphite protocol
In order to interact with Grafana users need to be authenticated.
Physical users are authenticated with Active Directory via the LDAP plugin which uses the following settings.
|Setting||Consul Key-Value path||Example|
|Active directory servers||
|DN lookup attribute||
|DN lookup base||
|Group lookup base||
The initial configuration is provided via Consul-Template by providing Consul-Template with the authentication to read the username and password for the Active Directory user that can be used to perform AD lookups.
No changes to the provisioning are applied other than the default one for the base image.
No additional configuration is applied other than the default one for the base image.
Metrics are collected from Grafana via Telegraf.
Build, test and release
The build process follows the standard procedure for building Calvinverse images.
- Download the new image to one of your Hyper-V hosts.
- Create a directory for the image and copy the image VHDX file there.
- Create a VM that points to the image VHDX file with the following settings
- Generation: 2
- RAM: at least 1024 Mb
- Hard disk: Use existing. Copy the path to the VHDX file
- Attach the VM to a suitable network
- Update the VM settings:
- Enable secure boot. Use the Microsoft UEFI Certificate Authority
- Attach a DVD image that points to an ISO file containing the settings for the environment. These
are normally found in the output of the Calvinverse.Infrastructure
repository. Pick the correct ISO for the task, in this case the
Linux Consul Clientimage
- Disable checkpoints
- Set the VM to always start
- Set the VM to shut down on stop
- Start the VM, it should automatically connect to the correct environment once it has provisioned
- Remove the old VM
- SSH into the host
- Issue the
- Shut the machine down with the
sudo shutdown nowcommand
- Once the machine has stopped, delete it