Add cloudkitty containers for type source

Change-Id: I548c20afd7ce7ba27a5475c69c78c7d267ccc24b
Partially-Implements: blueprint cloudkitty-docker
This commit is contained in:
Christian Berendt 2016-08-01 00:12:13 +02:00
parent 73dd4f6cd8
commit aa4b49a2c3
9 changed files with 104 additions and 7 deletions

View File

@ -32,6 +32,7 @@ Kolla provides images to deploy the following OpenStack projects:
- `Bifrost <http://docs.openstack.org/developer/bifrost/>`__
- `Ceilometer <http://docs.openstack.org/developer/ceilometer/>`__
- `Cinder <http://docs.openstack.org/developer/cinder/>`__
- `CloudKitty <http://docs.openstack.org/developer/cloudkitty/>`__
- `Congress <http://docs.openstack.org/developer/congress/>`__
- `Designate <http://docs.openstack.org/developer/designate/>`__
- `Glance <http://docs.openstack.org/developer/glance/>`__

View File

@ -0,0 +1,20 @@
FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_cloudkitty_extend_start
RUN chmod 755 /usr/local/bin/kolla_cloudkitty_extend_start
{% block cloudkitty_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cloudkitty

View File

@ -0,0 +1,9 @@
#!/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
cloudkitty-dbsync upgrade
cloudkitty-storage-init
exit 0
fi

View File

@ -0,0 +1,29 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD cloudkitty-base-archive /cloudkitty-base-source
RUN ln -s cloudkitty-base-source/* cloudkitty \
&& useradd --user-group cloudkitty \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /cloudkitty \
&& mkdir -p /etc/cloudkitty /var/lib/cloudkitty /home/cloudkitty \
&& cp -r /cloudkitty/etc/cloudkitty/* /etc/cloudkitty/ \
&& chown -R cloudkitty: /etc/cloudkitty /var/lib/cloudkitty /home/cloudkitty
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla cloudkitty \
&& touch /usr/local/bin/kolla_cloudkitty_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cloudkitty_extend_start
{% block cloudkitty_base_footer %}{% endblock %}

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/cloudkitty" ]]; then
mkdir -p /var/log/kolla/cloudkitty
fi
if [[ $(stat -c %a /var/log/kolla/cloudkitty) != "755" ]]; then
chmod 755 /var/log/kolla/cloudkitty
fi
. /usr/local/bin/kolla_cloudkitty_extend_start

View File

@ -0,0 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}cloudkitty-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block cloudkitty_processor_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER cloudkitty

View File

@ -45,10 +45,10 @@ _PROFILE_OPTS = [
'swift'],
help='Main images'),
cfg.ListOpt('aux',
default=['aodh', 'congress', 'designate', 'gnocchi',
'influxdb', 'ironic', 'kuryr', 'magnum', 'manila',
'mistral', 'murano', 'rally', 'sahara', 'senlin',
'telegraf', 'trove', 'zaqar'],
default=['aodh', 'cloudkitty', 'congress', 'designate',
'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum',
'manila', 'mistral', 'murano', 'rally', 'sahara',
'senlin', 'telegraf', 'trove', 'zaqar'],
help='Aux Images'),
cfg.ListOpt('default',
default=['cron', 'kolla-toolbox', 'glance', 'haproxy',
@ -189,6 +189,10 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/congress/'
'congress-master.tar.gz')},
'cloudkitty-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/cloudkitty/'
'cloudkitty-master.tar.gz')},
'designate-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/designate/'

View File

@ -0,0 +1,4 @@
---
features:
- Docker image for CloudKitty, the rating as a service component
of OpenStack.

View File

@ -71,7 +71,8 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
"vmtp",
"watcher-base",
"congress-base",
"bifrost-base"]
"bifrost-base",
"cloudkitty-base"]
def setUp(self):
super(BuildTestCentosBinary, self).setUp()
@ -96,7 +97,8 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
"zaqar",
"watcher-base",
"congress-base",
"bifrost-base"]
"bifrost-base",
"cloudkitty-base"]
def setUp(self):
super(BuildTestUbuntuBinary, self).setUp()
@ -120,7 +122,8 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
"vmtp",
"watcher-base",
"congress-base",
"bifrost-base"]
"bifrost-base",
"cloudkitty-base"]
def setUp(self):
super(BuildTestOracleLinuxBinary, self).setUp()