mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-12-01 21:53:42 +00:00
[docker-platform-monitor] Convert ledd from polling-based to subscription-based model (#1623)
This commit is contained in:
@@ -3,35 +3,34 @@ FROM docker-config-engine
|
|||||||
# Make apt-get non-interactive
|
# Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# Update apt's package index files
|
# Update apt's cache of available packages
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
# Install required packages
|
# 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() -%}
|
{% if docker_platform_monitor_debs.strip() -%}
|
||||||
# Copy all locally-built Debian package dependencies
|
# Copy locally-built Debian package dependencies
|
||||||
COPY{{' '}}
|
{%- for deb in docker_platform_monitor_debs.split(' ') %}
|
||||||
{%- for deb in docker_platform_monitor_debs.split(' ') -%}
|
COPY debs/{{ deb }} /debs/
|
||||||
debs/{{ deb }}{{' '}}
|
{%- endfor %}
|
||||||
{%- endfor -%}
|
|
||||||
/debs/
|
|
||||||
|
|
||||||
# Install all locally-built Debian package dependencies
|
# Install locally-built Debian packages and implicitly install their dependencies
|
||||||
# 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
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
||||||
{% endif %}
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{% if docker_platform_monitor_whls.strip() -%}
|
{% if docker_platform_monitor_whls.strip() -%}
|
||||||
# Copy all locally-built Python wheel dependencies
|
# Copy locally-built Python wheel dependencies
|
||||||
COPY{{' '}}
|
{%- for whl in docker_platform_monitor_whls.split(' ') %}
|
||||||
{%- for whl in docker_platform_monitor_whls.split(' ') -%}
|
COPY python-wheels/{{ whl }} /python-wheels/
|
||||||
python-wheels/{{ whl }}{{' '}}
|
{%- endfor %}
|
||||||
{%- endfor -%}
|
|
||||||
/python-wheels/
|
|
||||||
|
|
||||||
# Install all locally-built Python wheel dependencies
|
# Install locally-built Python wheel dependencies
|
||||||
RUN pip install /python-wheels/*.whl
|
{%- for whl in docker_platform_monitor_whls.split(' ') %}
|
||||||
|
RUN pip install /python-wheels/{{ whl }}
|
||||||
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz
|
DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz
|
||||||
$(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/docker-platform-monitor
|
$(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 += $(SONIC_PLATFORM_COMMON_PY2)
|
||||||
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2)
|
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2)
|
||||||
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
|
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE)
|
||||||
|
|||||||
Submodule src/sonic-platform-daemons updated: 31c007e260...c940a7d18e
Reference in New Issue
Block a user