Browse Source

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
changes/63/449063/4
yatinkarel 4 years ago
committed by yatin
parent
commit
d93a813c39
  1. 4
      doc/source/userguide.rst
  2. 8
      magnum/drivers/common/image/fedora-atomic/README.rst
  3. 9
      magnum/drivers/k8s_fedora_ironic_v1/image/kubernetes/Readme.md
  4. 8
      magnum/drivers/mesos_ubuntu_v1/image/Dockerfile

4
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

8
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

9
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

8
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
Loading…
Cancel
Save