ironic-python-agent/imagebuild/coreos
John L. Villalovos 1ffaaf6abf Add support for proxy servers during image build
When building the docker image, the 'apt-get' and 'pip install' that are
run inside the docker image will fail in a an environment that uses
proxy servers.

Support environments with proxy servers by dynamically propagating
'http_proxy', 'https_proxy', and 'no_proxy' into the docker environment
when running 'apt-get' and 'pip install'

This can not be done with either --env-file or --env as those are
arguments to 'docker run'. The command being run here is 'docker build'

Once Docker 1.9 is widely deployed, we should switch to using the 'ARG'
command which was added in Docker 1.9. Currently Ubuntu 14.04 uses
Docker 1.6.  Using the ARG command will be a much cleaner solution.

Change-Id: Idd994cd58b9fb75bae13a43fc8363c36f113527d
Closes-Bug: #1533796
2016-02-04 14:27:49 -08:00
..
oem Disable xattrs in IPA extraction 2016-01-26 17:39:23 -05:00
Makefile Add support to build iso image 2014-09-17 21:34:48 +05:30
README.rst Add support to build iso image 2014-09-17 21:34:48 +05:30
build_coreos_image.sh Use requirements.txt from the root for image build 2014-11-18 14:53:59 -08:00
coreos-oem-inject.py Revert "Use latest CoreOS stable when building" 2015-12-22 18:32:08 +00:00
docker_build.bash Add support for proxy servers during image build 2016-02-04 14:27:49 -08:00
docker_clean.bash Update typos 2016-01-13 11:14:42 +05:30
full_trusty_build.sh Image building support for fedora hosts 2015-02-10 16:48:41 +00:00
iso-image-create Fix iso-image-create to work on RedHat distros 2015-07-07 13:04:47 -07:00

README.rst

ironic-python-agent CoreOS Image builder.

Builds a CoreOS image suitable for running the ironic-python-agent on a server.

Requirements

Must be run from a linux machine with a working docker installation and python-pip

Run the following locally or from a virtualenv to install the python requirements

pip install -r requirements.txt

Booting the agent with this image

PXE

The image is typically booted via PXE. Here's an example ipxe configuration (replace my-web-server with the IP/hostname of the http server hosting your image):

#!ipxe

dhcp
kernel http://my-web-server/coreos_production_pxe.vmlinuz
initrd http://my-web-server/coreos_production_pxe_image-oem.cpio.gz
boot

You can either embed a configuration file into the image, or set configuration options via the kernel command line. The only value most people will need is:

  • ipa-api-url=http://ironic-api-server:6385

But any config value supported in the agent can be given to the agent via the kernel command line, which allows the use of the same agent image across environments because it contains no state.

Virtual Media

Openstack Ironic supports booting IPA via virtual media in the form of an ISO image. Please see Ironic documentation for details on running in this configuration.

Getting the agent

Download

If you don't want to build your own image, you can download a copy of ironic-python-agent ramdisk and kernel, built using CoreOS, at: http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz and http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz

Build instructions

To create a docker repository and embed it into a CoreOS pxe image:

make

To just create the docker repository in oem/container.tar.gz:

make docker

To embed the oem/ directory into a CoreOS pxe image:

Note: In order to have the ability to ssh into the created image, you need to pass ssh keys in via the kernel command line for CoreOS, or create oem/authorized_keys with the keys you need added before building the image.

make coreos

To create a CoreOS ISO image to boot with virtual media:

make iso