Fix kuryr docker images
Kuryr need ovs and bridge packages to create local bridges and ports for containers. Creates kuryr user and adds permissions Remove useless bootstrap tasks Closes-Bug: #1697475 Change-Id: I4c08a21df263fdefe1fe991cb7ad41cfee65019d
This commit is contained in:
parent
a3ab3f2557
commit
e759d4d539
@ -5,6 +5,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{{ macros.configure_user(name='kuryr') }}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
@ -22,8 +24,9 @@ ADD kuryr-base-archive /kuryr-base-source
|
||||
# Otherwise, it will be failed.
|
||||
RUN ln -s kuryr-base-source/* kuryr-base \
|
||||
&& sed -i 's|^kuryr-lib===.*$||g' requirements/upper-constraints.txt \
|
||||
&& {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }}
|
||||
|
||||
&& {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }} \
|
||||
&& mkdir -p /etc/kuryr \
|
||||
&& chown -R kuryr: /etc/kuryr
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
KURYR_LOG_DIR=/var/log/kolla/kuryr
|
||||
KURYR_DOCKER_PLUGINS_DIR=/usr/lib/docker/plugins/kuryr
|
||||
|
||||
if [[ ! -d "${KURYR_LOG_DIR}" ]]; then
|
||||
mkdir -p ${KURYR_LOG_DIR}
|
||||
@ -9,7 +10,6 @@ if [[ $(stat -c %a ${KURYR_LOG_DIR}) != "755" ]]; then
|
||||
chmod 755 ${KURYR_LOG_DIR}
|
||||
fi
|
||||
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
mkdir -p /usr/lib/docker/plugins/kuryr
|
||||
exit 0
|
||||
if [[ ! -d "${KURYR_DOCKER_PLUGINS_DIR}" ]]; then
|
||||
mkdir -p ${KURYR_DOCKER_PLUGINS_DIR}
|
||||
fi
|
||||
|
@ -11,6 +11,22 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set kuryr_libnetwork_packages = [
|
||||
'bridge-utils',
|
||||
'openvswitch'
|
||||
] %}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
{% set kuryr_libnetwork_packages = [
|
||||
'bridge-utils',
|
||||
'openvswitch-switch'
|
||||
] %}
|
||||
|
||||
{% endif %}
|
||||
{{ macros.install_packages(kuryr_libnetwork_packages | customizable("packages")) }}
|
||||
|
||||
ADD kuryr-libnetwork-archive /kuryr-libnetwork-source
|
||||
|
||||
|
@ -883,6 +883,10 @@ USERS = {
|
||||
'skydive-user': {
|
||||
'uid': 42468,
|
||||
'gid': 42468,
|
||||
},
|
||||
'kuryr-user': {
|
||||
'uid': 42469,
|
||||
'gid': 42469,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user