Skip to content

Commit

Permalink
Add platform-monitor container to one image. (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrivantsiv authored and lguohan committed Feb 1, 2017
1 parent ddbda4c commit d6f0c46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions files/build_templates/pmon.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Platform monitor container
Requires=database.service
After=database.service

[Service]
User={{ sonicadmin_user }}
ExecStart=/usr/bin/{{docker_container_name}}.sh start
ExecStop=/usr/bin/{{docker_container_name}}.sh stop

[Install]
WantedBy=multi-user.target
5 changes: 5 additions & 0 deletions rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(SONIC_CONFIG_ENGINE)
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_BASE)

SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)

$(DOCKER_PLATFORM_MONITOR)_CONTAINER_NAME = pmon
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --net=host --privileged -t
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

0 comments on commit d6f0c46

Please sign in to comment.