aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorAlicja Kwasniewska <alicja.kwasniewska@intel.com>2015-07-02 17:08:59 +0000
committerPaul Bourke <paul.bourke@oracle.com>2015-07-09 11:06:58 +0000
commitfcda6a06d8eee9d3f3199962b36a04a8c702072c (patch)
treec2377e1bd49612caef7dc0462d3a8633cd31d907 /docker
parent370736abb761df28ad497cf354ce7394d5b2e1cc (diff)
downloadkolla-fcda6a06d8eee9d3f3199962b36a04a8c702072c.tar.gz
kolla-fcda6a06d8eee9d3f3199962b36a04a8c702072c.zip
Keystone installation from source
Makes use of new gen-source-tar script to provide a source based keystone image. This patch introduces a new concept of a .buildinfo file, which provides variables specific to the image being built which cannot be defaulted in a generic way, at least until the build script is overhauled. This file is sourced before the .buildconf which still leaves everything customisable by the user. Co-Authored-By: Paul Bourke <paul.bourke@oracle.com> Change-Id: I0ec6b9cfe6d4173f3192e4ae5833fb0f6d333f1c Implements: blueprint install-from-source
Diffstat (limited to 'docker')
-rw-r--r--docker/centos/source/base/Dockerfile14
-rw-r--r--docker/centos/source/keystone/.buildinfo10
-rw-r--r--docker/centos/source/keystone/Dockerfile30
l---------docker/centos/source/keystone/build1
l---------docker/centos/source/keystone/check.sh1
l---------docker/centos/source/keystone/config-external.sh1
l---------docker/centos/source/keystone/config-internal.sh1
l---------docker/centos/source/keystone/start.sh1
-rwxr-xr-xdocker/common/keystone/config-internal.sh3
9 files changed, 54 insertions, 8 deletions
diff --git a/docker/centos/source/base/Dockerfile b/docker/centos/source/base/Dockerfile
index b8a741e0b..b7792ff84 100644
--- a/docker/centos/source/base/Dockerfile
+++ b/docker/centos/source/base/Dockerfile
@@ -11,14 +11,18 @@ RUN curl https://copr.fedoraproject.org/coprs/sdake/crux/repo/epel-7/sdake-crux-
# Dependencies required for building/installing source components
RUN yum install -y \
- MySQL-python \
+ crux \
+ crudini \
+ gcc \
git \
- python-pip \
+ libffi-devel \
+ mariadb \
+ MySQL-python \
+ openssl \
+ openssl-devel \
python-devel \
- gcc \
+ python-pip \
tar \
- openssl-devel \
- libffi-devel \
&& yum clean all
RUN pip install --upgrade pip
diff --git a/docker/centos/source/keystone/.buildinfo b/docker/centos/source/keystone/.buildinfo
new file mode 100644
index 000000000..acf28a0a8
--- /dev/null
+++ b/docker/centos/source/keystone/.buildinfo
@@ -0,0 +1,10 @@
+# Build info specific to this image. All values can be overridden in .buildconf
+
+COMPONENT=keystone
+SOURCE_INSTALL_AVAILABLE=1
+
+# Used for git install method
+: ${CLONE_FROM:=https://github.com/openstack/keystone}
+
+# Used for curl install method
+: ${TARBALL_URI:=http://tarballs.openstack.org/keystone/keystone-2015.1.0.tar.gz}
diff --git a/docker/centos/source/keystone/Dockerfile b/docker/centos/source/keystone/Dockerfile
new file mode 100644
index 000000000..995004c14
--- /dev/null
+++ b/docker/centos/source/keystone/Dockerfile
@@ -0,0 +1,30 @@
+FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+RUN yum -y install \
+ httpd \
+ mod_wsgi \
+ && yum clean all
+
+ADD ./keystone.tar /
+RUN ln -s /keystone-* /keystone
+
+RUN cd /keystone \
+ && useradd --user-group keystone \
+ && pip install -r requirements.txt \
+ && pip install /keystone \
+ && mkdir /etc/keystone /var/log/keystone /var/www/cgi-bin/keystone \
+ && cp /keystone/etc/keystone.conf.sample /etc/keystone/keystone.conf \
+ && cp -r /keystone/etc/* /etc/keystone/ \
+ && cp -a httpd/wsgi-keystone.conf /etc/httpd/conf.d \
+ && sed -i 's,/var/log/apache2,/var/log/httpd,' /etc/httpd/conf.d/wsgi-keystone.conf \
+ && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
+ && cp -a httpd/keystone.py /var/www/cgi-bin/keystone/main \
+ && cp -a httpd/keystone.py /var/www/cgi-bin/keystone/admin \
+ && chown -R keystone: /var/www/cgi-bin/keystone /var/log/keystone \
+ && chmod 755 /var/www/cgi-bin/keystone/*
+
+COPY start.sh check.sh /
+COPY config-internal.sh config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
diff --git a/docker/centos/source/keystone/build b/docker/centos/source/keystone/build
new file mode 120000
index 000000000..8d652f7ee
--- /dev/null
+++ b/docker/centos/source/keystone/build
@@ -0,0 +1 @@
+../../../../tools/build-docker-image \ No newline at end of file
diff --git a/docker/centos/source/keystone/check.sh b/docker/centos/source/keystone/check.sh
new file mode 120000
index 000000000..fe8e7608c
--- /dev/null
+++ b/docker/centos/source/keystone/check.sh
@@ -0,0 +1 @@
+../../../common/keystone/check.sh \ No newline at end of file
diff --git a/docker/centos/source/keystone/config-external.sh b/docker/centos/source/keystone/config-external.sh
new file mode 120000
index 000000000..ae5be7eea
--- /dev/null
+++ b/docker/centos/source/keystone/config-external.sh
@@ -0,0 +1 @@
+../../../common/keystone/config-external.sh \ No newline at end of file
diff --git a/docker/centos/source/keystone/config-internal.sh b/docker/centos/source/keystone/config-internal.sh
new file mode 120000
index 000000000..fe8d98c1f
--- /dev/null
+++ b/docker/centos/source/keystone/config-internal.sh
@@ -0,0 +1 @@
+../../../common/keystone/config-internal.sh \ No newline at end of file
diff --git a/docker/centos/source/keystone/start.sh b/docker/centos/source/keystone/start.sh
new file mode 120000
index 000000000..ae34844ea
--- /dev/null
+++ b/docker/centos/source/keystone/start.sh
@@ -0,0 +1 @@
+../../../common/keystone/start.sh \ No newline at end of file
diff --git a/docker/common/keystone/config-internal.sh b/docker/common/keystone/config-internal.sh
index 527870fdf..2d522b699 100755
--- a/docker/common/keystone/config-internal.sh
+++ b/docker/common/keystone/config-internal.sh
@@ -112,9 +112,6 @@ export OS_PASSWORD=${KEYSTONE_ADMIN_PASSWORD}
export OS_TENANT_NAME=${ADMIN_TENANT_NAME}
EOF
-# Create keystone user and group if they don't exist
-id -u keystone &>/dev/null || useradd --user-group keystone
-
# Run PKI Setup script
echo "Setting up PKI"
/usr/bin/keystone-manage pki_setup --keystone-user keystone --keystone-group keystone