diff --git a/dockerfiles/Dockerfile.rocky b/dockerfiles/Dockerfile.rocky index 0081ae6a..f9c4c073 100644 --- a/dockerfiles/Dockerfile.rocky +++ b/dockerfiles/Dockerfile.rocky @@ -64,11 +64,12 @@ RUN yum update -y && \ # install core WORKDIR /opt -ARG PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/core_9.0.3_x86_64.rpm +CORE_PACKAGE=core_9.0.3_x86_64.rpm +ARG PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/${CORE_PACKAGE} RUN yum update -y && \ wget -q ${PACKAGE_URL} && \ - PYTHON=python3.9 yum install -y ./core_*.rpm && \ - rm -f core_*.rpm && \ + PYTHON=python3.9 yum install -y ./${CORE_PACKAGE} && \ + rm -f ${CORE_PACKAGE} && \ yum autoremove -y && \ yum clean all diff --git a/docs/devguide.md b/docs/devguide.md index c2b37717..974efe41 100644 --- a/docs/devguide.md +++ b/docs/devguide.md @@ -17,29 +17,53 @@ daemon. Here is a brief description of the source directories. To setup CORE for develop we will leverage to automated install script. -## Clone CORE Repo +## Install the Development Environment -```shell +The current recommended development environment is Ubuntu 22.04. This section +covers a complete example for installing CORE on a clean install. It will help +setup CORE in development mode, OSPF MDR, and EMANE. + +``` shell +# install system packages +sudo apt-get update -y +sudo apt-get install -y ca-certificates git sudo wget tzdata libpcap-dev libpcre3-dev \ + libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev iproute2 iputils-ping \ + tcpdump + +# install core cd ~/Documents -git clone https://github.com/coreemu/core.git +git clone https://github.com/coreemu/core cd core -git checkout develop -``` +./setup.sh +source ~/.bashrc +inv install -d -## Install the Development Environment - -This command will automatically install system dependencies, clone and build OSPF-MDR, -build CORE, setup the CORE poetry environment, and install pre-commit hooks. You can -refer to the [install docs](install.md) for issues related to different distributions. +# install emane +cd ~/Documents +wget https://adjacentlink.com/downloads/emane/emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz +tar xf emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz +cd emane-1.5.1-release-1/debs/ubuntu-22_04/amd64 +sudo apt-get install -y ./openstatistic*.deb ./emane*.deb ./python3-emane_*.deb -```shell -./install -d +# install emane python bindings +cd ~/Documents +wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip +mkdir protoc +unzip protoc-3.19.6-linux-x86_64.zip -d protoc +git clone https://github.com/adjacentlink/emane.git +cd emane +git checkout v1.5.1 +./autogen.sh +./configure --prefix=/usr +cd src/python +PATH=~/Documents/protoc/bin:$PATH make +sudo /opt/core/venv/bin/python -m pip install . ``` ### pre-commit pre-commit hooks help automate running tools to check modified code. Every time a commit is made -python utilities will be ran to check validity of code, potentially failing and backing out the commit. +python utilities will be run to check validity of code, potentially failing and backing out the commit. These changes are currently mandated as part of the current CI, so add the changes and commit again. ## Running CORE diff --git a/docs/install.md b/docs/install.md index 482ed54d..6376a9fe 100644 --- a/docs/install.md +++ b/docs/install.md @@ -104,7 +104,7 @@ CORE and related utilities on fresh installations. Otherwise, a breakdown for in different components and the options available are detailed below. * [Ubuntu 22.04](install_ubuntu.md) -* [CentOS 7](install_centos.md) +* [Rocky Linux 8](install_rocky.md) ## Package Based Install diff --git a/docs/install_centos.md b/docs/install_centos.md deleted file mode 100644 index b9fb9ac4..00000000 --- a/docs/install_centos.md +++ /dev/null @@ -1,131 +0,0 @@ -# Install CentOS - -## Overview - -Below is a detailed path for installing CORE and related tooling on a fresh -CentOS 7 install. Both of the examples below will install CORE into its -own virtual environment located at **/opt/core/venv**. Both examples below -also assume using **~/Documents** as the working directory. - -## Script Install - -This section covers step by step commands that can be used to install CORE using -the script based installation path. - -``` shell -# install system packages -sudo yum -y update -sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel \ - libxml2-devel protobuf-devel unzip uuid-devel tcpdump make epel-release -sudo yum-builddep -y python3 - -# install python3.9 -cd ~/Documents -wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz -tar xf Python-3.9.15.tgz -cd Python-3.9.15 -./configure --enable-optimizations --with-ensurepip=install -sudo make -j$(nproc) altinstall -python3.9 -m pip install --upgrade pip - -# install core -cd ~/Documents -git clone https://github.com/coreemu/core -cd core -NO_SYSTEM=1 PYTHON=/usr/local/bin/python3.9 ./setup.sh -source ~/.bashrc -PYTHON=python3.9 inv install -p /usr --no-python - -# install emane -cd ~/Documents -wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz -tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz -cd emane-1.3.3-release-1/rpms/el7/x86_64 -sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm - -# install emane python bindings into CORE virtual environment -cd ~/Documents -wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip -mkdir protoc -unzip protoc-3.19.6-linux-x86_64.zip -d protoc -git clone https://github.com/adjacentlink/emane.git -cd emane -git checkout v1.3.3 -./autogen.sh -PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr -cd src/python -PATH=~/Documents/protoc/bin:$PATH make -sudo /opt/core/venv/bin/python -m pip install . -``` - -## Package Install - -This section covers step by step commands that can be used to install CORE using -the package based installation path. This will require downloading a package from the release -page, to use during the install CORE step below. - -``` shell -# install system packages -sudo yum -y update -sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel libxml2-devel \ - protobuf-devel unzip uuid-devel tcpdump automake gawk libreadline-devel libtool \ - pkg-config make -sudo yum-builddep -y python3 - -# install python3.9 -cd ~/Documents -wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz -tar xf Python-3.9.15.tgz -cd Python-3.9.15 -./configure --enable-optimizations --with-ensurepip=install -sudo make -j$(nproc) altinstall -python3.9 -m pip install --upgrade pip - -# install core -cd ~/Documents -wget https://github.com/coreemu/core/releases/latest/download/core__x86_64.rpm -sudo PYTHON=python3.9 yum install -y ./core_*.rpm - -# install ospf mdr -cd ~/Documents -git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git -cd ospf-mdr -./bootstrap.sh -./configure --disable-doc --enable-user=root --enable-group=root \ - --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \ - --localstatedir=/var/run/quagga -make -j$(nproc) -sudo make install - -# install emane -cd ~/Documents -wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz -tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz -cd emane-1.3.3-release-1/rpms/el7/x86_64 -sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm - -# install emane python bindings into CORE virtual environment -cd ~/Documents -wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip -mkdir protoc -unzip protoc-3.19.6-linux-x86_64.zip -d protoc -git clone https://github.com/adjacentlink/emane.git -cd emane -git checkout v1.3.3 -./autogen.sh -PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr -cd src/python -PATH=~/Documents/protoc/bin:$PATH make -sudo /opt/core/venv/bin/python -m pip install . -``` - -## Running CORE - -This install will place CORE within a virtual environment, symlinks to CORE scripts will be added to **/usr/bin**. - -```shell -# in one terminal run the server daemon -sudo core-daemon -# in another terminal run the gui client -core-gui -``` diff --git a/docs/install_docker.md b/docs/install_docker.md index e183fd7f..cdf38cbe 100644 --- a/docs/install_docker.md +++ b/docs/install_docker.md @@ -1,4 +1,6 @@ -# Overview +# Install Docker + +## Overview CORE can be installed into and ran from a Docker container. This section will cover how you can build and run CORE from a Docker based image. diff --git a/docs/install_rocky.md b/docs/install_rocky.md new file mode 100644 index 00000000..5ebaad81 --- /dev/null +++ b/docs/install_rocky.md @@ -0,0 +1,93 @@ +# Install Rocky + +## Overview + +This helps provide an example for installation into a RHEL 8 like +environment. Below is a detailed example for installing CORE and related tooling on a fresh +Rocky Linux 8 install. Both of the examples below will install CORE into its +own virtual environment located at **/opt/core/venv**. Both examples below +also assume using **~/Documents** as the working directory. + +## Install + +This section covers step by step commands that can be used to install CORE using +the package based installation path. This will require downloading a package from the +[release page](https://github.com/coreemu/core/releases), to use during the install CORE step below. + +``` shell +# install system packages +sudo yum -y update +sudo yum install -y \ + xterm \ + wget \ + tcpdump \ + python39 \ + python39-tkinter \ + iproute-tc + +# install ospf mdr +cd ~/Documents +sudo yum install -y \ + automake \ + gcc-c++ \ + libtool \ + make \ + pkg-config \ + readline-devel \ + git +git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git +cd ospf-mdr +./bootstrap.sh +./configure --disable-doc --enable-user=root --enable-group=root \ + --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \ + --localstatedir=/var/run/quagga +make -j$(nproc) +sudo make install + +# install emane +cd ~/Documents +EMANE_VERSION=1.5.1 +EMANE_RELEASE=emane-${EMANE_VERSION}-release-1 +EMANE_PACKAGE=${EMANE_RELEASE}.el8.x86_64.tar.gz +wget -q https://adjacentlink.com/downloads/emane/${EMANE_PACKAGE} +tar xf ${EMANE_PACKAGE} +cd ${EMANE_RELEASE}/rpms/el8/x86_64 +rm emane-spectrum-tools-*.rpm emane-model-lte*.rpm +rm *devel*.rpm +sudo yum install -y ./emane*.rpm ./python3-emane-${EMANE_VERSION}-1.el8.noarch.rpm + +# install core +WORKDIR /opt +PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/core_9.0.3_x86_64.rpm +RUN yum update -y && \ + wget -q ${PACKAGE_URL} && \ + PYTHON=python3.9 yum install -y ./core_*.rpm && \ + rm -f core_*.rpm && \ + yum autoremove -y && \ + yum clean all + +# install emane python bindings into CORE virtual environment +cd ~/Documents +wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip +mkdir protoc +unzip protoc-3.19.6-linux-x86_64.zip -d protoc +git clone https://github.com/adjacentlink/emane.git +cd emane +git checkout v${EMANE_VERSION} +./autogen.sh +PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr +cd src/python +PATH=~/Documents/protoc/bin:$PATH make +sudo /opt/core/venv/bin/python -m pip install . +``` + +## Running CORE + +This install will place CORE within a virtual environment, symlinks to CORE scripts will be added to **/usr/bin**. + +```shell +# in one terminal run the server daemon +sudo core-daemon +# in another terminal run the gui client +core-gui +``` diff --git a/docs/install_ubuntu.md b/docs/install_ubuntu.md index b69bdda6..21735e25 100644 --- a/docs/install_ubuntu.md +++ b/docs/install_ubuntu.md @@ -7,69 +7,38 @@ Ubuntu 22.04 installation. Both of the examples below will install CORE into its own virtual environment located at **/opt/core/venv**. Both examples below also assume using **~/Documents** as the working directory. -## Script Install +## Install This section covers step by step commands that can be used to install CORE using -the script based installation path. +the package based installation path. This will require downloading a package from the +[release page](https://github.com/coreemu/core/releases), to use during the install CORE step below. ``` shell # install system packages sudo apt-get update -y -sudo apt-get install -y ca-certificates git sudo wget tzdata libpcap-dev libpcre3-dev \ - libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev iproute2 iputils-ping \ +sudo apt-get install -y \ + ca-certificates \ + xterm \ + psmisc \ + python3 \ + python3-tk \ + python3-pip \ + python3-venv \ + wget \ + iproute2 \ + iputils-ping \ tcpdump -# install core -cd ~/Documents -git clone https://github.com/coreemu/core -cd core -./setup.sh -source ~/.bashrc -inv install - -# install emane -cd ~/Documents -wget https://adjacentlink.com/downloads/emane/emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz -tar xf emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz -cd emane-1.5.1-release-1/debs/ubuntu-22_04/amd64 -apt-get install -y ./openstatistic*.deb ./emane*.deb ./python3-emane_*.deb - -# install emane python bindings -cd ~/Documents -wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip -mkdir protoc -unzip protoc-3.19.6-linux-x86_64.zip -d protoc -git clone https://github.com/adjacentlink/emane.git -cd emane -git checkout v1.5.1 -./autogen.sh -./configure --prefix=/usr -cd src/python -PATH=~/Documents/protoc/bin:$PATH make -sudo /opt/core/venv/bin/python -m pip install . -``` - -## Package Install - -This section covers step by step commands that can be used to install CORE using -the package based installation path. This will require downloading a package from the release -page, to use during the install CORE step below. - -``` shell -# install system packages -sudo apt-get update -y -sudo apt-get install -y ca-certificates python3 python3-tk python3-pip python3-venv \ - libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip \ - uuid-dev automake gawk git wget libreadline-dev libtool pkg-config g++ make \ - iputils-ping tcpdump - -# install core -cd ~/Documents -wget https://github.com/coreemu/core/releases/latest/download/core__amd64.deb -sudo apt-get install -y ./core_*.deb - # install ospf mdr -cd ~/Documents +apt-get install -y \ + automake \ + gawk \ + g++ \ + libreadline-dev \ + libtool \ + make \ + pkg-config \ + git git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git cd ospf-mdr ./bootstrap.sh @@ -81,13 +50,32 @@ sudo make install # install emane cd ~/Documents -wget https://adjacentlink.com/downloads/emane/emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz -tar xf emane-1.5.1-release-1.ubuntu-22_04.amd64.tar.gz -cd emane-1.5.1-release-1/debs/ubuntu-22_04/amd64 -apt-get install -y ./openstatistic*.deb ./emane*.deb ./python3-emane_*.deb +EMANE_RELEASE=emane-1.5.1-release-1 +EMANE_PACKAGE=${EMANE_RELEASE}.ubuntu-22_04.amd64.tar.gz +wget -q https://adjacentlink.com/downloads/emane/${EMANE_PACKAGE} +tar xf ${EMANE_PACKAGE} +cd ${EMANE_RELEASE}/debs/ubuntu-22_04/amd64 +rm emane-spectrum-tools*.deb emane-model-lte*.deb +rm *dev*.deb +sudo apt-get install -y ./emane*.deb ./python3-emane_*.deb + +# install core +cd ~/Documents +CORE_PACKAGE=core_9.0.3_amd64.deb +PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/${CORE_PACKAGE} +wget -q ${PACKAGE_URL} +sudo apt-get install -y ./${CORE_PACKAGE} # install emane python bindings cd ~/Documents +sudo apt-get install -y \ + unzip \ + libpcap-dev \ + libpcre3-dev \ + libprotobuf-dev \ + libxml2-dev \ + protobuf-compiler \ + uuid-dev wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip mkdir protoc unzip protoc-3.19.6-linux-x86_64.zip -d protoc diff --git a/mkdocs.yml b/mkdocs.yml index 4c9d9cfd..60a918bd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -40,7 +40,7 @@ nav: - Installation: - Overview: install.md - Ubuntu: install_ubuntu.md - - CentOS: install_centos.md + - Rocky: install_rocky.md - Docker: install_docker.md - Tutorials: - Overview: tutorials/overview.md