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 ptf docker with saithrift installed #54

Closed
wants to merge 3 commits into from
Closed
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
12 changes: 12 additions & 0 deletions dockers/docker-ptf-saithrift/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker-ptf

RUN apt-get update

COPY ["deps/saithrift-0.9.tar.gz", "/deps/"]
COPY ["*.ini", "/etc/ptf/"]
COPY ["deps/SAI/test/saithrift/tests/*", "/usr/share/ptf-tests/"]

RUN tar xzf /deps/saithrift-0.9.tar.gz -C /usr/share/; \
cd usr/share/saithrift-0.9; \
python setup.py install; \
rm -rf /deps
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggest to put all these into docker-ptf since there are the same for different platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should keep them in an independent docker though the dockerfile itself is not platform-specific. As else we will introduce a dependency of saithrift package into docker-ptf.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am trying to limit the number of docker types we have to manage.

33 changes: 33 additions & 0 deletions dockers/docker-ptf-saithrift/brcm_interface_to_front_map.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ptf host interface @ switch front port name
Copy link
Collaborator

Choose a reason for hiding this comment

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

move to docker-ptf

0@Ethernet0
1@Ethernet4
2@Ethernet8
3@Ethernet12
4@Ethernet16
5@Ethernet20
6@Ethernet24
7@Ethernet28
8@Ethernet32
9@Ethernet36
10@Ethernet40
11@Ethernet44
12@Ethernet48
13@Ethernet52
14@Ethernet56
15@Ethernet60
16@Ethernet64
17@Ethernet68
18@Ethernet72
19@Ethernet76
20@Ethernet80
21@Ethernet84
22@Ethernet88
23@Ethernet92
24@Ethernet96
25@Ethernet100
26@Ethernet104
27@Ethernet108
28@Ethernet112
29@Ethernet116
30@Ethernet120
31@Ethernet124
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ptf host interface @ switch front port name
Copy link
Collaborator

Choose a reason for hiding this comment

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

move to docker-ptf

0@Ethernet1
1@Ethernet2
2@Ethernet3
3@Ethernet4
4@Ethernet5
5@Ethernet6
6@Ethernet7
7@Ethernet8
8@Ethernet9
9@Ethernet10
10@Ethernet11
11@Ethernet12
12@Ethernet13
13@Ethernet14
14@Ethernet15
15@Ethernet16
16@Ethernet17
17@Ethernet18
18@Ethernet19
19@Ethernet20
20@Ethernet21
21@Ethernet22
22@Ethernet23
23@Ethernet24
24@Ethernet25
25@Ethernet26
26@Ethernet27
27@Ethernet28
28@Ethernet29
29@Ethernet30
30@Ethernet31
31@Ethernet32
2 changes: 1 addition & 1 deletion dockers/docker-syncd-mlnx-rpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN apt-get update \
python-dev \
wget \
cmake \
supervisor \
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
Expand Down Expand Up @@ -44,5 +45,4 @@ COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf

ENTRYPOINT service rsyslog start \
&& service syncd start \
Copy link
Collaborator

Choose a reason for hiding this comment

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

why remove this one?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lguohan This is not in this pull request. It is a commit aed2ab5 pushed by @pavel-shirshov.

Copy link
Collaborator

Choose a reason for hiding this comment

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

so the PR is not based on the latest master. better to generate PR based on latest master.

&& while [ "x$( ifconfig Ethernet12 | grep RUNNING )" = 'x' ] ; do sleep 1 ; done \
&& /usr/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-syncd-rpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN apt-get update \
python-dev \
wget \
cmake \
supervisor \
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
Expand Down Expand Up @@ -44,5 +45,4 @@ COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf

ENTRYPOINT service rsyslog start \
&& service syncd start \
&& while [ "x$( ifconfig Ethernet12 | grep RUNNING )" = 'x' ] ; do sleep 1 ; done \
&& /usr/bin/supervisord