Merge "Add docker method for building mesos image"
commit
d5d1d88286
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue