2015-09-17 09:35:33 -07:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
2015-11-23 12:38:58 +05:30
|
|
|
MAINTAINER {{ maintainer }}
|
2015-08-13 04:24:42 +02:00
|
|
|
|
|
|
|
{% if install_type == 'binary' %}
|
2015-09-04 02:15:03 -07:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
|
|
|
2015-09-27 08:10:59 +00:00
|
|
|
RUN yum -y install \
|
|
|
|
openstack-neutron \
|
|
|
|
openstack-neutron-ml2 \
|
|
|
|
openvswitch \
|
2015-08-13 04:24:42 +02:00
|
|
|
&& yum clean all
|
|
|
|
|
2015-12-30 13:13:25 +01:00
|
|
|
{% elif base_distro in ['ubuntu'] %}
|
|
|
|
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
|
|
|
neutron-plugin-ml2 \
|
|
|
|
openvswitch-switch \
|
|
|
|
neutron-server \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& mkdir -p /usr/share/neutron \
|
|
|
|
&& ln -s /etc/neutron/api-paste.ini /usr/share/neutron/api-paste.ini
|
|
|
|
|
2015-08-13 04:24:42 +02:00
|
|
|
{% endif %}
|
|
|
|
{% elif install_type == 'source' %}
|
2015-10-06 15:58:12 -07:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
|
|
|
|
|
|
RUN yum -y install \
|
|
|
|
uuid \
|
|
|
|
dnsmasq \
|
|
|
|
ipset \
|
|
|
|
openvswitch \
|
|
|
|
&& yum clean all
|
|
|
|
|
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
2015-08-22 13:40:20 +00:00
|
|
|
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
2016-01-26 19:50:43 +00:00
|
|
|
arping \
|
2015-08-22 13:40:20 +00:00
|
|
|
dnsmasq \
|
|
|
|
ipset \
|
2016-01-26 19:50:43 +00:00
|
|
|
iptables \
|
2015-08-22 13:40:20 +00:00
|
|
|
openvswitch-switch \
|
2016-01-26 19:50:43 +00:00
|
|
|
uuid-runtime \
|
2015-08-22 13:40:20 +00:00
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
{% endif %}
|
2015-08-13 04:24:42 +02:00
|
|
|
|
2015-09-02 17:36:46 +03:00
|
|
|
ADD neutron-base-archive /neutron-base-source
|
|
|
|
RUN ln -s neutron-base-source/* neutron \
|
2015-08-13 04:24:42 +02:00
|
|
|
&& useradd --user-group neutron \
|
2015-12-27 02:41:30 +00:00
|
|
|
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron \
|
2016-01-26 19:50:43 +00:00
|
|
|
&& mkdir -p /etc/neutron /usr/share/neutron /var/lib/neutron /var/log/neutron /home/neutron \
|
2015-08-28 05:24:41 +00:00
|
|
|
&& cp -r /neutron/etc/* /etc/neutron/ \
|
|
|
|
&& cp -r /neutron/etc/neutron/* /etc/neutron/ \
|
|
|
|
&& cp /neutron/etc/api-paste.ini /usr/share/neutron \
|
2015-08-13 04:24:42 +02:00
|
|
|
&& mv /etc/neutron/neutron/ /etc/neutron/plugins/ \
|
2016-01-26 19:50:43 +00:00
|
|
|
&& chown -R neutron: /etc/neutron /usr/share/neutron /var/lib/neutron /var/log/neutron /home/neutron \
|
2016-02-03 05:12:13 +00:00
|
|
|
&& 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/neutron/rootwrap.conf
|
2015-08-13 04:24:42 +02:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2016-01-26 19:50:43 +00:00
|
|
|
COPY neutron_sudoers /etc/sudoers.d/neutron_sudoers
|
|
|
|
RUN usermod -a -G kolla neutron \
|
|
|
|
&& chmod 750 /etc/sudoers.d \
|
|
|
|
&& chmod 440 /etc/sudoers.d/neutron_sudoers
|