Merge pull request #790 from b-ehlers/rm_docker_iou

Remove docker/iou and enable docker/xeyes
This commit is contained in:
Jeremy Grossmann 2023-07-07 00:19:49 +10:00 committed by GitHub
commit fafe5e06a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3 additions and 136 deletions

View File

@ -18,6 +18,9 @@ ovs-snmp ovs-snmp --platform=linux/arm64
pyats pyats pyats pyats
ubuntu:focal ubuntu ubuntu:focal ubuntu
# Tests
xeyes xeyes
# #
# The following images are not used by any appliance # The following images are not used by any appliance
# #
@ -31,7 +34,3 @@ ubuntu:focal ubuntu
# GNS3 Developers # GNS3 Developers
#dhcp dhcp #dhcp dhcp
#snmpsimulator snmpsimulator #snmpsimulator snmpsimulator
# Tests
#iou iou
#xeyes xeyes

View File

@ -1,4 +0,0 @@
iou.bin
iourc.txt
NETMAP
iouyap.ini

View File

@ -1,31 +0,0 @@
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install python3
RUN apt-get install -y lib32z1
RUN apt-get install -y libssl1.0.0
RUN apt-get install -y 'libssl1.0.0:i386'
RUN ln -s /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/i386-linux-gnu/libcrypto.so.4
VOLUME /data
ADD iouyap /bin
RUN chmod 700 /bin/iouyap
RUN mkdir /images
ADD iourc.txt /images
ADD iou.bin /images
RUN chmod 700 /images/iou.bin
ADD boot.sh /
ADD netmap.py /
ENV HOSTNAME=gns3vm
CMD /bin/bash ./boot.sh

View File

@ -1,19 +0,0 @@
Docker IOU
----------
**Warning not working for the moment**
This repository is a trial to make IOU work inside a docker container.
If it's work with GNS3 1.5 docker support it can allow running IOU
on any computer supporting Docker without dependencies issues.
Building the container
#######################
* Put in the directory an IOU image and name it iou.bin
* Put in the directory a valid iourc.txt file
.. code:: bash
docker build -t iou

View File

@ -1,14 +0,0 @@
#!/bin/bash
export IOURC=/images/iourc.txt
dd if=/dev/zero bs=4 count=1 of=/etc/hostid
cd /data
python3 /netmap.py
/bin/iouyap 513 &
/images/iou.bin 1 || /bin/bash -i

Binary file not shown.

View File

@ -1,64 +0,0 @@
#!/usr/bin/env python
#
# Copyright (C) 2016 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import configparser
bays = 16
units = 4
ethernet_adapters = 0
with open("/proc/net/dev") as f:
for line in f.readlines():
if "eth" in line:
ethernet_adapters += 1
with open("NETMAP", "w", encoding="utf-8") as f:
ethernet_id = 0
for bay in range(0, bays):
for unit in range(0, units):
if ethernet_id >= ethernet_adapters:
break
f.write("{iouyap_id}:{bay}/{unit}{iou_id:>5d}:{bay}/{unit}\n".format(iouyap_id=str(1 + 512),
bay=bay,
unit=unit,
iou_id=1))
ethernet_id += 1
iouyap_ini = "iouyap.ini"
config = configparser.ConfigParser()
config["default"] = {"netmap": "NETMAP",
"base_port": "49000"}
ethernet_id = 0
for bay_id in range(0, bays):
for unit_id in range(0, units):
if ethernet_id >= ethernet_adapters:
break
connection = {"eth_dev": "eth{ethernet_id}".format(ethernet_id=ethernet_id)}
ethernet_id += 1
interface = "{iouyap_id}:{bay}/{unit}".format(iouyap_id=str(1 + 512), bay=bay_id, unit=unit_id)
config[interface] = connection
unit_id += 1
bay_id += 1
with open(iouyap_ini, "w", encoding="utf-8") as config_file:
config.write(config_file)