[openstack-dev] [kolla] Heat templates for kubernetes + docker
Lars Kellogg-Stedman
lars at redhat.com
Tue Oct 14 15:41:32 UTC 2014
This came up briefly on the meeting yesterday, but I wanted to bring
it to a wider audience.
I know some folks out there are using the Heat templates I put
together for setting up a simple kubernetes environment. I have
recently added support for the Gluster shared filesystem; you'll find
it in the "feature/gluster" branch:
https://github.com/larsks/heat-kubernetes/tree/feature/gluster
Once everything is booted, you can create a volume:
# gluster volume create mariadb replica 2 \
192.168.113.5:/bricks/mariadb 192.168.113.4:/bricks/mariadb
volume create: mariadb: success: please start the volume to access data
# gluster volume start mariadb
volume start: mariadb: success
And then immediately access that volume under the "/gluster" autofs
mountpoint (e.g., "/gluster/mariadb"). You can use this in
combination with Kubernetes volumes to allocate storage to containers
that will be available on all of the minions. For example, you could
use a pod configuration like this:
desiredState:
manifest:
volumes:
- name: mariadb-data
source:
hostDir:
path: /gluster/mariadb
containers:
- env:
- name: DB_ROOT_PASSWORD
value: password
image: kollaglue/fedora-rdo-mariadb
name: mariadb
ports:
- containerPort: 3306
volumeMounts:
- name: mariadb-data
mountPath: /var/lib/mysql
id: mariadb-1
version: v1beta1
id: mariadb
labels:
name: mariadb
With this configuration, you could kill the mariadb container, have it
created on other minion, and you would still have access to all the
data.
This is meant simply as a way to experiment with storage and
kubernetes.
--
Lars Kellogg-Stedman <lars at redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack | http://blog.oddbit.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141014/cb1171a9/attachment.pgp>
More information about the OpenStack-dev
mailing list