diff options
| author | Luigi Toscano <ltoscano@redhat.com> | 2019-03-18 18:44:43 +0100 |
|---|---|---|
| committer | Luigi Toscano <ltoscano@redhat.com> | 2019-03-18 23:55:46 +0100 |
| commit | c0a2ac1ee2dc275eabcceae92a0d21811fc10f48 (patch) | |
| tree | 9656fadbf9dbf4274fef184ff91d0529e1ff4ada /docker | |
| parent | 4058c8e2983b10fc1daceae2fb260065428b2786 (diff) | |
| download | kolla-c0a2ac1ee2dc275eabcceae92a0d21811fc10f48.tar.gz kolla-c0a2ac1ee2dc275eabcceae92a0d21811fc10f48.zip | |
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
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/sahara/sahara-base/Dockerfile.j2 | 26 |
1 files changed, 26 insertions, 0 deletions
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 \ |
