Merge "Add dragonflow container"

This commit is contained in:
Jenkins 2017-05-18 04:51:31 +00:00 committed by Gerrit Code Review
commit 0bd1e3a84d
8 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,49 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block dragonflow_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='dragonflow') }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set dragonflow_base_packages = [
'zeromq'
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set dragonflow_base_packages = [
'libzmq1'
] %}
{% endif %}
{{ macros.install_packages(dragonflow_base_packages | customizable("packages")) }}
{% set dragonflow_base_pip_packages = [
'/dragonflow'
] %}
ADD dragonflow-base-archive /dragonflow-base-source
RUN ln -s dragonflow-base-source/* dragonflow \
&& {{ macros.install_pip(dragonflow_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/dragonflow \
&& cp -r /dragonflow/etc/* /etc/dragonflow/ \
&& chown -R dragonflow: /etc/dragonflow
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_dragonflow_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_dragonflow_extend_start
{% block dragonflow_base_footer %}{% endblock %}

View File

@ -0,0 +1,12 @@
#!/bin/bash
# Create log dir for dragonflow logs
LOG_DIR="/var/log/kolla/dragonflow"
if [[ ! -d "${LOG_DIR}" ]]; then
mkdir -p ${LOG_DIR}
fi
if [[ $(stat -c %a ${LOG_DIR}) != "755" ]]; then
chmod 755 ${LOG_DIR}
fi
. /usr/local/bin/kolla_dragonflow_extend_start

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}dragonflow-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block dragonflow_controller_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block dragonflow_controller_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER dragonflow

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}dragonflow-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block dragonflow_metadata_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block dragonflow_metadata_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER dragonflow

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}dragonflow-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block dragonflow_publisher_service_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block dragonflow_publisher_service_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER dragonflow

View File

@ -95,6 +95,7 @@ _PROFILE_OPTS = [
'cloudkitty',
'congress',
'designate',
'dragonflow',
'freezer',
'gnocchi',
'influxdb',
@ -303,6 +304,10 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/designate/'
'designate-master.tar.gz')},
'dragonflow-base': {
'type': 'url',
'location': ('$tarballs_base/dragonflow/'
'dragonflow-master.tar.gz')},
'freezer-api': {
'type': 'url',
'location': ('$tarballs_base/freezer-api/'
@ -839,6 +844,10 @@ USERS = {
'zun-user': {
'uid': 42463,
'gid': 42463,
},
'dragonflow-user': {
'uid': 42464,
'gid': 42464,
}
}

View File

@ -0,0 +1,4 @@
---
features:
- Add Dragonflow Dockerfile , Dragonflow is a distributed sdn framework
for neutron and it is in the big-tent.

View File

@ -74,6 +74,7 @@ class BuildTest(object):
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
excluded_images = [
"bifrost-base",
"dragonflow-base",
"freezer-base",
"kafka",
"karbor-base",
@ -115,6 +116,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
"bifrost-base",
"cloudkitty-base",
"congress-base",
"dragonflow-base",
"freezer-base",
"heat-all",
"karbor-base",
@ -156,6 +158,7 @@ class BuildTestDebianBinary(BuildTest, base.BaseTestCase):
"bifrost-base",
"cloudkitty-base",
"congress-base",
"dragonflow-base",
"freezer-base",
"heat-all",
"karbor-base",
@ -195,6 +198,7 @@ class BuildTestDebianSource(BuildTest, base.BaseTestCase):
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
excluded_images = [
"bifrost-base",
"dragonflow-base",
"freezer-base",
"kafka",
"karbor-base",