Skip to main content

glean

Glean is a program intended to configure a system based on configuration provided in a configuration drive.

Why would you want glean?

Different cloud providers have different ways of providing networking and other configuration to guest virtual-machines. Many use DHCP but others, notably Rackspace, use configuration provided via a configuration drive.

What does glean do?

Broadly, glean checks for configuration drive based information and, if found, uses that to configure the network. If config-drive is not found, it falls back to configuring any available interfaces with DHCP.

Specifically, it will mount the special block-device with label config-2 and parse the network_info.json and vendor_info.json files within. If appropriate network configuration is found, it will write out network configuration files.

The format of the network_info.json file is documented here. Please note that glean does not implement every feature listed.

If no network info is found there, available interfaces can be probed from /sys/class/net and any that appear to be up will be configured for use with DHCP.

It will also handle authorized_keys and host-name info provided from meta_data.json.

How does glean do this?

Glean determines the network configuration environment for the running platform and configures the interfaces appropriately.

systemd environment

On platforms where systemd is detected glean-install will add a udev rules file (99-glean.rules) that triggers on any network device being added. This will run the glean@.service systemd template for the interface specified.

This systemd unit firstly determines if there is already a /etc/sysconfig/network/ configuration for the interface; if so, the interface is considered configured and skipped.

If not, glean is started with the interface that triggered this event specified as an argument. The configuration drive is probed to see if network configuration for the interface is available. If so, it will be added, otherwise the interface will configured for DHCP.

networkd

networkd support is implemented as a separate distribution type. Currently it is only supported on Gentoo, and will be automatically selected by glean-install. It will similarly install a systemd service file or openrc config file (both are supported on Gentoo) and udev rules to call glean.

Other platforms

upstart and sysv environments are also supported. These will have init scripts installed to run glean at boot.

How do I use glean?

Glean ships glean-install, a script which install glean into your system startup environment. It should handle sysv, upstart and systemd to cover all major distributions. This should be run once, during install or image build.

The startup environment will be modified as described above to configure any found interfaces.

Differences to cloud-init?

Glean differs to cloud-init mainly in its very reduced dependency footprint. In a dynamic CI environment such as OpenStack, many of the python dependencies for cloud-init can cause conflicts with packages or versions required for testing.

Glean also better supports static IP allocation within config-drive, particuarly important within the Rackspace environment.

More details

Metadata

Release files for glean 1.25.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glean 1.25.1
File Size Uploaded
glean-1.25.1.tar.gz 80.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glean 1.25.1
File Interpreter ABI Platform
glean-1.25.1-py3-none-any.whl Python 3 none any Details

Total release size: 199.2 kB

Release files / glean-1.25.1.tar.gz

Download URL glean-1.25.1.tar.gz
Size 80.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7f383c2de83ecb4a460f2f74fd12c678e2d780a2f978a4e223117e6360680e10
BLAKE2b-256 checksum
How to use checksums
727a0de2467bf745c11c499012d1f5f4de19004b39e766ad87406fffcbd91a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.12

Release files / glean-1.25.1-py3-none-any.whl

Download URL glean-1.25.1-py3-none-any.whl
Size 119.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec547265fc1414106a49e744ee05dd7dce5f5ae8993df4074af997a148853731
BLAKE2b-256 checksum
How to use checksums
078ba77c23a760c162b637cfd8b80e6cb1258c5ff62733172c8cd8c4aeda1a54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.12

Release history Release notifications | RSS feed

This release

1.25.1 This release

2 release files

1.25.0

2 release files

1.24.0

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.18.1

2 release files

1.18.0

2 release files

1.16.0

2 release files

1.15.0

2 release files

1.14.1

2 release files

1.14.0

2 release files

1.12.0

2 release files

1.10.2

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

1 release file

0.0.0.post8

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page