aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Gonzalez <dabarren@gmail.com>2017-04-07 15:41:07 +0100
committerEduardo Gonzalez <dabarren@gmail.com>2017-05-19 09:23:49 +0000
commit1b924fc4b2430651d6a5f83c462a65622d28c741 (patch)
treeb694108175be1dfbfcb7593a582ebc17d17233cd
parentd3302929e001b89798727f0e312149c5abc0da5a (diff)
downloadkolla-1b924fc4b2430651d6a5f83c462a65622d28c741.tar.gz
kolla-1b924fc4b2430651d6a5f83c462a65622d28c741.zip
Allow nova plugins install, add blazar plugin
Allow install plugins in nova base container for source builds. Implement blazar-nova plugin in nova. Change-Id: I4e3591a3b3d18d5830d32fa25cac5e657b00508c Partially-Implements: blueprint blazar-images
-rw-r--r--docker/nova/nova-base/Dockerfile.j210
-rwxr-xr-xkolla/common/config.py4
-rw-r--r--releasenotes/notes/nova-plugins-f3ceab61b19d008a.yaml4
3 files changed, 17 insertions, 1 deletions
diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2
index 80a228282..959319a59 100644
--- a/docker/nova/nova-base/Dockerfile.j2
+++ b/docker/nova/nova-base/Dockerfile.j2
@@ -57,17 +57,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{{ macros.install_packages(nova_base_packages | customizable("packages")) }}
ADD nova-base-archive /nova-base-source
+ADD plugins-archive /
{% set nova_base_pip_packages = [
'/nova'
] %}
+{% set nova_base_plugins_pip_packages = [
+ '/plugins/*'
+] %}
+
RUN ln -s nova-base-source/* nova \
&& {{ macros.install_pip(nova_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/nova/ \
&& cp -r /nova/etc/nova/* /etc/nova/ \
&& chown -R nova: /etc/nova/ \
- && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/nova/rootwrap.conf
+ && sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/nova/rootwrap.conf \
+ && if [ "$(ls /plugins)" ]; then \
+ {{ macros.install_pip(nova_base_plugins_pip_packages) }}; \
+ fi
COPY nova_sudoers /etc/sudoers.d/kolla_nova_sudoers
RUN chmod 750 /etc/sudoers.d \
diff --git a/kolla/common/config.py b/kolla/common/config.py
index bb838314b..069d6abe5 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -525,6 +525,10 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/nova/'
'nova-master.tar.gz')},
+ 'nova-base-plugin-blazar': {
+ 'type': 'url',
+ 'location': ('$tarballs_base/blazar-nova/'
+ 'blazar-nova-master.tar.gz')},
'octavia-base': {
'type': 'url',
'location': ('$tarballs_base/octavia/'
diff --git a/releasenotes/notes/nova-plugins-f3ceab61b19d008a.yaml b/releasenotes/notes/nova-plugins-f3ceab61b19d008a.yaml
new file mode 100644
index 000000000..5a3413b4c
--- /dev/null
+++ b/releasenotes/notes/nova-plugins-f3ceab61b19d008a.yaml
@@ -0,0 +1,4 @@
+---
+features:
+ - Support install nova plugins in nova source images.
+ - Install blazar-nova plugin in nova-base source image.