This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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?

systemd environment

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 specified. 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.

Note

glean uses the network init scripts service network.service on RedHat platforms (or the equivalent on other platforms). You should ensure this service is enabled and other tools such as NetworkManager are disabled for correct operation.

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.

Release History

Release History

This version
History Node

1.9.1

History Node

1.9.0

History Node

1.8.0

History Node

1.7.0

History Node

1.6.1

History Node

1.6.0

History Node

1.5.1

History Node

1.5.0

History Node

1.4.3

History Node

1.4.2

History Node

1.4.1

History Node

1.4.0

History Node

1.3.0

History Node

1.2.0

History Node

1.1.0

History Node

1.0.0

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.0.post8

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
glean-1.9.1-py2-none-any.whl (73.4 kB) Copy SHA256 Checksum SHA256 py2 Wheel Mar 29, 2017
glean-1.9.1.tar.gz (42.5 kB) Copy SHA256 Checksum SHA256 Source Mar 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting