Merge "Add docker method for building mesos image"

changes/57/210957/1
Jenkins 2015-08-10 00:50:49 +00:00 committed by Gerrit Code Review
commit d5d1d88286
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,17 @@
FROM ubuntu:vivid
RUN \
apt-get -yqq update && \
apt-get -yqq install git qemu-utils python-pip uuid-runtime curl sudo parted wget && \
pip install pyyaml && \
mkdir /output
WORKDIR /build
ENV PATH="/build/dib-utils/bin:$PATH" ELEMENTS_PATH="magnum/magnum/templates/heat-mesos/elements" 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
CMD diskimage-builder/bin/disk-image-create ubuntu vm docker mesos -o /output/ubuntu-mesos.qcow2

View File

@ -22,6 +22,33 @@ middleware pre-installed:
- `mesos`
- `marathon`
### Building an image
If you do not have a suitable image you can build one easily using one of two methods:
#### Disk Image Builder
See [elements/README.md](elements/README.md) for instructions.
#### Docker
Install docker using `curl -sSL http://get.docker.com | sudo bash` or use
the appropriate system packaging.
Use the provided [Dockerfile](./Dockerfile) to build the image (it uses the
same DIB scripts as above). The resultant image will be saved as
`/tmp/ubuntu-mesos.qcow2`
```
$ sudo docker build -t magnum/mesos-builder .
$ sudo docker run -v /tmp:/output --rm -ti --privileged magnum/mesos-builder
...
Image file /output/ubuntu-mesos.qcow2 created...
$ glance image-create --name ubuntu-mesos --is-public True \
--disk-format=qcow2 --container-format=bare \
--property os_distro=ubuntu --file=/tmp/ubuntu-mesos.qcow2
```
## Creating the stack
Creating an environment file `local.yaml` with parameters specific to