diff --git a/docker/aodh/aodh-api/Dockerfile.j2 b/docker/aodh/aodh-api/Dockerfile.j2 new file mode 100644 index 0000000000..5a4777d81f --- /dev/null +++ b/docker/aodh/aodh-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-aodh-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 755 /usr/local/bin/kolla_extend_start + +{{ include_footer }} + +USER aodh diff --git a/docker/aodh/aodh-api/extend_start.sh b/docker/aodh/aodh-api/extend_start.sh new file mode 100644 index 0000000000..65349464cb --- /dev/null +++ b/docker/aodh/aodh-api/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + aodh-manage db_sync + exit 0 +fi diff --git a/docker/aodh/aodh-base/Dockerfile.j2 b/docker/aodh/aodh-base/Dockerfile.j2 new file mode 100644 index 0000000000..4f0ecca9d3 --- /dev/null +++ b/docker/aodh/aodh-base/Dockerfile.j2 @@ -0,0 +1,25 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum -y install \ + openstack-aodh-common \ + && yum clean all + + {% endif %} + +{% elif install_type == 'source' %} + +ADD aodh-base-archive /aodh-base-source +RUN ln -s aodh-base-source/* aodh \ + && useradd --user-group aodh \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /aodh \ + && mkdir -p /etc/aodh /var/log/aodh /home/aodh \ + && cp -r /aodh/etc/* /etc/aodh/ \ + && chown -R aodh: /etc/aodh /var/log/aodh /home/aodh + +{% endif %} + +RUN usermod -a -G kolla aodh diff --git a/docker/aodh/aodh-evaluator/Dockerfile.j2 b/docker/aodh/aodh-evaluator/Dockerfile.j2 new file mode 100644 index 0000000000..0d65c45b10 --- /dev/null +++ b/docker/aodh/aodh-evaluator/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-aodh-evaluator \ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER aodh diff --git a/docker/aodh/aodh-expirer/Dockerfile.j2 b/docker/aodh/aodh-expirer/Dockerfile.j2 new file mode 100644 index 0000000000..90594ea8b2 --- /dev/null +++ b/docker/aodh/aodh-expirer/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-aodh-expirer \ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER aodh diff --git a/docker/aodh/aodh-listener/Dockerfile.j2 b/docker/aodh/aodh-listener/Dockerfile.j2 new file mode 100644 index 0000000000..b6e02da38d --- /dev/null +++ b/docker/aodh/aodh-listener/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-aodh-listener\ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER aodh diff --git a/docker/aodh/aodh-notifier/Dockerfile.j2 b/docker/aodh/aodh-notifier/Dockerfile.j2 new file mode 100644 index 0000000000..2fd354da2a --- /dev/null +++ b/docker/aodh/aodh-notifier/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}aodh-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-aodh-notifier\ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER aodh diff --git a/etc/kolla/kolla-build.conf b/etc/kolla/kolla-build.conf index baaa29ff96..22c2165928 100644 --- a/etc/kolla/kolla-build.conf +++ b/etc/kolla/kolla-build.conf @@ -53,7 +53,7 @@ [profiles] infra = ceph,data,mariadb,haproxy,keepalived,kolla-ansible,memcached,mongodb,openvswitch,rabbitmq,rsyslog main = cinder,ceilometer,glance,heat,horizon,keystone,neutron,nova,swift -aux = designate,gnocchi,ironic,magnum,zaqar +aux = aodh,designate,gnocchi,ironic,magnum,zaqar default = data,kolla-ansible,glance,haproxy,heat,horizon,keepalived,keystone,memcached,mariadb,neutron,nova,openvswitch,rabbitmq,rsyslog gate = ceph,cinder,data,dind,glance,haproxy,heat,horizon,keepalived,keystone,kolla-ansible,mariadb,memcached,neutron,nova,openvswitch,rabbitmq,rsyslog @@ -74,6 +74,10 @@ gate = ceph,cinder,data,dind,glance,haproxy,heat,horizon,keepalived,keystone,kol type = url location = https://github.com/openstack/requirements/tarball/master +[aodh-base] +type = url +location = http://tarballs.openstack.org/aodh/aodh-master.tar.gz + [ceilometer-base] type = url location = http://tarballs.openstack.org/ceilometer/ceilometer-master.tar.gz