Updating docker-orchagent/syncd Dockerfile and start.sh (#9)
This commit is contained in:
parent
f19d445d4f
commit
623fdbf7f6
@ -2,16 +2,18 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "/deps/"]
|
||||
COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/swss_*.deb", "/deps/"]
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libhiredis0.13*.deb
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libswsscommon_*.deb
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libsairedis_*.deb
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||
dpkg_apt /deps/libhiredis0.13*.deb \
|
||||
&& dpkg_apt /deps/libnl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
||||
&& dpkg_apt /deps/libsairedis_*.deb \
|
||||
&& dpkg_apt /deps/swss_*.deb
|
||||
|
||||
RUN apt-get install -f -y ifupdown bridge-utils
|
||||
|
||||
## Copy executable binaries
|
||||
COPY ["deps/orchagent","deps/swssconfig","deps/portsyncd","deps/intfsyncd","deps/neighsyncd","/usr/bin/"]
|
||||
RUN apt-get install -f -y ifupdown bridge-utils redis-tools
|
||||
|
||||
COPY start.sh /usr/bin/start.sh
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
function start_app {
|
||||
orchagent $ORCHAGENT_ARGS &
|
||||
portsyncd $PORTSYNCD_ARGS &
|
||||
intfsyncd &
|
||||
neighsyncd &
|
||||
swssconfig &
|
||||
}
|
||||
|
||||
function clean_up {
|
||||
kill -9 $ORCHAGENT_PID
|
||||
kill -9 $PORTSYNCD_PID
|
||||
kill -9 $INTFSYNCD_PID
|
||||
kill -9 $NEIGHSYNCD_PID
|
||||
pkill -9 orchagent
|
||||
pkill -9 portsyncd
|
||||
pkill -9 intfsyncd
|
||||
pkill -9 neighsyncd
|
||||
service rsyslog stop
|
||||
exit
|
||||
}
|
||||
@ -27,16 +35,12 @@ elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then
|
||||
fi
|
||||
|
||||
service rsyslog start
|
||||
orchagent $ORCHAGENT_ARGS &
|
||||
ORCHAGENT_PID=$!
|
||||
sleep 5
|
||||
portsyncd $PORTSYNCD_ARGS &
|
||||
PORTSYNCD_PID=$!
|
||||
sleep 5
|
||||
intfsyncd &
|
||||
INTFSYNCD_PID=$!
|
||||
sleep 5
|
||||
neighsyncd &
|
||||
NEIGHSYNCD_PID=$!
|
||||
|
||||
read
|
||||
while true; do
|
||||
# Check if syncd starts
|
||||
result=`echo -en "SELECT 1\nHLEN HIDDEN" | redis-cli | sed -n 2p`
|
||||
if [ "$result" != "0" ]; then
|
||||
start_app
|
||||
read
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
@ -17,9 +17,12 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
|
||||
&& dpkg_apt /deps/iproute2_*.deb \
|
||||
&& dpkg_apt /deps/mft*.deb \
|
||||
|
||||
&& dpkg_apt /deps/libhiredis0.13*.deb \
|
||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
||||
&& dpkg_apt /deps/mlnx-sai_*.deb \
|
||||
&& dpkg_apt /deps/libhiredis0.13*.deb \
|
||||
&& dpkg_apt /deps/libnl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
||||
&& dpkg_apt /deps/mlnx-sai_*.deb \
|
||||
&& dpkg_apt /deps/libsairedis_*.deb
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/syncd_*.deb
|
||||
|
@ -2,14 +2,17 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libopennsl_*.deb", "deps/libsaibcm_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "/deps/"]
|
||||
COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libopennsl_*.deb", "deps/libsaibcm_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "/deps/"]
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||
dpkg_apt /deps/libhiredis0.13*.deb \
|
||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
||||
&& dpkg_apt /deps/libopennsl_*.deb \
|
||||
&& dpkg_apt /deps/libsaibcm_*.deb \
|
||||
&& dpkg_apt /deps/libsairedis_*.deb \
|
||||
dpkg_apt /deps/libhiredis0.13*.deb \
|
||||
&& dpkg_apt /deps/libnl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
|
||||
&& dpkg_apt /deps/libswsscommon_*.deb \
|
||||
&& dpkg_apt /deps/libopennsl_*.deb \
|
||||
&& dpkg_apt /deps/libsaibcm_*.deb \
|
||||
&& dpkg_apt /deps/libsairedis_*.deb \
|
||||
&& dpkg_apt /deps/syncd_*.deb
|
||||
|
||||
## TODO: add kmod into Depends
|
||||
|
Loading…
Reference in New Issue
Block a user