diskimage-builder/elements/simple-init
Colleen Murphy b5f51322a3 Fix OpenSUSE support
The dhcp-all-interfaces and simple-init elements did not have the ISC
DHCP Client package mapped for OpenSUSE, which caused DIB to fail with
"'isc-dhcp-client' not found in package names. Trying capabilities."

Similarly, the bootloader element did not have the grub-pc package
properly mapped for OpenSuse, which caused DIB to fail with "Package
'grub-pc' not found.".

This patch adds the package mappings for these elements so that the
opensuse element can be created and booted successfully.

Change-Id: Ife478158fec3a95de73a9206b38dcc6511d56cc8
2016-05-03 22:23:51 -07:00
..
cleanup.d simple-init: Fix path for /etc/ssh test 2016-04-13 14:53:21 -07:00
environment.d Simple-init should disable cloud-init 2015-05-11 16:55:02 +00:00
install.d Remove all interface configs for simple-init 2016-03-19 04:17:34 +00:00
README.rst Add element to process config-drive network info 2015-04-14 13:39:18 -04:00
element-deps Switch simple-init to pip-and-virtualenv element 2016-02-08 16:58:14 +11:00
package-installs.yaml Use generic "dhcp-client" name 2016-04-22 11:31:54 +10:00
pkg-map Fix OpenSUSE support 2016-05-03 22:23:51 -07:00
source-repository-simple-init Install glean from openstack source 2015-04-25 08:45:10 -04:00

README.rst

simple-init

Basic network and system configuration that can't be done until boot

Unfortunately, as much as we'd like to bake it in to an image, we can't know in advance how many network devices will be present, nor if DHCP is present in the host cloud. Additionally, in environments where cloud-init is not used, there are a couple of small things, like mounting config-drive and pulling ssh keys from it, that need to be done at boot time.

Autodetect network interfaces during boot and configure them

The rationale for this is that we are likely to require multiple network interfaces for use cases such as baremetal and there is no way to know ahead of time which one is which, so we will simply run a DHCP client on all interfaces with real MAC addresses (except lo) that are visible on the first boot.

The script /usr/local/sbin/simple-init.sh will be called early in each boot and will scan available network interfaces and ensure they are configured properly before networking services are started.

Processing startup information from config-drive

On most systems, the DHCP approach desribed above is fine. But in some clouds, such as Rackspace Public cloud, there is no DHCP. Instead, there is static network config via config-drive. simple-init will happily call glean which will do nothing if static network information is not there.

Finally, glean will handle ssh-keypair-injection from config drive if cloud-init is not installed.