[docker-platform-monitor] Convert ledd from polling-based to subscription-based model (#1623)

This commit is contained in:
Joe LeVeque 2018-04-20 10:42:19 -07:00 committed by GitHub
parent cde9a60c41
commit 1df7c9a993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 22 deletions

View File

@ -3,35 +3,34 @@ FROM docker-config-engine
# Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Update apt's package index files
# Update apt's cache of available packages
RUN apt-get update
# Install required packages
RUN apt-get install -y python-pip sensord fancontrol
RUN apt-get install -y python-pip libpython2.7 sensord fancontrol
{% if docker_platform_monitor_debs.strip() -%}
# Copy all locally-built Debian package dependencies
COPY{{' '}}
{%- for deb in docker_platform_monitor_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
/debs/
# Copy locally-built Debian package dependencies
{%- for deb in docker_platform_monitor_debs.split(' ') %}
COPY debs/{{ deb }} /debs/
{%- endfor %}
# Install all locally-built Debian package dependencies
# and implicitly install their dependencies
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/*.deb
{% endif %}
# Install locally-built Debian packages and implicitly install their dependencies
{%- for deb in docker_platform_monitor_debs.split(' ') %}
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
{%- endfor %}
{%- endif %}
{% if docker_platform_monitor_whls.strip() -%}
# Copy all locally-built Python wheel dependencies
COPY{{' '}}
{%- for whl in docker_platform_monitor_whls.split(' ') -%}
python-wheels/{{ whl }}{{' '}}
{%- endfor -%}
/python-wheels/
# Copy locally-built Python wheel dependencies
{%- for whl in docker_platform_monitor_whls.split(' ') %}
COPY python-wheels/{{ whl }} /python-wheels/
{%- endfor %}
# Install all locally-built Python wheel dependencies
RUN pip install /python-wheels/*.whl
# Install locally-built Python wheel dependencies
{%- for whl in docker_platform_monitor_whls.split(' ') %}
RUN pip install /python-wheels/{{ whl }}
{%- endfor %}
{% endif %}
# Clean up

View File

@ -2,7 +2,7 @@
DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz
$(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/docker-platform-monitor
$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(SONIC_LEDD)
$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) $(SONIC_LEDD)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2)
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)

@ -1 +1 @@
Subproject commit 31c007e260ba081bc73cbf467eb27cd8747c2177
Subproject commit c940a7d18ecd4dc22bbaf2aee6908045cbe24508