Skip to content

Commit

Permalink
install: adjust the centos 7 example to now be rocky 8, updated insta…
Browse files Browse the repository at this point in the history
…ll examples to focus just on package based installs, moved script base install to the developer page
  • Loading branch information
bharnden committed Nov 18, 2023
1 parent a622b8e commit cecc1f3
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 208 deletions.
7 changes: 4 additions & 3 deletions dockerfiles/Dockerfile.rocky
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
50 changes: 37 additions & 13 deletions docs/devguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
131 changes: 0 additions & 131 deletions docs/install_centos.md

This file was deleted.

4 changes: 3 additions & 1 deletion docs/install_docker.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
93 changes: 93 additions & 0 deletions docs/install_rocky.md
Original file line number Diff line number Diff line change
@@ -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
```
Loading

0 comments on commit cecc1f3

Please sign in to comment.