Skip to main content

Simple program to write static config from config-drive

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glean-1.19.0.tar.gz (68.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glean-1.19.0-py3-none-any.whl (101.7 kB view details)

Uploaded Python 3

File details

Details for the file glean-1.19.0.tar.gz.

File metadata

  • Download URL: glean-1.19.0.tar.gz
  • Upload date:
  • Size: 68.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for glean-1.19.0.tar.gz
Algorithm Hash digest
SHA256 7e75bff419eedf461034c6a5e0c283483db24b4669846a177ea8c07ee5dc5ccf
MD5 52eb8321720e37bfea96fa52ca8b4040
BLAKE2b-256 b233ae4d0c476e51feb429442668c01765d741fb66b486e37fd4ccd11c87e2bc

See more details on using hashes here.

File details

Details for the file glean-1.19.0-py3-none-any.whl.

File metadata

  • Download URL: glean-1.19.0-py3-none-any.whl
  • Upload date:
  • Size: 101.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for glean-1.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e204f16f2af32fa3d783b19514f44957ed11147f6c264f5201fa7d87283c85c2
MD5 2095a9e3b491751fa307c90966dfb4b1
BLAKE2b-256 260ca397ec26942c54ed80ec653d4451cf16c1c7e3b18f58aac22d6cb528714a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page