Added in XCAT-Kubernetes container files

Made a container that can be run as a daemon and ssh'ed into.
It is intended to be used to act as an XCAT management node for the
qemu instances.

Change-Id: I9e3b27ecbdb60e252b8318d3334f12b2acd04355
Signed-off-by: Alanny Lopez <alanny.lopez@ibm.com>
diff --git a/kubernetes/XCAT-Kubernetes-Container/Dockerfile b/kubernetes/XCAT-Kubernetes-Container/Dockerfile
new file mode 100644
index 0000000..c649f54
--- /dev/null
+++ b/kubernetes/XCAT-Kubernetes-Container/Dockerfile
@@ -0,0 +1,25 @@
+FROM ubuntu:14.04
+
+RUN apt-get update && apt-get install -yy \
+    bzip2 \
+    locales \
+    openssh-server \
+    wget
+
+# Set the locale
+RUN locale-gen en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
+RUN mkdir /var/run/sshd
+RUN echo 'root:0penBMC' | chpasswd
+RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
+RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
+expose 22
+
+COPY setup_xcat.sh /
+RUN /setup_xcat.sh
+
+COPY entrypoint.sh /
+CMD ["/entrypoint.sh"]
diff --git a/kubernetes/XCAT-Kubernetes-Container/entrypoint.sh b/kubernetes/XCAT-Kubernetes-Container/entrypoint.sh
new file mode 100755
index 0000000..985319b
--- /dev/null
+++ b/kubernetes/XCAT-Kubernetes-Container/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Starting Xcat Daemon Service
+service xcatd start
+
+# Starting SSH Daemon
+echo "SSH Daemon listening on port 22"
+/usr/sbin/sshd -D
diff --git a/kubernetes/XCAT-Kubernetes-Container/setup_xcat.sh b/kubernetes/XCAT-Kubernetes-Container/setup_xcat.sh
new file mode 100755
index 0000000..fb27e86
--- /dev/null
+++ b/kubernetes/XCAT-Kubernetes-Container/setup_xcat.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+mkdir /root/xcat2
+cd /root/xcat2
+wget https://downloads.sourceforge.net/project/xcat/xcat-dep/2.x_Ubuntu/xcat-dep-ubuntu-snap20150611.tar.bz
+wget https://github.com/xcat2/xcat-core/releases/download/2.10_release/xcat-core-2.10-ubuntu.tar.bz2
+ls
+tar jxvf xcat-dep-ubuntu-snap20150611.tar.bz
+tar jxvf xcat-core-2.10-ubuntu.tar.bz2
+./xcat-dep/mklocalrepo.sh
+./xcat-core/mklocalrepo.sh
+apt-get update && apt-get install -y --force-yes xcat
+rm /root/xcat2/*.tar*
+apt-get autoremove