This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from project-arlo/brcm_poc
Brcm poc changes to include sonic-mgmt-framework docker to sonic-broadcom.bin
- Loading branch information
Showing
9 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM {{ docker_sonic_mgmt_framework_load_image }} | ||
|
||
ARG docker_container_name | ||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
|
||
#RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4 | ||
|
||
## Install redis-tools dependencies | ||
## TODO: implicitly install dependencies | ||
RUN apt-get -y install libjemalloc1 | ||
|
||
COPY \ | ||
{% for deb in docker_sonic_mgmt_framework_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -i \ | ||
{% for deb in docker_sonic_mgmt_framework_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor %} | ||
|
||
COPY ["start.sh", "rest-server.sh", "/usr/bin/"] | ||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] | ||
|
||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y | ||
RUN rm -rf /debs | ||
|
||
ENTRYPOINT ["/usr/bin/supervisord"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
REST_SERVER_ARGS=" -ui /rest_ui -port=80 -logtostderr" | ||
|
||
exec /usr/sbin/rest_server ${REST_SERVER_ARGS} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p /var/sonic | ||
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status | ||
|
||
rm -f /var/run/rsyslogd.pid | ||
|
||
supervisorctl start rsyslogd | ||
|
||
supervisorctl start rest-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[supervisord] | ||
logfile_maxbytes=1MB | ||
logfile_backups=2 | ||
nodaemon=true | ||
|
||
[program:start.sh] | ||
command=/usr/bin/start.sh | ||
priority=1 | ||
autostart=true | ||
autorestart=false | ||
stdout_logfile=syslog | ||
stderr_logfile=syslog | ||
|
||
[program:rsyslogd] | ||
command=/usr/sbin/rsyslogd -n | ||
priority=2 | ||
autostart=false | ||
autorestart=false | ||
stdout_logfile=syslog | ||
stderr_logfile=syslog | ||
|
||
[program:rest-server] | ||
command=/usr/bin/rest-server.sh | ||
priority=3 | ||
autostart=false | ||
autorestart=true | ||
stdout_logfile=syslog | ||
stderr_logfile=syslog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Management Framework container | ||
Requires=swss.service | ||
After=swss.service | ||
Before=ntp-config.service | ||
|
||
[Service] | ||
User={{ sonicadmin_user }} | ||
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start | ||
ExecStart=/usr/bin/{{docker_container_name}}.sh wait | ||
ExecStop=/usr/bin/{{docker_container_name}}.sh stop | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# docker image for mgmt-framework | ||
|
||
DOCKER_MGMT-FRAMEWORK_STEM = docker-sonic-mgmt-framework | ||
DOCKER_MGMT-FRAMEWORK = $(DOCKER_MGMT-FRAMEWORK_STEM).gz | ||
DOCKER_MGMT-FRAMEWORK_DBG = $(DOCKER_MGMT-FRAMEWORK_STEM)-$(DBG_IMAGE_MARK).gz | ||
|
||
$(DOCKER_MGMT-FRAMEWORK)_PATH = $(DOCKERS_PATH)/$(DOCKER_MGMT-FRAMEWORK_STEM) | ||
|
||
$(DOCKER_MGMT-FRAMEWORK)_DEPENDS += $(REDIS_TOOLS) $(SONIC_MGMT-FRAMEWORK) | ||
#$(DOCKER_MGMT-FRAMEWORK)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_DEPENDS) | ||
|
||
SONIC_DOCKER_IMAGES += $(DOCKER_MGMT-FRAMEWORK) | ||
$(DOCKER_MGMT-FRAMEWORK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH) | ||
#$(DOCKER_MGMT-FRAMEWORK)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_STRETCH)_DBG_IMAGE_PACKAGES) | ||
|
||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_MGMT-FRAMEWORK) | ||
SONIC_STRETCH_DOCKERS += $(DOCKER_MGMT-FRAMEWORK) | ||
|
||
$(DOCKER_MGMT-FRAMEWORK)_CONTAINER_NAME = mgmt-framework | ||
$(DOCKER_MGMT-FRAMEWORK)_RUN_OPT += --net=host --privileged -t | ||
$(DOCKER_MGMT-FRAMEWORK)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SONiC mgmt-framework package | ||
|
||
SONIC_MGMT-FRAMEWORK = sonic-mgmt-framework_1.0-01_amd64.deb | ||
$(SONIC_MGMT-FRAMEWORK)_SRC_PATH = $(SRC_PATH)/sonic-mgmt-framework | ||
SONIC_DPKG_DEBS += $(SONIC_MGMT-FRAMEWORK) |
Submodule sonic-mgmt-framework
added at
6dd912