From 06628264aeea7c4e213e30fde643a0267f620921 Mon Sep 17 00:00:00 2001 From: Shiyan Date: Mon, 3 Jul 2023 15:16:32 +0800 Subject: [PATCH 1/4] First commit --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 5534d3112a41..0cf58ec28899 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -122,6 +122,69 @@ RUN pip install allure-pytest==2.8.22 \ && pip install nnpy \ && pip install scapy==2.4.5 --upgrade --ignore-installed +RUN python3 -m pip install --upgrade pip setuptools wheel +RUN python3 -m pip install aiohttp \ + allure-pytest==2.8.22 \ + ansible==2.9.27 \ + azure-storage-blob==12.9.0 \ + azure-kusto-data \ + azure-kusto-ingest \ + defusedxml \ + celery[redis]==4.4.7 \ + cffi \ + contextlib2==0.6.0.post1 \ + cryptography==3.3.2 \ + dpkt \ + "future>=0.16.0" \ + gitpython \ + ipaddr \ + ipython==5.4.1 \ + ixnetwork-restpy==1.0.64 \ + ixnetwork-open-traffic-generator==0.0.79 \ + jinja2==2.10.1 \ + jsonpatch \ + lxml \ + markupsafe==2.0.1 \ + mock \ + msrest==0.6.21 \ + natsort \ + ncclient \ + netaddr \ + netmiko==2.4.2 \ + nnpy \ + paramiko==2.7.1 \ + passlib \ + pexpect \ + prettytable \ + psutil \ + ptf \ + pyasn1==0.4.8 \ + pycryptodome==3.9.8 \ + pyfiglet \ + pylint==1.8.1 \ + pyro4 \ + pysnmp==4.4.12 \ + pysubnettree \ + pytest-ansible \ + pytest-html \ + pytest-repeat \ + pytest-xdist==1.28.0 \ + python-dateutil \ + pytest==7.1.3 \ + redis \ + requests \ + retry \ + rpyc \ + scandir \ + scapy==2.4.5 \ + setuptools-rust \ + six \ + snappi[ixnetwork,convergence]==0.7.44 \ + tabulate \ + textfsm==1.1.2 \ + thrift==0.11.0 \ + virtualenv + # Install docker-ce-cli RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ From f0c8dfa7ba7235fde6cdb4f3fab1b406935305fe Mon Sep 17 00:00:00 2001 From: Shiyan Date: Wed, 5 Jul 2023 14:28:24 +0800 Subject: [PATCH 2/4] debug --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 126 ++++++++++++------------ 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 0cf58ec28899..c597045bfb77 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -38,6 +38,69 @@ RUN apt-get update && apt-get install -y apt-transport-https \ telnet \ vim +RUN pip3 install --upgrade pip setuptools wheel +RUN pip3 install aiohttp \ + allure-pytest==2.8.22 \ + ansible==2.9.27 \ + azure-storage-blob==12.9.0 \ + azure-kusto-data \ + azure-kusto-ingest \ + defusedxml \ + celery[redis]==4.4.7 \ + cffi \ + contextlib2==0.6.0.post1 \ + cryptography==3.3.2 \ + dpkt \ + "future>=0.16.0" \ + gitpython \ + ipaddr \ + ipython==5.4.1 \ + ixnetwork-restpy==1.0.64 \ + ixnetwork-open-traffic-generator==0.0.79 \ + jinja2==2.10.1 \ + jsonpatch \ + lxml \ + markupsafe==2.0.1 \ + mock \ + msrest==0.6.21 \ + natsort \ + ncclient \ + netaddr \ + netmiko==2.4.2 \ + nnpy \ + paramiko==2.7.1 \ + passlib \ + pexpect \ + prettytable \ + psutil \ + ptf \ + pyasn1==0.4.8 \ + pycryptodome==3.9.8 \ + pyfiglet \ + pylint==1.8.1 \ + pyro4 \ + pysnmp==4.4.12 \ + pysubnettree \ + pytest-ansible \ + pytest-html \ + pytest-repeat \ + pytest-xdist==1.28.0 \ + python-dateutil \ + pytest==7.1.3 \ + redis \ + requests \ + retry \ + rpyc \ + scandir \ + scapy==2.4.5 \ + setuptools-rust \ + six \ + snappi[ixnetwork,convergence]==0.7.44 \ + tabulate \ + textfsm==1.1.2 \ + thrift==0.11.0 \ + virtualenv + RUN curl -fsSL http://archive.ubuntu.com/ubuntu/pool/universe/s/scapy/python-scapy_2.3.3-3_all.deb \ --output python-scapy_2.3.3-3_all.deb \ && dpkg -i python-scapy_2.3.3-3_all.deb \ @@ -122,69 +185,6 @@ RUN pip install allure-pytest==2.8.22 \ && pip install nnpy \ && pip install scapy==2.4.5 --upgrade --ignore-installed -RUN python3 -m pip install --upgrade pip setuptools wheel -RUN python3 -m pip install aiohttp \ - allure-pytest==2.8.22 \ - ansible==2.9.27 \ - azure-storage-blob==12.9.0 \ - azure-kusto-data \ - azure-kusto-ingest \ - defusedxml \ - celery[redis]==4.4.7 \ - cffi \ - contextlib2==0.6.0.post1 \ - cryptography==3.3.2 \ - dpkt \ - "future>=0.16.0" \ - gitpython \ - ipaddr \ - ipython==5.4.1 \ - ixnetwork-restpy==1.0.64 \ - ixnetwork-open-traffic-generator==0.0.79 \ - jinja2==2.10.1 \ - jsonpatch \ - lxml \ - markupsafe==2.0.1 \ - mock \ - msrest==0.6.21 \ - natsort \ - ncclient \ - netaddr \ - netmiko==2.4.2 \ - nnpy \ - paramiko==2.7.1 \ - passlib \ - pexpect \ - prettytable \ - psutil \ - ptf \ - pyasn1==0.4.8 \ - pycryptodome==3.9.8 \ - pyfiglet \ - pylint==1.8.1 \ - pyro4 \ - pysnmp==4.4.12 \ - pysubnettree \ - pytest-ansible \ - pytest-html \ - pytest-repeat \ - pytest-xdist==1.28.0 \ - python-dateutil \ - pytest==7.1.3 \ - redis \ - requests \ - retry \ - rpyc \ - scandir \ - scapy==2.4.5 \ - setuptools-rust \ - six \ - snappi[ixnetwork,convergence]==0.7.44 \ - tabulate \ - textfsm==1.1.2 \ - thrift==0.11.0 \ - virtualenv - # Install docker-ce-cli RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ From 7e96b0d9ae98bc085f7ed41cb996e04a5da1e6c3 Mon Sep 17 00:00:00 2001 From: Shiyan Date: Thu, 6 Jul 2023 09:26:54 +0800 Subject: [PATCH 3/4] debug2 --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index c597045bfb77..0164281888b9 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -67,7 +67,6 @@ RUN pip3 install aiohttp \ ncclient \ netaddr \ netmiko==2.4.2 \ - nnpy \ paramiko==2.7.1 \ passlib \ pexpect \ @@ -99,7 +98,19 @@ RUN pip3 install aiohttp \ tabulate \ textfsm==1.1.2 \ thrift==0.11.0 \ - virtualenv + virtualenv \ + && wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ + && tar xvfz 1.0.0.tar.gz \ + && cd nanomsg-1.0.0 \ + && mkdir -p build \ + && cd build \ + && cmake .. \ + && make install \ + && ldconfig \ + && cd ../.. \ + && rm -fr nanomsg-1.0.0 \ + && rm -f 1.0.0.tar.gz \ + && pip3 install nnpy RUN curl -fsSL http://archive.ubuntu.com/ubuntu/pool/universe/s/scapy/python-scapy_2.3.3-3_all.deb \ --output python-scapy_2.3.3-3_all.deb \ @@ -135,6 +146,7 @@ RUN pip install allure-pytest==2.8.22 \ natsort \ netaddr \ netmiko==2.4.2 \ + nnpy \ paramiko==2.7.1 \ passlib \ pexpect \ @@ -171,18 +183,6 @@ RUN pip install allure-pytest==2.8.22 \ && 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 \ - && mkdir -p build \ - && cd build \ - && cmake .. \ - && make install \ - && ldconfig \ - && cd ../.. \ - && rm -fr nanomsg-1.0.0 \ - && rm -f 1.0.0.tar.gz \ - && pip install nnpy \ && pip install scapy==2.4.5 --upgrade --ignore-installed # Install docker-ce-cli From 712ae50e7457263afde92d24188126899c3ba029 Mon Sep 17 00:00:00 2001 From: Shiyan Date: Thu, 6 Jul 2023 10:50:55 +0800 Subject: [PATCH 4/4] upgrade nanomsg to 1.2 --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 0164281888b9..0a5e31eac415 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -99,17 +99,17 @@ RUN pip3 install aiohttp \ textfsm==1.1.2 \ thrift==0.11.0 \ virtualenv \ - && wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ - && tar xvfz 1.0.0.tar.gz \ - && cd nanomsg-1.0.0 \ + && wget https://github.com/nanomsg/nanomsg/archive/1.2.tar.gz \ + && tar xvfz 1.2.tar.gz \ + && cd nanomsg-1.2 \ && mkdir -p build \ && cd build \ && cmake .. \ && make install \ && ldconfig \ && cd ../.. \ - && rm -fr nanomsg-1.0.0 \ - && rm -f 1.0.0.tar.gz \ + && rm -fr nanomsg-1.2 \ + && rm -f 1.2.tar.gz \ && pip3 install nnpy RUN curl -fsSL http://archive.ubuntu.com/ubuntu/pool/universe/s/scapy/python-scapy_2.3.3-3_all.deb \