From c0a2ac1ee2dc275eabcceae92a0d21811fc10f48 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Mon, 18 Mar 2019 18:44:43 +0100 Subject: Sahara: install also the split plugins The code of Sahara plugins has been extracted during the Stein cycle. Add support for: - the source-based deployment method (a beta release of the plugins is available on pypi) and - the RPM-based method (RDO contains the packages for the plugins.) This change is required also for the RPM method. Even if the RPM packages of the plugins are linked through weak dependencies to the sahara-api and sahara-engine packages (Supplements), weak dependencies are currently disabled here. Change-Id: I5241d84aa1ca2830cfdb60c1a3ff4e958a21b345 --- docker/sahara/sahara-base/Dockerfile.j2 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'docker') diff --git a/docker/sahara/sahara-base/Dockerfile.j2 b/docker/sahara/sahara-base/Dockerfile.j2 index 50a10bd16..69d8641e1 100644 --- a/docker/sahara/sahara-base/Dockerfile.j2 +++ b/docker/sahara/sahara-base/Dockerfile.j2 @@ -11,6 +11,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set sahara_base_packages = ['openstack-sahara-common'] %} + {% if distro_python_version.startswith('3') %} + {% set sahara_base_packages = sahara_base_packages + [ + 'python3-sahara-plugin-ambari', + 'python3-sahara-plugin-cdh', + 'python3-sahara-plugin-mapr', + 'python3-sahara-plugin-spark', + 'python3-sahara-plugin-storm', + 'python3-sahara-plugin-vanilla' + ] %} + {% else %} + {% set sahara_base_packages = sahara_base_packages + [ + 'python2-sahara-plugin-ambari', + 'python2-sahara-plugin-cdh', + 'python2-sahara-plugin-mapr', + 'python2-sahara-plugin-spark', + 'python2-sahara-plugin-storm', + 'python2-sahara-plugin-vanilla' + ] %} + {% endif %} {% elif base_package_type == 'deb' %} {% set sahara_base_packages = ['sahara-common'] %} {% endif %} @@ -26,13 +45,20 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(sahara_base_packages | customizable("packages")) }} ADD sahara-base-archive /sahara-base-source +ADD plugins-archive / {% set sahara_base_pip_packages = [ '/sahara' ] %} +{% set sahara_base_plugins_pip_packages = [ + '/plugins/*', +] %} RUN ln -s sahara-base-source/* sahara \ && {{ macros.install_pip(sahara_base_pip_packages | customizable("pip_packages")) }} \ + && if [ "$(ls /plugins)" ]; then \ + {{ macros.install_pip(sahara_base_plugins_pip_packages) }}; \ + fi \ && mkdir -p /etc/sahara \ && cp -r /sahara/etc/sahara/* /etc/sahara/ \ && chown -R sahara: /etc/sahara \ -- cgit v1.2.3