From 904b5c425698ab4a32d5928a78c1a6f525856ed6 Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Fri, 14 Nov 2014 11:16:29 -0500 Subject: [PATCH] Add support for mongodb container Implements: blueprint kube-mongodb-container Change-Id: If76f6c0be90c3025933795d262304a10bf1a880d --- docker/mongodb/Dockerfile | 13 +++++++++++++ docker/mongodb/build | 1 + k8s/pod/mongodb-pod.yaml | 19 +++++++++++++++++++ k8s/service/mongodb-service.yaml | 7 +++++++ tools/start-all-pods | 1 + tools/start-all-services | 1 + 6 files changed, 42 insertions(+) create mode 100644 docker/mongodb/Dockerfile create mode 120000 docker/mongodb/build create mode 100644 k8s/pod/mongodb-pod.yaml create mode 100644 k8s/service/mongodb-service.yaml diff --git a/docker/mongodb/Dockerfile b/docker/mongodb/Dockerfile new file mode 100644 index 0000000000..2f74a46d7e --- /dev/null +++ b/docker/mongodb/Dockerfile @@ -0,0 +1,13 @@ +FROM kollaglue/fedora-rdo-base +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum -y install mongodb mongodb-server; yum clean all + +RUN mkdir -p /data/db + +VOLUME /data/db +VOLUME /var/log/mongodb + +EXPOSE 27017 + +ENTRYPOINT exec /bin/mongod --dbpath /data/db --fork --logpath /var/log/mongodb/mongo.log --noprealloc --smallfiles diff --git a/docker/mongodb/build b/docker/mongodb/build new file mode 120000 index 0000000000..d2accf7d39 --- /dev/null +++ b/docker/mongodb/build @@ -0,0 +1 @@ +../../tools/build-docker-image \ No newline at end of file diff --git a/k8s/pod/mongodb-pod.yaml b/k8s/pod/mongodb-pod.yaml new file mode 100644 index 0000000000..17663a7262 --- /dev/null +++ b/k8s/pod/mongodb-pod.yaml @@ -0,0 +1,19 @@ +desiredState: + manifest: + volumes: + - name: mongodb-data + source: + emptyDir: {} + containers: + image: kollaglue/fedora-rdo-mongodb + name: mongodb + ports: + - containerPort: 27017 + volumeMounts: + - name: mongodb-data + mountPath: /data/db + id: mongodb-1 + version: v1beta1 +id: mongodb +labels: + name: mongodb diff --git a/k8s/service/mongodb-service.yaml b/k8s/service/mongodb-service.yaml new file mode 100644 index 0000000000..4b8c94197f --- /dev/null +++ b/k8s/service/mongodb-service.yaml @@ -0,0 +1,7 @@ +apiVersion: v1beta1 +containerPort: 27017 +id: mongodb +kind: Service +port: 27017 +selector: + name: mongodb diff --git a/tools/start-all-pods b/tools/start-all-pods index e2ee16c532..919990f465 100755 --- a/tools/start-all-pods +++ b/tools/start-all-pods @@ -10,6 +10,7 @@ glance nova-controller neutron-controller heat +mongodb ceilometer-controller ' diff --git a/tools/start-all-services b/tools/start-all-services index 51520ec66e..83f511a0d9 100755 --- a/tools/start-all-services +++ b/tools/start-all-services @@ -9,6 +9,7 @@ glance-registry keystone-admin keystone-public mariadb +mongodb nova-api nova-ec2-api nova-libvirt