updated to 9.0.3

This commit is contained in:
Afonso Franco 2023-09-21 18:54:08 +01:00
parent 20071eed2e
commit 56a0511f21
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys
2 changed files with 157 additions and 49 deletions

View file

@ -11,9 +11,72 @@ ENV PATH="$PATH:${VENV_PATH}/bin"
WORKDIR /opt WORKDIR /opt
# install system dependencies # install system dependencies
RUN apt-get update -y && \
apt-get install -y software-properties-common
RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu jammy universe"
RUN apt-get update -y && \ RUN apt-get update -y && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
automake \
bash \
ca-certificates \ ca-certificates \
ethtool \
gawk \
gcc \
g++ \
iproute2 \
iputils-ping \
libc-dev \
libev-dev \
libreadline-dev \
libtool \
nftables \
python3 \
python3-pip \
python3-tk \
pkg-config \
tk \
xauth \
xterm \
vim \
build-essential \
nano \
firefox \
net-tools \
rsync \
openssh-server \
openssh-client \
vsftpd \
atftpd \
atftp \
mini-httpd \
lynx \
tcpdump \
wireshark \
iperf \
iperf3 \
tshark \
openssh-sftp-server \
bind9 \
bind9-utils \
openvpn \
isc-dhcp-server \
isc-dhcp-client \
whois \
ipcalc \
socat \
hping3 \
libgtk-3-0 \
librest-0.7-0 \
libgtk-3-common \
dconf-gsettings-backend \
libsoup-gnome2.4-1 \
libsoup2.4-1 \
dconf-service \
x11-xserver-utils \
ftp \
git \ git \
sudo \ sudo \
wget \ wget \
@ -26,8 +89,8 @@ RUN apt-get update -y && \
unzip \ unzip \
uuid-dev \ uuid-dev \
iproute2 \ iproute2 \
iputils-ping \ vlc \
tcpdump && \ iputils-ping && \
apt-get autoremove -y apt-get autoremove -y
# install core # install core
@ -59,3 +122,5 @@ RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
WORKDIR /root WORKDIR /root
CMD /opt/core/venv/bin/core-daemon

137
README.md
View file

@ -1,64 +1,107 @@
# Index
- CORE
- Docker Setup
- Precompiled container image
- Build container image from source
- Adding extra packages
- Useful commands
- License
# CORE # CORE
CORE: Common Open Research Emulator CORE: Common Open Research Emulator
Copyright (c)2005-2022 the Boeing Company. Copyright (c)2005-2022 the Boeing Company.
See the LICENSE file included in this distribution. See the LICENSE file included in this distribution.
## About # Docker Setup
The Common Open Research Emulator (CORE) is a tool for emulating
networks on one or more machines. You can connect these emulated
networks to live networks. CORE consists of a GUI for drawing
topologies of lightweight virtual machines, and Python modules for
scripting network emulation.
## Quick Start Here you have 2 choices
Requires Python 3.9+. More detailed instructions and install options can be found
[here](https://coreemu.github.io/core/install.html).
### Package Install ## Precompiled container image
Grab the latest deb/rpm from [releases](https://github.com/coreemu/core/releases).
```bash
# Start container
sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged --restart unless-stopped git.olympuslab.net/afonso/core-extra:latest
```
## Build container image from source
```bash
# Clone the repo
git clone https://gitea.olympuslab.net/afonso/core-extra.git
# cd into the directory
cd core-extra
# build the docker image
sudo docker build -t core-extra .
# start container
sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged --restart unless-stopped core-extra
This will install vnoded/vcmd, system dependencies, and CORE within a python
virtual environment at `/opt/core/venv`.
```shell
sudo <yum/apt> install -y ./<package>
``` ```
Then install OSPF MDR from source: ### Adding extra packages
```shell
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git To add extra packages you must modify the Dockerfile and then compile the docker image.
cd ospf-mdr If you install it after starting the container it will, by docker nature, be reverted on the next boot of the container.
./bootstrap.sh
./configure --disable-doc --enable-user=root --enable-group=root \ # Useful commands
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
--localstatedir=/var/run/quagga I have the following functions on my fish shell
make -j$(nproc) to help me better use core
sudo make install
THIS ONLY WORKS ON FISH, MODIFY FOR BASH OR ZSH
```fish
# RUN CORE GUI
function core
xhost +local:root
sudo docker exec -it core core-gui
end
# RUN BASH INSIDE THE CONTAINER
function core-bash
sudo docker exec -it core /bin/bash
end
# LAUNCH NODE BASH ON THE HOST MACHINE
function launch-term --argument nodename
sudo docker exec -it core xterm -bg black -fg white -fa 'DejaVu Sans Mono' -fs 16 -e vcmd -c /tmp/pycore.1/$nodename -- /bin/bash
end
#TO RUN ANY OTHER COMMAND
sudo docker exec -it core COMAND_GOES_HERE
``` ```
### Script Install ## LICENSE
The following should get you up and running on Ubuntu 22.04. This would
install CORE into a python3 virtual environment and install
[OSPF MDR](https://github.com/USNavalResearchLaboratory/ospf-mdr) from source.
```shell Copyright (c) 2005-2018, the Boeing Company.
git clone https://github.com/coreemu/core.git
cd core
# install dependencies to run installation task
./setup.sh
# run the following or open a new terminal
source ~/.bashrc
# Ubuntu
inv install
# CentOS
inv install -p /usr
```
## Documentation & Support Redistribution and use in source and binary forms, with or without
We are leveraging GitHub hosted documentation and Discord for persistent modification, are permitted provided that the following conditions are met:
chat rooms. This allows for more dynamic conversations and the
capability to respond faster. Feel free to join us at the link below.
* [Documentation](https://coreemu.github.io/core/) 1. Redistributions of source code must retain the above copyright notice,
* [Discord Channel](https://discord.gg/AKd7kmP) this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.