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