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 | |
| 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
| -rw-r--r-- | docker/sahara/sahara-base/Dockerfile.j2 | 26 | ||||
| -rwxr-xr-x | kolla/common/config.py | 24 | ||||
| -rw-r--r-- | releasenotes/notes/sahara-split-plugins-66e31717b7c24472.yaml | 7 |
3 files changed, 57 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 \ diff --git a/kolla/common/config.py b/kolla/common/config.py index 8214cde99..22a991d61 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -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/' diff --git a/releasenotes/notes/sahara-split-plugins-66e31717b7c24472.yaml b/releasenotes/notes/sahara-split-plugins-66e31717b7c24472.yaml new file mode 100644 index 000000000..3d654ad4d --- /dev/null +++ b/releasenotes/notes/sahara-split-plugins-66e31717b7c24472.yaml @@ -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`.) |
