Dmytro Dovbii 82d6b47ddc Fix DIB elements to allow docker use EnvironmentFile
Closes-Bug: #1590070
Change-Id: I5cd7bcb9b6fc7356a9255e1e05a6a169a054ecf6
2016-09-16 18:52:04 +03:00
..

Kubernetes Elements

This folders contains necessary DIB elements to build Kubernetes image expected by "Kubernetes Cluster" Murano application.

Prerequisites

  1. Install diskimage-builder
sudo pip install diskimage-builder
  1. Install qemu-uils and kpartx

On Ubuntu, Debian:

sudo apt-get install qemu-utils kpartx

On Centos, Fedora:

sudo yum install qemu-utils kpartx

Image building

To build Debian-based image

sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/Kubernetes/KubernetesCluster/elements \
    DIB_RELEASE=jessie DIB_CLOUD_INIT_DATASOURCES="Ec2, ConfigDrive, OpenStack" disk-image-create vm debian murano-agent-debian \
    docker kubernetes -o debian8-x64-kubernetes

To build Ubuntu-based image

sudo ELEMENTS_PATH=${murano_agent_root}/contrib/elements:${murano_apps_root}/Docker/Kubernetes/KubernetesCluster/elements disk-image-create \
    vm ubuntu murano-agent docker kubernetes -o ubuntu14.04-x64-kubernetes

Where ${murano_agent_root} is a path to murano-agent files and ${murano_apps_root} is a path to murano-apps files.

Please be careful that diskimage-builder uses tmpfs if 8 Gb memory or bigger is detected. In case of 8 Gb tmpfs size is not enough to build kubernetes. Use DIB_NO_TMPFS=1 in this case or hack diskimage-builder.