Updates Ubuntu Mesos build

* Adds a script to install dependancies when building the Ubuntu
  Mesos image (used in OpenStack infra)
* Fixes Dockerfile to build the Ubuntu Mesos image
  (it was missing components to add Heat agent in the image)
* Changes the name of the Mesos Ubunutu image because the Ubuntu
  version and Mesos version has changed
* Fixes a broken link in the doc

Change-Id: I35ffd4bd358a62dd7cf0d0e485b531a36b6c262b
This commit is contained in:
Bertrand NOEL 2016-09-19 10:09:19 +02:00
parent 888e615bd7
commit 48f79d69e1
5 changed files with 56 additions and 6 deletions

View File

@ -1250,7 +1250,7 @@ an Ubuntu server::
$ 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 ubuntu-14.04.3-mesos-0.25.0.qcow2
-o ubuntu-mesos.qcow2
Dockerfile
++++++++++

View File

@ -2,16 +2,17 @@ FROM ubuntu:trusty
RUN \
apt-get -yqq update && \
apt-get -yqq install git qemu-utils python-dev python-pip uuid-runtime curl sudo kpartx parted wget && \
pip install pyyaml && \
apt-get -yqq install git qemu-utils python-dev python-yaml python-six uuid-runtime curl sudo kpartx parted wget && \
mkdir /output
WORKDIR /build
ENV PATH="/build/dib-utils/bin:$PATH" ELEMENTS_PATH="magnum/magnum/drivers/mesos_ubuntu_v1/image" DIB_RELEASE=trusty
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
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 -o /output/ubuntu-mesos.qcow2
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

View File

@ -1,4 +1,4 @@
Mesos elements
==============
See [Building an image](http://docs.openstack.org/developer/magnum/dev/dev-mesos.html) for instructions.
See [Building an image](http://docs.openstack.org/developer/magnum/userguide.html#building-mesos-image) for instructions.

View File

@ -0,0 +1,22 @@
#!/bin/bash
# This script installs all needed dependencies to generate
# images using diskimage-builder. Please not it only has been
# tested on Ubuntu Trusty
set -eux
set -o pipefail
sudo apt-get update || true
sudo apt-get install -y \
git \
qemu-utils \
python-dev \
python-yaml \
python-six \
uuid-runtime \
curl \
sudo \
kpartx \
parted \
wget

View File

@ -0,0 +1,27 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
# check that image is valid
qemu-img check -q $1
# validate estimated size
FILESIZE=$(stat -c%s "$1")
MIN_SIZE=681574400 # 650MB
if [ $FILESIZE -lt $MIN_SIZE ] ; then
echo "Error: generated image size is lower than expected."
exit 1
fi