[docker]: Remove obsolete dockers (#175)
docker-syncd-mlnx and docker-syncd-cavm were moved to platform directories
This commit is contained in:
parent
cb13166596
commit
61496a5959
@ -1,30 +0,0 @@
|
||||
FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
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/libsaimetadata_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/xp-tools*.deb", "deps/xpshell*.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/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/sai*.deb \
|
||||
&& dpkg_apt /deps/libsai*.deb \
|
||||
&& dpkg_apt /deps/xp-tools*.deb \
|
||||
&& dpkg_apt /deps/xpshell*.deb \
|
||||
&& dpkg_apt /deps/libsairedis_*.deb \
|
||||
&& dpkg_apt /deps/libsaimetadata_*.deb \
|
||||
&& dpkg_apt /deps/syncd_*.deb
|
||||
|
||||
RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev redis-tools
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /deps
|
||||
|
||||
ENTRYPOINT /usr/bin/start.sh \
|
||||
&& /bin/bash
|
@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export XP_ROOT=/usr/bin/
|
||||
|
||||
service rsyslog start
|
||||
|
||||
while true; do
|
||||
|
||||
# Check if redis-server starts
|
||||
|
||||
result=$(redis-cli ping)
|
||||
|
||||
if [ "$result" == "PONG" ]; then
|
||||
|
||||
redis-cli FLUSHALL
|
||||
syncd -p /etc/ssw/AS7512/profile.ini -N
|
||||
break
|
||||
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
done
|
@ -1,39 +0,0 @@
|
||||
FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY deps /deps
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||
dpkg_apt /deps/applibs_*.deb \
|
||||
&& dpkg_apt /deps/applibs-dev_*.deb \
|
||||
&& dpkg_apt /deps/sx-complib_*.deb \
|
||||
&& dpkg_apt /deps/sxd-libs_*.deb \
|
||||
&& dpkg_apt /deps/sx-scew_*.deb \
|
||||
&& dpkg_apt /deps/sx-examples_*.deb \
|
||||
&& dpkg_apt /deps/sx-gen-utils_*.deb \
|
||||
&& dpkg_apt /deps/python-sdk-api_*.deb \
|
||||
&& dpkg_apt /deps/iproute2_*.deb \
|
||||
&& dpkg_apt /deps/mft*.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 \
|
||||
&& dpkg_apt /deps/libsaimetadata_*.deb
|
||||
|
||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/syncd_*.deb
|
||||
|
||||
COPY ["start.sh", "/usr/bin/"]
|
||||
COPY ["mlnx-fw-upgrade.sh", "/usr/bin/"]
|
||||
COPY ["/deps/fw-SPC.mfa", "/etc/mlnx/"]
|
||||
|
||||
## Clean up
|
||||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||
RUN rm -rf /deps
|
||||
|
||||
ENTRYPOINT ["/bin/bash"]
|
||||
CMD ["/usr/bin/start.sh"]
|
@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
query_retry_count_max="10"
|
||||
required_fw_version="13.1200.0116"
|
||||
fw_file=/etc/mlnx/fw-SPC.mfa
|
||||
|
||||
run_or_fail() {
|
||||
$1
|
||||
if [[ $? != 0 ]]; then
|
||||
echo $1 failed
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# wait until devices will be available
|
||||
query_retry_count="0"
|
||||
mlxfwmanager --query > /dev/null
|
||||
|
||||
while [[ (${query_retry_count} -lt ${query_retry_count_max}) && ($? -ne "0") ]]; do
|
||||
sleep 1
|
||||
query_retry_count=$[${query_retry_count}+1]
|
||||
mlxfwmanager --query > /dev/null
|
||||
done
|
||||
|
||||
run_or_fail "mlxfwmanager --query" > /tmp/mlnxfwmanager-query.txt
|
||||
|
||||
# get current firmware version
|
||||
found_fw=false
|
||||
for word in `cat /tmp/mlnxfwmanager-query.txt`
|
||||
do
|
||||
if [[ ${found_fw} == true ]]; then
|
||||
fw_version=${word}
|
||||
break
|
||||
fi
|
||||
if [[ ${word} == FW ]]; then
|
||||
found_fw=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z ${fw_version} ]]; then
|
||||
echo "Could not retreive current FW version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${required_fw_version} == ${fw_version} ]]; then
|
||||
echo "Mellanox firmware is up to date."
|
||||
else
|
||||
echo "Mellanox firmware required version is ${required_fw_version}. Installing compatible version..."
|
||||
run_or_fail "mlxfwmanager -i ${fw_file} -u -f -y"
|
||||
|
||||
# exit from here so that syncd service will restart
|
||||
exit 0
|
||||
fi
|
@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
function clean_up {
|
||||
service syncd stop
|
||||
service rsyslog stop
|
||||
exit
|
||||
}
|
||||
|
||||
trap clean_up SIGTERM SIGKILL
|
||||
|
||||
# fw-upgrade will exit if firmware was actually upgraded or if some error
|
||||
# occures
|
||||
. mlnx-fw-upgrade.sh
|
||||
|
||||
# FIXME: the script cannot trap SIGTERM signal and it exits without clean_up
|
||||
# Remove rsyslogd.pid file manually so that to start the rsyslog instantly
|
||||
[ -e /var/run/rsyslogd.pid ] && rm /var/run/rsyslogd.pid
|
||||
service rsyslog start
|
||||
service syncd start
|
||||
|
||||
read
|
Loading…
Reference in New Issue
Block a user