Add details to developer quick-start Mesos section
Combined building an image Docker and Disk Image Builder instructions to one page, added link to Mesos Web UI and curl commands to check app/task status without browser. Change-Id: I12bb2480c9e80fb07152561a895862b8fd9be4ba Closes-Bug: #1500139
This commit is contained in:
parent
529444146d
commit
ce06f4870b
|
@ -92,7 +92,7 @@ This session has only been tested on Ubuntu 14.04 (Trusty) and Fedora 20/21.
|
||||||
We recommend users to select one of them if it is possible.
|
We recommend users to select one of them if it is possible.
|
||||||
|
|
||||||
For in-depth guidance on adding magnum manually to a devstack instance, please
|
For in-depth guidance on adding magnum manually to a devstack instance, please
|
||||||
refer to the :ref:`dev-manual-install` guide.
|
refer to the `http://git.openstack.org/cgit/openstack/magnum/tree/doc/source/dev/dev-manual-devstack.rst`_
|
||||||
|
|
||||||
Clone devstack::
|
Clone devstack::
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ Building and Using a Mesos Bay
|
||||||
|
|
||||||
Provisioning a mesos bay requires a Ubuntu-based image with some packages
|
Provisioning a mesos bay requires a Ubuntu-based image with some packages
|
||||||
pre-installed. To build and upload such image, please refer to
|
pre-installed. To build and upload such image, please refer to
|
||||||
`<http://git.openstack.org/cgit/openstack/magnum/tree/magnum/templates/heat-mesos/elements/README.md>`_
|
`http://git.openstack.org/cgit/openstack/magnum/tree/magnum/templates/heat-mesos/README.md`_
|
||||||
|
|
||||||
Then, create a baymodel by using 'mesos' as the coe, with the rest of arguments
|
Then, create a baymodel by using 'mesos' as the coe, with the rest of arguments
|
||||||
similar to the Kubernetes baymodel::
|
similar to the Kubernetes baymodel::
|
||||||
|
@ -428,7 +428,8 @@ similar to the Kubernetes baymodel::
|
||||||
magnum baymodel-create --name mesosbaymodel --image-id ubuntu-mesos \
|
magnum baymodel-create --name mesosbaymodel --image-id ubuntu-mesos \
|
||||||
--keypair-id testkey \
|
--keypair-id testkey \
|
||||||
--external-network-id public \
|
--external-network-id public \
|
||||||
--dns-nameserver 8.8.8.8 --flavor-id m1.small \
|
--dns-nameserver 8.8.8.8 \
|
||||||
|
--flavor-id m1.small \
|
||||||
--coe mesos
|
--coe mesos
|
||||||
|
|
||||||
Finally, create the bay. Use the baymodel 'mesosbaymodel' as a template for
|
Finally, create the bay. Use the baymodel 'mesosbaymodel' as a template for
|
||||||
|
@ -441,21 +442,25 @@ Now that we have a mesos bay we can start interacting with it. First we need
|
||||||
to make sure the bay's status is 'CREATE_COMPLETE'::
|
to make sure the bay's status is 'CREATE_COMPLETE'::
|
||||||
|
|
||||||
$ magnum bay-show mesosbay
|
$ magnum bay-show mesosbay
|
||||||
+----------------+--------------------------------------+
|
+--------------------+--------------------------------------+
|
||||||
| Property | Value |
|
| Property | Value |
|
||||||
+----------------+--------------------------------------+
|
+--------------------+--------------------------------------+
|
||||||
| status | CREATE_COMPLETE |
|
| status | CREATE_COMPLETE |
|
||||||
| uuid | ff727f0d-72ca-4e2b-9fef-5ec853d74fdf |
|
| uuid | ff727f0d-72ca-4e2b-9fef-5ec853d74fdf |
|
||||||
| created_at | 2015-06-09T20:21:43+00:00 |
|
| status_reason | Stack CREATE completed successfully |
|
||||||
| updated_at | 2015-06-09T20:28:18+00:00 |
|
| created_at | 2015-06-09T20:21:43+00:00 |
|
||||||
| api_address | 172.24.4.115 |
|
| updated_at | 2015-06-09T20:28:18+00:00 |
|
||||||
| baymodel_id | 92dbda62-32d4-4435-88fc-8f42d514b347 |
|
| bay_create_timeout | 0 |
|
||||||
| node_count | 2 |
|
| api_address | 172.24.4.115 |
|
||||||
| node_addresses | [u'172.24.4.116', u'172.24.4.117'] |
|
| baymodel_id | 92dbda62-32d4-4435-88fc-8f42d514b347 |
|
||||||
| status_reason | Stack CREATE completed successfully |
|
| node_count | 2 |
|
||||||
| discovery_url | None |
|
| node_addresses | [u'172.24.4.116', u'172.24.4.117'] |
|
||||||
| name | mesosbay |
|
| master_count | 1 |
|
||||||
+----------------+--------------------------------------+
|
| discovery_url | None |
|
||||||
|
| status_reason | Stack CREATE completed successfully |
|
||||||
|
| discovery_url | None |
|
||||||
|
| name | mesosbay |
|
||||||
|
+--------------------+--------------------------------------+
|
||||||
|
|
||||||
Next we will create a container in this bay by using the REST API of Marathon.
|
Next we will create a container in this bay by using the REST API of Marathon.
|
||||||
This container will ping the address 8.8.8.8::
|
This container will ping the address 8.8.8.8::
|
||||||
|
@ -480,8 +485,13 @@ This container will ping the address 8.8.8.8::
|
||||||
$ curl -X POST -H "Content-Type: application/json" \
|
$ curl -X POST -H "Content-Type: application/json" \
|
||||||
http://${MASTER_IP}:8080/v2/apps -d@mesos.json
|
http://${MASTER_IP}:8080/v2/apps -d@mesos.json
|
||||||
|
|
||||||
Using the Marathon web console (at http://<master>:8080/), you will see the
|
To check application and task status::
|
||||||
application you created.
|
|
||||||
|
$ curl http://${MASTER_IP}:8080/v2/apps
|
||||||
|
$ curl http://${MASTER_IP}:8080/v2/tasks
|
||||||
|
|
||||||
|
You can access to the Mesos web page at \http://<master>:5050/ and Marathon web
|
||||||
|
console at \http://<master>:8080/.
|
||||||
|
|
||||||
Building Developer Documentation
|
Building Developer Documentation
|
||||||
================================
|
================================
|
||||||
|
@ -498,3 +508,4 @@ creates a virtual environment to run in.
|
||||||
When complete, the documentation can be accesed from::
|
When complete, the documentation can be accesed from::
|
||||||
|
|
||||||
doc/build/html/index.html
|
doc/build/html/index.html
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,30 @@ If you do not have a suitable image you can build one easily using one of two me
|
||||||
|
|
||||||
#### Disk Image Builder
|
#### Disk Image Builder
|
||||||
|
|
||||||
See [elements/README.md](elements/README.md) for instructions.
|
[elements/](elements/) directory contains [diskimage-builder](https://github.com/openstack/diskimage-builder)
|
||||||
|
elements to build an image which contains mesos and its frameworks required to
|
||||||
|
use the heat template mesoscluster.yaml.
|
||||||
|
|
||||||
|
Currently, only Ubuntu 14.04 is supported. An example Ubuntu based image can be
|
||||||
|
built and uploaded to glance as follows:
|
||||||
|
|
||||||
|
$ sudo apt-get update
|
||||||
|
$ sudo apt-get install git qemu-utils python-pip
|
||||||
|
$ sudo pip install pyyaml
|
||||||
|
|
||||||
|
$ 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=magnum/magnum/templates/heat-mesos/elements
|
||||||
|
$ export DIB_RELEASE=trusty
|
||||||
|
|
||||||
|
$ diskimage-builder/bin/disk-image-create ubuntu vm docker mesos \
|
||||||
|
-o ubuntu-mesos.qcow2
|
||||||
|
|
||||||
|
$ glance image-create --name ubuntu-mesos --visibility public \
|
||||||
|
--disk-format=qcow2 --container-format=bare \
|
||||||
|
--property os_distro=ubuntu --file=ubuntu-mesos.qcow2
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
|
@ -39,15 +62,13 @@ Use the provided [Dockerfile](./Dockerfile) to build the image (it uses the
|
||||||
same DIB scripts as above). The resultant image will be saved as
|
same DIB scripts as above). The resultant image will be saved as
|
||||||
`/tmp/ubuntu-mesos.qcow2`
|
`/tmp/ubuntu-mesos.qcow2`
|
||||||
|
|
||||||
```
|
$ sudo docker build -t magnum/mesos-builder .
|
||||||
$ sudo docker build -t magnum/mesos-builder .
|
$ sudo docker run -v /tmp:/output --rm -ti --privileged magnum/mesos-builder
|
||||||
$ sudo docker run -v /tmp:/output --rm -ti --privileged magnum/mesos-builder
|
...
|
||||||
...
|
Image file /output/ubuntu-mesos.qcow2 created...
|
||||||
Image file /output/ubuntu-mesos.qcow2 created...
|
$ glance image-create --name ubuntu-mesos --is-public True \
|
||||||
$ glance image-create --name ubuntu-mesos --is-public True \
|
--disk-format=qcow2 --container-format=bare \
|
||||||
--disk-format=qcow2 --container-format=bare \
|
--property os_distro=ubuntu --file=/tmp/ubuntu-mesos.qcow2
|
||||||
--property os_distro=ubuntu --file=/tmp/ubuntu-mesos.qcow2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Creating the stack
|
## Creating the stack
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,4 @@
|
||||||
Mesos elements
|
Mesos elements
|
||||||
==============
|
==============
|
||||||
|
|
||||||
This directory contains `[diskimage-builder](https://github.com/openstack/diskimage-builder)`
|
See [README.md](../README.md#disk-image-builder) for instructions.
|
||||||
elements to build an image which contains mesos and its frameworks required to
|
|
||||||
use the heat template mesoscluster.yaml.
|
|
||||||
|
|
||||||
Currently, only Ubuntu 14.04 is supported. An example Ubuntu based image can be
|
|
||||||
built and uploaded to glance as follows:
|
|
||||||
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install git qemu-utils python-pip
|
|
||||||
sudo pip install pyyaml
|
|
||||||
|
|
||||||
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=magnum/magnum/templates/heat-mesos/elements
|
|
||||||
export DIB_RELEASE=trusty
|
|
||||||
|
|
||||||
diskimage-builder/bin/disk-image-create ubuntu vm docker mesos \
|
|
||||||
-o ubuntu-mesos.qcow2
|
|
||||||
|
|
||||||
glance image-create --name ubuntu-mesos --visibility public \
|
|
||||||
--disk-format=qcow2 --container-format=bare \
|
|
||||||
--property os_distro=ubuntu --file=ubuntu-mesos.qcow2
|
|
||||||
|
|
Loading…
Reference in New Issue