From 75e7490df99bbae584c55b1835b4482c9afcb0ee Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 14 Jul 2015 19:56:51 -0700 Subject: [PATCH] Add build from source for Magnum Add build from source for Magnum for the CentOS platform. Partially-implements: blueprint install-from-source Change-Id: I4bdec4711806e8ad965b0cdaf946d4bc9bed6dcb --- docker/centos/source/magnum/magnum-api/Dockerfile | 9 +++++++++ docker/centos/source/magnum/magnum-api/build | 1 + docker/centos/source/magnum/magnum-api/check.sh | 1 + .../source/magnum/magnum-api/config-external.sh | 1 + .../source/magnum/magnum-api/config-internal.sh | 1 + docker/centos/source/magnum/magnum-api/start.sh | 1 + .../centos/source/magnum/magnum-base/.buildinfo | 10 ++++++++++ .../centos/source/magnum/magnum-base/Dockerfile | 15 +++++++++++++++ docker/centos/source/magnum/magnum-base/build | 1 + .../source/magnum/magnum-base/config-magnum.sh | 1 + .../source/magnum/magnum-conductor/Dockerfile | 11 +++++++++++ .../centos/source/magnum/magnum-conductor/build | 1 + .../magnum/magnum-conductor/config-external.sh | 1 + .../magnum/magnum-conductor/config-internal.sh | 1 + .../source/magnum/magnum-conductor/start.sh | 1 + 15 files changed, 56 insertions(+) create mode 100644 docker/centos/source/magnum/magnum-api/Dockerfile create mode 120000 docker/centos/source/magnum/magnum-api/build create mode 120000 docker/centos/source/magnum/magnum-api/check.sh create mode 120000 docker/centos/source/magnum/magnum-api/config-external.sh create mode 120000 docker/centos/source/magnum/magnum-api/config-internal.sh create mode 120000 docker/centos/source/magnum/magnum-api/start.sh create mode 100644 docker/centos/source/magnum/magnum-base/.buildinfo create mode 100644 docker/centos/source/magnum/magnum-base/Dockerfile create mode 120000 docker/centos/source/magnum/magnum-base/build create mode 120000 docker/centos/source/magnum/magnum-base/config-magnum.sh create mode 100644 docker/centos/source/magnum/magnum-conductor/Dockerfile create mode 120000 docker/centos/source/magnum/magnum-conductor/build create mode 120000 docker/centos/source/magnum/magnum-conductor/config-external.sh create mode 120000 docker/centos/source/magnum/magnum-conductor/config-internal.sh create mode 120000 docker/centos/source/magnum/magnum-conductor/start.sh diff --git a/docker/centos/source/magnum/magnum-api/Dockerfile b/docker/centos/source/magnum/magnum-api/Dockerfile new file mode 100644 index 0000000000..2173a7b426 --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/Dockerfile @@ -0,0 +1,9 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%magnum-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY ./start.sh /start.sh +COPY ./check.sh /check.sh + +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/source/magnum/magnum-api/build b/docker/centos/source/magnum/magnum-api/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/check.sh b/docker/centos/source/magnum/magnum-api/check.sh new file mode 120000 index 0000000000..7464ba2960 --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/check.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-api/check.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/config-external.sh b/docker/centos/source/magnum/magnum-api/config-external.sh new file mode 120000 index 0000000000..746e2aa58d --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/config-external.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-api/config-external.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/config-internal.sh b/docker/centos/source/magnum/magnum-api/config-internal.sh new file mode 120000 index 0000000000..7f9cace393 --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/config-internal.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/start.sh b/docker/centos/source/magnum/magnum-api/start.sh new file mode 120000 index 0000000000..58cc9e37c9 --- /dev/null +++ b/docker/centos/source/magnum/magnum-api/start.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-api/start.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-base/.buildinfo b/docker/centos/source/magnum/magnum-base/.buildinfo new file mode 100644 index 0000000000..08a89ea8d4 --- /dev/null +++ b/docker/centos/source/magnum/magnum-base/.buildinfo @@ -0,0 +1,10 @@ +# Build info specific to this image. All values can be overridden in .buildconf + +COMPONENT=magnum +SOURCE_INSTALL_AVAILABLE=1 + +# Used for git install method +: ${CLONE_FROM:=https://github.com/openstack/magnum} + +# Used for curl install method +: ${TARBALL_URI:=http://tarballs.openstack.org/magnum/magnum-2015.1.1.tar.gz} diff --git a/docker/centos/source/magnum/magnum-base/Dockerfile b/docker/centos/source/magnum/magnum-base/Dockerfile new file mode 100644 index 0000000000..0962e08d2a --- /dev/null +++ b/docker/centos/source/magnum/magnum-base/Dockerfile @@ -0,0 +1,15 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +ADD ./magnum.tar / +RUN ln -s /magnum-* /magnum + +RUN cd /magnum \ + && useradd --user-group magnum \ + && pip install -r requirements.txt \ + && pip install /magnum \ + && mkdir /etc/magnum /var/log/magnum \ + && cp -r /magnum/etc/* /etc/magnum/ + +RUN mkdir -p /opt/kolla +COPY config-magnum.sh /opt/kolla/config-magnum.sh diff --git a/docker/centos/source/magnum/magnum-base/build b/docker/centos/source/magnum/magnum-base/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/source/magnum/magnum-base/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-base/config-magnum.sh b/docker/centos/source/magnum/magnum-base/config-magnum.sh new file mode 120000 index 0000000000..473c0be8e2 --- /dev/null +++ b/docker/centos/source/magnum/magnum-base/config-magnum.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-base/config-magnum.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-conductor/Dockerfile b/docker/centos/source/magnum/magnum-conductor/Dockerfile new file mode 100644 index 0000000000..72de638883 --- /dev/null +++ b/docker/centos/source/magnum/magnum-conductor/Dockerfile @@ -0,0 +1,11 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%magnum-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +# Install kubectl binary (ugh) +RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes + +COPY ./start.sh /start.sh + +COPY config-internal.sh config-external.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker/centos/source/magnum/magnum-conductor/build b/docker/centos/source/magnum/magnum-conductor/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/source/magnum/magnum-conductor/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-conductor/config-external.sh b/docker/centos/source/magnum/magnum-conductor/config-external.sh new file mode 120000 index 0000000000..2d3f514d55 --- /dev/null +++ b/docker/centos/source/magnum/magnum-conductor/config-external.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-conductor/config-external.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-conductor/config-internal.sh b/docker/centos/source/magnum/magnum-conductor/config-internal.sh new file mode 120000 index 0000000000..1d8f73aa92 --- /dev/null +++ b/docker/centos/source/magnum/magnum-conductor/config-internal.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-conductor/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-conductor/start.sh b/docker/centos/source/magnum/magnum-conductor/start.sh new file mode 120000 index 0000000000..6818630367 --- /dev/null +++ b/docker/centos/source/magnum/magnum-conductor/start.sh @@ -0,0 +1 @@ +../../../../common/magnum/magnum-conductor/start.sh \ No newline at end of file