diff --git a/dockers/docker-saiserver-cavm/Dockerfile b/dockers/docker-saiserver-cavm/Dockerfile new file mode 100644 index 0000000000..2ee6b8ff38 --- /dev/null +++ b/dockers/docker-saiserver-cavm/Dockerfile @@ -0,0 +1,30 @@ + +FROM docker-base + +RUN apt-get update \ + && apt-get install -y libsensors4-dev \ + python \ + python-dev + +COPY deps /root/deps + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ + dpkg_apt /root/deps/xp-tools.deb \ + && dpkg_apt /root/deps/libsai.deb \ + && dpkg_apt /root/deps/sai.deb \ + && dpkg_apt /root/deps/libthrift-0.9.3_*.deb \ + && dpkg_apt /root/deps/libnl-3-200_*.deb \ + && dpkg_apt /root/deps/libnl-genl-3-200_*.deb \ + && dpkg_apt /root/deps/libnl-route-3-200_*.deb + + +COPY ["deps/saiserver", "start.sh", "/usr/bin/"] + +COPY ["portmap.ini", "profile.ini", "/etc/sai/"] + +## 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"] diff --git a/dockers/docker-saiserver-cavm/portmap.ini b/dockers/docker-saiserver-cavm/portmap.ini new file mode 100644 index 0000000000..c35776dcfc --- /dev/null +++ b/dockers/docker-saiserver-cavm/portmap.ini @@ -0,0 +1,33 @@ +# alias lanes +Ethernet0 16,17,18,19 +Ethernet4 20,21,22,23 +Ethernet8 24,25,26,27 +Ethernet12 28,29,30,31 +Ethernet16 32,33,34,35 +Ethernet20 36,37,38,39 +Ethernet24 40,41,42,43 +Ethernet28 44,45,46,47 +Ethernet32 0,1,2,3 +Ethernet36 4,5,6,7 +Ethernet40 8,9,10,11 +Ethernet44 12,13,14,15 +Ethernet48 48,49,50,51 +Ethernet52 52,53,54,55 +Ethernet56 56,57,58,59 +Ethernet60 60,61,62,63 +Ethernet64 127,126,125,124 +Ethernet68 123,122,121,120 +Ethernet72 115,114,113,112 +Ethernet76 119,118,117,116 +Ethernet80 79,78,77,76 +Ethernet84 75,74,73,72 +Ethernet88 64,65,66,67 +Ethernet92 71,70,68,69 +Ethernet96 111,110,109,108 +Ethernet100 107,106,105,104 +Ethernet104 103,102,101,100 +Ethernet108 99,98,97,96 +Ethernet112 95,94,93,92 +Ethernet116 91,90,89,88 +Ethernet120 87,86,85,84 +Ethernet124 83,82,81,80 diff --git a/dockers/docker-saiserver-cavm/profile.ini b/dockers/docker-saiserver-cavm/profile.ini new file mode 100644 index 0000000000..2b85ae77eb --- /dev/null +++ b/dockers/docker-saiserver-cavm/profile.ini @@ -0,0 +1,4 @@ +#SKU_128X10 +mode=0 + +hwId=as7512 diff --git a/dockers/docker-saiserver-cavm/start.sh b/dockers/docker-saiserver-cavm/start.sh new file mode 100755 index 0000000000..8d683c0a01 --- /dev/null +++ b/dockers/docker-saiserver-cavm/start.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +function clean_up { + service rsyslog stop +} + +trap clean_up SIGTERM SIGKILL + +service rsyslog start + +/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini