magnum/magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes
Spyros Trigazis 2c635692ae Split k8s atomic vm and ironic drivers
The 2 k8s atomic drivers we currently support are added to the
same driver. This breaks ironic support with the stevedore
work I'm currently doing.

With stevedore, we can choose only one driver based on the
server_type, os and coe. We won't be able to pick a driver and
then choose an implementation bases on server_type.

Partially-Implements: blueprint magnum-baremetal-full-support
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
Change-Id: Ic1b8103551f48f85baa2ed9ff32d5b70b1fab84e
2016-09-09 18:10:08 +02:00
..
Readme.md Split k8s atomic vm and ironic drivers 2016-09-09 18:10:08 +02:00
elements-deps Split k8s atomic vm and ironic drivers 2016-09-09 18:10:08 +02:00
package-installs.yaml Split k8s atomic vm and ironic drivers 2016-09-09 18:10:08 +02:00

Readme.md

Kubernetes elements

This directory contains [diskimage-builder](https://github.com/openstack/diskimage-builder) elements to build an image which contains kubernetes required to use kubecluster-fedora-ironic.yaml.

An example fedora based image and uploaded to glance with the following:

git clone https://git.openstack.org/openstack/magnum
git clone https://git.openstack.org/openstack/diskimage-builder.git
git clone https://git.openstack.org/openstack/dib-utils.git
export PATH="${PWD}/dib-utils/bin:$PATH"
export ELEMENTS_PATH=diskimage-builder/elements
export ELEMENTS_PATH=${ELEMENTS_PATH}:magnum/magnum/drivers/k8s_fedora_atomic_v1/image/ironic
export DIB_RELEASE=23
diskimage-builder/bin/disk-image-create baremetal \
  fedora selinux-permissive \
  kubernetes \
  -o fedora-23-kubernetes.qcow2

KERNEL_ID=`glance image-create --name fedora-k8s-kernel \
                               --visibility public \
                               --disk-format=aki \
                               --container-format=aki \
                               --file=fedora-23-kubernetes.vmlinuz \
                               | grep id | tr -d '| ' | cut --bytes=3-57`
RAMDISK_ID=`glance image-create --name fedora-k8s-ramdisk \
                                --visibility public \
                                --disk-format=ari \
                                --container-format=ari \
                                --file=fedora-23-kubernetes.initrd \
                                | grep id |  tr -d '| ' | cut --bytes=3-57`
BASE_ID=`glance image-create --name fedora-k8s \
                                --os-distro fedora \
                                --visibility public \
                                --disk-format=qcow2 \
                                --container-format=bare \
                                --property kernel_id=$KERNEL_ID \
                                --property ramdisk_id=$RAMDISK_ID \
                                --file=fedora-23-kubernetes.qcow2 \
                                | grep -v kernel | grep -v ramdisk \
                                | grep id | tr -d '| ' | cut --bytes=3-57`