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
This commit is contained in:
Luigi Toscano 2019-03-18 18:44:43 +01:00
parent 4058c8e298
commit c0a2ac1ee2
3 changed files with 57 additions and 0 deletions

View File

@ -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 \

View File

@ -766,6 +766,30 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/sahara/'
'sahara-master.tar.gz')},
'sahara-base-plugin-ambari': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-ambari/'
'sahara-plugin-ambari-master.tar.gz')},
'sahara-base-plugin-cdh': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-cdh/'
'sahara-plugin-cdh-master.tar.gz')},
'sahara-base-plugin-mapr': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-mapr/'
'sahara-plugin-mapr-master.tar.gz')},
'sahara-base-plugin-spark': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-spark/'
'sahara-plugin-spark-master.tar.gz')},
'sahara-base-plugin-storm': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-storm/'
'sahara-plugin-storm-master.tar.gz')},
'sahara-base-plugin-vanilla': {
'type': 'url',
'location': ('$tarballs_base/sahara-plugin-vanilla/'
'sahara-plugin-vanilla-master.tar.gz')},
'searchlight-base': {
'type': 'url',
'location': ('$tarballs_base/searchlight/'

View File

@ -0,0 +1,7 @@
---
features:
- |
Add support for the Sahara plugins, which are provided separately
from the core since Stein. The currently supported methods are
source (through the `sahara_base_packages` variable) and RPM
(through the dedicated `sahara_base_plugins_pip_packages`.)