GitXplorerGitXplorer
j

capp-hooks

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
8a0391b45c2ed40e3470104fe3735f6bfc04790b

version 1.1.1

ccpontvieux-systra committed a year ago
Unverified
e38a28013e54112d2be48cb22a23a70b99ed4335

fix cpu dashboards

ccpontvieux-systra committed a year ago
Unverified
62f51b737fd5465912dae78bc89fdf623e1ae65c

version 1.1.0

ccpontvieux-systra committed a year ago
Unverified
ae16c9171cdfd98d644d92acdf6791f24af55284

Merge branch 'QE-710_modern_grafana_dashboards' into 'master'

ccpontvieux-systra committed a year ago
Unverified
0bab78f583dc4b684922bd21ca356cb8bdc07570

QE-710: Modern grafana dashboards

ccpontvieux-systra committed a year ago
Unverified
4954c1baae199c08e2a26ed399c990cf559b5590

Fix incorrect newline that slipped into borgmatic backup files

ccpontvieux-systra committed a year ago

README

The README file for this repository.

CAPP-HOOKS

Goal

These scripts will be executed while deploying/undeploying an application on Qeto infrastructure.

Structure

Script files should be put in any of the following directories:

  • pre_deploy
  • post_deploy
  • pre_undeploy
  • post_undeploy

Script files should have the executive bit set.

Backup format

Backup configurations are described in a x-backups section in the docker-compose.yml file.

In this x-backups section, describe each named volume that needs a backup and indicates a number of rentention_days for the backup repository.

Example:

volumes:
    pgdata:
x-backups:
    pgdata:
        retention_days: 3

You could also define any x-ENV-backups section where ENV could be dev, demo, integ, staging or prod that will override the default x-backups section.

Use empty named volume declaration to skip backup that volume.

Monitoring

The monitoring hooks allows an automatic configuration of Qeto's monitoring dashboards.

Three hooks are used :

  • pre_deploy/monitoring for labelling the containers (the labels are later needed by the monitoring solution),
  • post_deploy/monitoring for setting up the monitoring dashboards,
  • post_undeploy/monitoring for tearing down the monitoring dashboards.

These hooks need the configuration elements located in confs/monitoring. This directory contains :

  • templates directory: json templates for the dahboards, that will be adapted to the service and environment and injected in Grafana, used by Qeto's monitoring solution,
  • blacklist: a blacklist of services that do not need monitoring panels,
  • locking.py: a helper module that provides functions for locking files and avoid race conditions,
  • post_deploy: a python script executed for setting up the dashboards,
  • post_undeploy: a python script used for tearing down the dashboards.

These hooks rely on the fact that Grafana's dashboard configuration is located in a docker volume. The monitoring hook will read and write configurations on this volume in order to update Grafana's dashboards.

Hub

The hub hooks are maintaining a json file up to date with currently deployed application and their frontend urls.

Two hooks are used:

  • post_deploy/hub for adding the app/env and its url to the json,
  • pre_undeploy/hub for removing the app/env from the json.

The json file is kept in a hub_data docker volume at /data/apps.json location.

The hub application should be deployed to read that volume/file.