Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cavm saiserver #137

Merged
merged 1 commit into from
Mar 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions dockers/docker-saiserver-cavm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

FROM docker-base

RUN apt-get update \
&& apt-get install -y libsensors4-dev \
python \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python is installed in docker-base

python-dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why dev package is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in old case will need by thrift as far as I remember :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ dpkg --info target/debs/libthrift-0.9.3_0.9.3-2_amd64.deb                                                                                                      
 new debian package, version 2.0.
 size 258366 bytes: control archive=1205 bytes.
     750 bytes,    18 lines      control              
     630 bytes,     8 lines      md5sums              
     135 bytes,     7 lines   *  postinst             #!/bin/sh
     132 bytes,     7 lines   *  postrm               #!/bin/sh
     190 bytes,     4 lines      shlibs               
 Package: libthrift-0.9.3
 Source: thrift
 Version: 0.9.3-2
 Architecture: amd64
 Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
 Installed-Size: 997
 Depends: libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.0.2), libqt5network5 (>= 5.0.2), libssl1.0.0 (>= 1.0.1), libstdc++6 (>= 4.9)

It doesn't. I think you can try without all those three packages


COPY deps /root/deps

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dpkg_apt is not used anymore
Please see this example on how to use SED_DPKG and this example on how to integrate a docker image into build system

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ths, just tested in old version.

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"]
33 changes: 33 additions & 0 deletions dockers/docker-saiserver-cavm/portmap.ini
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions dockers/docker-saiserver-cavm/profile.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#SKU_128X10
mode=0

hwId=as7512
11 changes: 11 additions & 0 deletions dockers/docker-saiserver-cavm/start.sh
Original file line number Diff line number Diff line change
@@ -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