From 4ea631896ef386dfa7e0dfc8d91440152d84ca28 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Tue, 30 May 2017 13:04:06 -0700 Subject: [PATCH 1/6] Fix SAI submodule id --- src/SAI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SAI b/src/SAI index a6b5b3115f39..940c7b6afb1d 160000 --- a/src/SAI +++ b/src/SAI @@ -1 +1 @@ -Subproject commit a6b5b3115f39f599d39629ab9bfaeea17333d0bc +Subproject commit 940c7b6afb1db4e8504b7cdb24ccd669748dbde8 From 4cf1e7464a5c54d5351b74420d1bc0e57df64a5b Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 5 Jul 2017 16:04:08 -0700 Subject: [PATCH 2/6] Install python modules from pypi not from debian repo --- dockers/docker-ptf/Dockerfile.j2 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 59360ee4fa2e..bab1c319c3fe 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -20,11 +20,7 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' / && apt-get install -y \ openssh-server \ vim \ - python \ - python-scapy \ net-tools \ - python-setuptools \ - supervisor \ traceroute \ lsof \ tcpdump \ @@ -32,24 +28,21 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' / pkg-config \ binutils \ net-tools \ - python-pip \ build-essential \ libssl-dev \ libffi-dev \ - python-dev \ wget \ cmake \ libqt5core5a \ libqt5network5 \ less \ - ipython \ git \ iputils-ping \ hping3 \ - curl - -## Reinstall scapy by version from p4lang -RUN git clone https://github.com/p4lang/scapy-vxlan.git && cd scapy-vxlan && python setup.py install + curl \ + python \ + python-dev \ + python-scapy RUN dpkg -i \ {% for deb in docker_ptf_debs.split(' ') -%} @@ -60,6 +53,16 @@ RUN rm -rf /debs \ && apt-get -y autoclean \ && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* \ + && wget --https-only https://bootstrap.pypa.io/get-pip.py \ + && python get-pip.py \ + && pip install setuptools \ + && pip install supervisor \ + && pip install ipython==5.4.1 \ + && git clone https://github.com/p4lang/scapy-vxlan.git \ + && cd scapy-vxlan \ + && python setup.py install \ + && cd .. \ + && rm -fr scapy-vxlan \ && wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ && tar xvfz 1.0.0.tar.gz \ && cd nanomsg-1.0.0 \ @@ -77,8 +80,8 @@ RUN rm -rf /debs \ && pip install dpkt \ && pip install ipaddress \ && pip install pysubnettree \ - && pip install paramiko \ && pip install parallel-ssh \ + && pip install paramiko \ && pip install flask \ && pip install exabgp==3.4.17\ && mkdir -p /opt \ From 07ee0f7bd552ae71f745f43ca5a06b2f5dae0b85 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 5 Jul 2017 16:47:13 -0700 Subject: [PATCH 3/6] Remove get-pip and don't install parallel-ssh --- dockers/docker-ptf/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index bab1c319c3fe..54117ccbea75 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -55,6 +55,7 @@ RUN rm -rf /debs \ && rm -rf /var/lib/apt/lists/* \ && wget --https-only https://bootstrap.pypa.io/get-pip.py \ && python get-pip.py \ + && rm -f get-pip.py \ && pip install setuptools \ && pip install supervisor \ && pip install ipython==5.4.1 \ @@ -80,7 +81,6 @@ RUN rm -rf /debs \ && pip install dpkt \ && pip install ipaddress \ && pip install pysubnettree \ - && pip install parallel-ssh \ && pip install paramiko \ && pip install flask \ && pip install exabgp==3.4.17\ From 4f5795d56ede78f5617f2fddda1ecfe63773232c Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 5 Jul 2017 17:10:54 -0700 Subject: [PATCH 4/6] Use latest cffi --- dockers/docker-ptf/Dockerfile.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 54117ccbea75..8b72d25dea9e 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -75,8 +75,7 @@ RUN rm -rf /debs \ && cd ../.. \ && rm -fr nanomsg-1.0.0 \ && rm -f 1.0.0.tar.gz \ - && pip install cffi==1.7.0 \ - && pip install --upgrade cffi==1.7.0 \ + && pip install cffi \ && pip install nnpy \ && pip install dpkt \ && pip install ipaddress \ From cf8e80380745fe9a8e9e10a0c718e61b0e475d28 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 5 Jul 2017 17:19:20 -0700 Subject: [PATCH 5/6] Update comments --- dockers/docker-ptf/Dockerfile.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 8b72d25dea9e..3304ff643bb8 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -49,6 +49,7 @@ RUN dpkg -i \ debs/{{ deb }}{{' '}} {%- endfor %} +# Install all python modules from pypi. python-scapy is exception, ptf debian package requires python-scapy RUN rm -rf /debs \ && apt-get -y autoclean \ && apt-get -y autoremove \ @@ -92,8 +93,7 @@ RUN mkdir /var/run/sshd \ && echo 'root:root' | chpasswd \ && sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config \ && sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \ - && sed -i '$aUseDNS no' /etc/ssh/sshd_config \ - && mkdir /root/deps + && sed -i '$aUseDNS no' /etc/ssh/sshd_config COPY ["supervisord.conf", "sshd.conf", "ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] From 891ceef849c951e2a622fcf0ec872741287562f2 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 19 Jul 2017 18:11:48 -0700 Subject: [PATCH 6/6] Install yaml python module in docker-ptf container --- dockers/docker-ptf/Dockerfile.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 3304ff643bb8..899bba45c47f 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -84,6 +84,7 @@ RUN rm -rf /debs \ && pip install paramiko \ && pip install flask \ && pip install exabgp==3.4.17\ + && pip install pyaml \ && mkdir -p /opt \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py