https://github.com/softwarefactory-project/zuul-weeder
Zuul configuration analyzer
https://github.com/softwarefactory-project/zuul-weeder
zuul
Last synced: 12 days ago
JSON representation
Zuul configuration analyzer
- Host: GitHub
- URL: https://github.com/softwarefactory-project/zuul-weeder
- Owner: softwarefactory-project
- License: apache-2.0
- Created: 2022-04-07T17:50:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T19:20:55.000Z (over 1 year ago)
- Last Synced: 2025-03-10T20:19:57.972Z (over 1 year ago)
- Topics: zuul
- Language: Haskell
- Homepage:
- Size: 698 KB
- Stars: 4
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# zuul-weeder: Zuul configuration analyzer
Use this service to inspect the configurations objects loaded in a [zuul](https://zuul-ci.org) system.
## Overview and scope
Zuul Weeder analyzes the configuration objects such as jobs and nodesets and provides a search interface for:
- Depencencies: what depends on an object.
- Requirements: what is needed by an object.
- URL of the configuration files that contains the object.
Zuul Weeder leverage a generic dependency graph using the data found in the ZooKeeper database
to collect every configuration elements used by any tenants.
The goal is to help evaluate the impact of a configuration change,
for example, when removing a node label or a repository.
## Usage
The service provide two functions:
- `/search/$name` returns the list of object matching the requested name.
- `/object/$type/$name` returns
- the list of configuration file url that directly defines or uses the object,
- the list of related objects that are reachable, either by requirement or by dependency.
For example, by visiting `/search/centos`, the service returns:
- job tripleo-centos
- nodeset centos
- label cloud-centos
And by visiting `/object/nodeset/centos`, the service returns:
- The list of zuul.yaml file url that contains a nodeset named `centos`.
- The list of jobs and project that depends on this nodeset.
- The list of node label name that is required by this nodeset.
The results can be scoped to a specific tenant by using the `/tenant/$tenant` url prefix.
## Setup
Start the service at `http://localhost:9001` (needs access to the zuul.conf):
```
podman run -p 9001:9001 -v /etc/zuul:/etc/zuul:ro --rm ghcr.io/softwarefactory-project/zuul-weeder
```
Serve behind a sub-path using this argument `-e WEEDER_ROOT_URL=/weeder/` and this httpd.conf:
```
ProxyPass http://weeder-host:9001
ProxyPassReverse http://weeder-host:9001
```
Setup monitoring by adding this prometheus configuration:
```
scrape_configs:
- job_name: weeder
static_configs:
- targets:
- weeder-host:9001
```
Configure grafana dashboard by running `./bin/create-dashboard`
## Roadmap
Here are some planned features:
- Add a project name object type, to resolve global project configuration (e.g. with a name regexp) and to create a graph connection for all the matching repository names.
- Connect the graphs from multiple zuul-weeder service to analyse the configuration cross deployments.
- Display the weeds, e.g. the dead configuration object that are unreachable.
Checkout the [Developper Guide](./CONTRIBUTING.md).