From d93a813c391e9bcdeb04c133f5b7ccb44088b266 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Thu, 23 Mar 2017 16:18:13 +0530 Subject: [PATCH] Update Steps for creating dib images diskimage-builder/bin/disk-image-create no longer exists. So update steps for creating disk images. Change-Id: Ieae16ac32641f7525feb6caa0c55caa29615df9e Closes-Bug: #1675285 --- doc/source/userguide.rst | 4 ++-- magnum/drivers/common/image/fedora-atomic/README.rst | 8 +++++--- .../k8s_fedora_ironic_v1/image/kubernetes/Readme.md | 9 ++++++--- magnum/drivers/mesos_ubuntu_v1/image/Dockerfile | 8 ++++---- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/doc/source/userguide.rst b/doc/source/userguide.rst index 3d0fb252af..9f4aa36e54 100644 --- a/doc/source/userguide.rst +++ b/doc/source/userguide.rst @@ -1379,9 +1379,9 @@ an Ubuntu server:: $ sudo apt-get update $ sudo apt-get install git qemu-utils python-pip + $ sudo pip install diskimage-builder $ 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 $ git clone https://git.openstack.org/openstack/tripleo-image-elements.git $ git clone https://git.openstack.org/openstack/heat-templates.git @@ -1389,7 +1389,7 @@ an Ubuntu server:: $ export ELEMENTS_PATH=tripleo-image-elements/elements:heat-templates/hot/software-config/elements:magnum/magnum/drivers/mesos_ubuntu_v1/image/mesos $ export DIB_RELEASE=trusty - $ diskimage-builder/bin/disk-image-create ubuntu vm docker mesos \ + $ disk-image-create ubuntu vm docker mesos \ os-collect-config os-refresh-config os-apply-config \ heat-config heat-config-script \ -o ubuntu-mesos.qcow2 diff --git a/magnum/drivers/common/image/fedora-atomic/README.rst b/magnum/drivers/common/image/fedora-atomic/README.rst index 2a6700d015..4e51259445 100644 --- a/magnum/drivers/common/image/fedora-atomic/README.rst +++ b/magnum/drivers/common/image/fedora-atomic/README.rst @@ -37,14 +37,16 @@ How to generate Fedora Atomic image To generate an atomic image for Fedora 24 these commands can be executed:: + # Install diskimage-builder in virtual environment + virtualenv . + . bin/activate + pip install diskimage-builder 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 PATH="${PWD}/diskimage-builder/bin:$PATH" - export ELEMENTS_PATH="${PWD}/diskimage-builder/elements" + export ELEMENTS_PATH=$(python -c 'import os, diskimage_builder, pkg_resources;print(os.path.abspath(pkg_resources.resource_filename(diskimage_builder.__name__, "elements")))') export ELEMENTS_PATH="${ELEMENTS_PATH}:${PWD}/magnum/magnum/drivers/common/image" export DIB_RELEASE=24 # this can be switched to the desired version diff --git a/magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes/Readme.md b/magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes/Readme.md index 9df646cdc1..760f774745 100644 --- a/magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes/Readme.md +++ b/magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes/Readme.md @@ -6,14 +6,17 @@ elements to build an image which contains kubernetes required to use kubecluster An example fedora based image and uploaded to glance with the following: + # Install diskimage-builder in virtual environment + virtualenv . + . bin/activate + pip install diskimage-builder 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=$(python -c 'import os, diskimage_builder, pkg_resources;print(os.path.abspath(pkg_resources.resource_filename(diskimage_builder.__name__, "elements")))') export ELEMENTS_PATH=${ELEMENTS_PATH}:magnum/magnum/drivers/k8s_fedora_ironic_v1/image export DIB_RELEASE=25 - diskimage-builder/bin/disk-image-create baremetal \ + disk-image-create baremetal \ fedora selinux-permissive \ kubernetes \ -o fedora-25-kubernetes.qcow2 diff --git a/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile b/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile index c1bf8e15ff..af17f456df 100644 --- a/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile +++ b/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile @@ -2,17 +2,17 @@ FROM ubuntu:trusty RUN \ apt-get -yqq update && \ - apt-get -yqq install git qemu-utils python-dev python-yaml python-six uuid-runtime curl sudo kpartx parted wget && \ + apt-get -yqq install git qemu-utils python-dev python-pip python-yaml python-six uuid-runtime curl sudo kpartx parted wget && \ + pip install diskimage-builder && \ mkdir /output WORKDIR /build -ENV PATH="dib-utils/bin:$PATH" ELEMENTS_PATH="tripleo-image-elements/elements:heat-templates/hot/software-config/elements:magnum/magnum/drivers/mesos_ubuntu_v1/image" DIB_RELEASE=trusty +ENV PATH="dib-utils/bin:$PATH" ELEMENTS_PATH="$(python -c 'import os, diskimage_builder, pkg_resources;print(os.path.abspath(pkg_resources.resource_filename(diskimage_builder.__name__, "elements")))'):tripleo-image-elements/elements:heat-templates/hot/software-config/elements:magnum/magnum/drivers/mesos_ubuntu_v1/image" DIB_RELEASE=trusty RUN git clone https://git.openstack.org/openstack/magnum -RUN git clone https://git.openstack.org/openstack/diskimage-builder.git RUN git clone https://git.openstack.org/openstack/dib-utils.git RUN git clone https://git.openstack.org/openstack/tripleo-image-elements.git RUN git clone https://git.openstack.org/openstack/heat-templates.git -CMD diskimage-builder/bin/disk-image-create ubuntu vm docker mesos os-collect-config os-refresh-config os-apply-config heat-config heat-config-script -o /output/ubuntu-mesos.qcow2 +CMD disk-image-create ubuntu vm docker mesos os-collect-config os-refresh-config os-apply-config heat-config heat-config-script -o /output/ubuntu-mesos.qcow2