updates for devguide doc
This commit is contained in:
parent
8fe6bc76ca
commit
09756eb7ab
2 changed files with 76 additions and 57 deletions
|
@ -21,15 +21,59 @@ Current development focuses on the Python modules and daemon. Here is a brief de
|
|||
## Getting started
|
||||
|
||||
Overview for setting up the pipenv environment, building core, installing the GUI and netns, then running
|
||||
the core-daemon for development.
|
||||
the core-daemon for development based on Ubuntu 18.04.
|
||||
|
||||
### Install Dependencies
|
||||
|
||||
```shell
|
||||
sudo apt install -y automake pkg-config gcc libev-dev bridge-utils ebtables gawk \
|
||||
python3.6 python3.6-dev python3-pip python3-tk tk libtk-img ethtool libtool libreadline-dev autoconf
|
||||
```
|
||||
|
||||
### Install OSPF MDR
|
||||
|
||||
```shell
|
||||
cd ~/Documents
|
||||
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr
|
||||
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
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Clone CORE Repo
|
||||
|
||||
```shell
|
||||
cd ~/Documents
|
||||
git clone https://github.com/coreemu/core.git
|
||||
cd core
|
||||
```
|
||||
|
||||
### Build CORE
|
||||
|
||||
```shell
|
||||
./bootstrap.sh
|
||||
./configure
|
||||
make -j8
|
||||
```
|
||||
|
||||
### Install netns and GUI
|
||||
|
||||
Install legacy GUI if desired and mandatory netns executables.
|
||||
|
||||
```shell
|
||||
# install GUI
|
||||
cd $REPO/gui
|
||||
sudo make install
|
||||
|
||||
# install netns scripts
|
||||
cd $REPO/netns
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Setup Python Environment
|
||||
|
||||
To leverage the dev environment you need python 3.6+.
|
||||
|
@ -38,14 +82,11 @@ To leverage the dev environment you need python 3.6+.
|
|||
# change to daemon directory
|
||||
cd $REPO/daemon
|
||||
|
||||
# copy setup.py for installation
|
||||
cp setup.py.in setup.py
|
||||
|
||||
# install pipenv
|
||||
pip3 install pipenv
|
||||
sudo pip3 install pipenv
|
||||
|
||||
# setup a virtual environment and install all required development dependencies
|
||||
python3 -m pipenv install --dev
|
||||
pipenv install --dev
|
||||
```
|
||||
|
||||
### Setup pre-commit
|
||||
|
@ -55,29 +96,7 @@ python utilities will be ran to check validity of code, potentially failing and
|
|||
one to review changes being made by tools ro the fix the issue noted. Then add the changes and commit again.
|
||||
|
||||
```shell
|
||||
python3 -m pipenv run pre-commit install
|
||||
```
|
||||
|
||||
### Build CORE
|
||||
|
||||
```shell
|
||||
./bootstrap.sh
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
```
|
||||
|
||||
### Install netns and GUI
|
||||
|
||||
Below commands assume your development will be focused on the daemon.
|
||||
|
||||
```shell
|
||||
# install GUI
|
||||
cd $REPO/gui
|
||||
sudo make install
|
||||
|
||||
# install netns scripts
|
||||
cd $REPO/netns
|
||||
sudo make install
|
||||
pipenv run pre-commit install
|
||||
```
|
||||
|
||||
### Adding EMANE to Pipenv
|
||||
|
@ -99,7 +118,8 @@ sudo apt install libxml2-dev libprotobuf-dev uuid-dev libpcap-dev protobuf-compi
|
|||
make -j8
|
||||
|
||||
# install emane binding in pipenv
|
||||
python3 -m pipenv install $EMANEREPO/src/python
|
||||
# NOTE: this will mody pipenv Pipfiles and we do not want that, use git checkout -- Pipfile*, to remove changes
|
||||
pipenv install $EMANEREPO/src/python
|
||||
```
|
||||
|
||||
### Running CORE
|
||||
|
@ -107,15 +127,14 @@ python3 -m pipenv install $EMANEREPO/src/python
|
|||
This will run the core-daemon server using the configuration files within the repo.
|
||||
|
||||
```shell
|
||||
sudo python3 -m pipenv run core
|
||||
```
|
||||
# runs for daemon
|
||||
sudo pipenv run core
|
||||
|
||||
### Running CORE Python GUI
|
||||
# runs coretk gui
|
||||
pipenv run coretk
|
||||
|
||||
Must be ran after the daemon above or will fail to connect.
|
||||
|
||||
```shell
|
||||
python3 -m pipenv run coretk
|
||||
# runs mocked unit tests
|
||||
pipenv run test-mock
|
||||
```
|
||||
|
||||
## Linux Network Namespace Commands
|
||||
|
|
|
@ -9,19 +9,19 @@ This section will describe how to install CORE from source or from a pre-built p
|
|||
|
||||
# Required Hardware
|
||||
|
||||
Any computer capable of running Linux should be able to run CORE. Since the physical machine will be hosting numerous
|
||||
Any computer capable of running Linux should be able to run CORE. Since the physical machine will be hosting numerous
|
||||
virtual machines, as a general rule you should select a machine having as much RAM and CPU resources as possible.
|
||||
|
||||
# Operating System
|
||||
|
||||
CORE requires a Linux operating system because it uses virtualization provided by the kernel. It does not run on
|
||||
Windows or Mac OS X operating systems (unless it is running within a virtual machine guest.) The virtualization
|
||||
CORE requires a Linux operating system because it uses virtualization provided by the kernel. It does not run on
|
||||
Windows or Mac OS X operating systems (unless it is running within a virtual machine guest.) The virtualization
|
||||
technology that CORE currently uses is Linux network namespaces.
|
||||
|
||||
Ubuntu and Fedora/CentOS Linux are the recommended distributions for running CORE. However, these distributions are
|
||||
Ubuntu and Fedora/CentOS Linux are the recommended distributions for running CORE. However, these distributions are
|
||||
not strictly required. CORE will likely work on other flavors of Linux as well, assuming dependencies are met.
|
||||
|
||||
**NOTE: CORE Services determine what run on each node. You may require other software packages depending on the
|
||||
**NOTE: CORE Services determine what run on each node. You may require other software packages depending on the
|
||||
services you wish to use. For example, the HTTP service will require the apache2 package.**
|
||||
|
||||
# Installed Files
|
||||
|
@ -64,12 +64,12 @@ sudo python3 -m pip install -r requirements.txt
|
|||
|
||||
# Pre-Req Installing OSPF MDR
|
||||
|
||||
Virtual networks generally require some form of routing in order to work (e.g. to automatically populate routing
|
||||
tables for routing packets from one subnet to another.) CORE builds OSPF routing protocol configurations by
|
||||
default when the blue router node type is used.
|
||||
Virtual networks generally require some form of routing in order to work (e.g. to automatically populate routing
|
||||
tables for routing packets from one subnet to another.) CORE builds OSPF routing protocol configurations by
|
||||
default when the blue router node type is used.
|
||||
|
||||
* [OSPF MANET Designated Routers](https://github.com/USNavalResearchLaboratory/ospf-mdr) (MDR) - the Quagga routing
|
||||
suite with a modified version of OSPFv3, optimized for use with mobile wireless networks. The **mdr** node type
|
||||
* [OSPF MANET Designated Routers](https://github.com/USNavalResearchLaboratory/ospf-mdr) (MDR) - the Quagga routing
|
||||
suite with a modified version of OSPFv3, optimized for use with mobile wireless networks. The **mdr** node type
|
||||
(and the MDR service) requires this variant of Quagga.
|
||||
|
||||
## Ubuntu <= 16.04 and Fedora/CentOS
|
||||
|
@ -87,7 +87,7 @@ Requires building from source, from the latest nightly snapshot.
|
|||
|
||||
```shell
|
||||
# packages needed beyond what's normally required to build core on ubuntu
|
||||
sudo apt install libtool libreadline-dev autoconf
|
||||
sudo apt install libtool libreadline-dev autoconf gawk
|
||||
|
||||
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr
|
||||
cd ospf-mdr
|
||||
|
@ -99,8 +99,8 @@ make
|
|||
sudo make install
|
||||
```
|
||||
|
||||
Note that the configuration directory */usr/local/etc/quagga* shown for Quagga above could be */etc/quagga*,
|
||||
if you create a symbolic link from */etc/quagga/Quagga.conf -> /usr/local/etc/quagga/Quagga.conf* on the host.
|
||||
Note that the configuration directory */usr/local/etc/quagga* shown for Quagga above could be */etc/quagga*,
|
||||
if you create a symbolic link from */etc/quagga/Quagga.conf -> /usr/local/etc/quagga/Quagga.conf* on the host.
|
||||
The *quaggaboot.sh* script in a Linux network namespace will try and do this for you if needed.
|
||||
|
||||
If you try to run quagga after installing from source and get an error such as:
|
||||
|
@ -113,8 +113,8 @@ this is usually a sign that you have to run ```sudo ldconfig```` to refresh the
|
|||
|
||||
# Installing from Packages
|
||||
|
||||
The easiest way to install CORE is using the pre-built packages. The package managers on Ubuntu or Fedora/CentOS
|
||||
will help in automatically installing most dependencies, except for the python ones described previously.
|
||||
The easiest way to install CORE is using the pre-built packages. The package managers on Ubuntu or Fedora/CentOS
|
||||
will help in automatically installing most dependencies, except for the python ones described previously.
|
||||
|
||||
You can obtain the CORE packages from [CORE Releases](https://github.com/coreemu/core/releases).
|
||||
|
||||
|
@ -134,13 +134,13 @@ Run the CORE GUI as a normal user:
|
|||
core-gui
|
||||
```
|
||||
|
||||
After running the *core-gui* command, a GUI should appear with a canvas for drawing topologies.
|
||||
After running the *core-gui* command, a GUI should appear with a canvas for drawing topologies.
|
||||
Messages will print out on the console about connecting to the CORE daemon.
|
||||
|
||||
## Fedora/CentOS
|
||||
|
||||
**NOTE: tkimg is not required for the core-gui, but if you get an error message about it you can install the package
|
||||
on CentOS <= 6, or build from source otherwise**
|
||||
on CentOS <= 6, or build from source otherwise**
|
||||
|
||||
```shell
|
||||
yum install ./core_python3_$VERSION_x86_64.rpm
|
||||
|
@ -198,7 +198,7 @@ After running the *core-gui* command, a GUI should appear with a canvas for draw
|
|||
|
||||
# Building and Installing from Source
|
||||
|
||||
This option is listed here for developers and advanced users who are comfortable patching and building source code.
|
||||
This option is listed here for developers and advanced users who are comfortable patching and building source code.
|
||||
Please consider using the binary packages instead for a simplified install experience.
|
||||
|
||||
## Download and Extract Source Code
|
||||
|
@ -210,7 +210,7 @@ You can obtain the CORE source from the [CORE GitHub](https://github.com/coreemu
|
|||
Python module grpcio-tools is currently needed to generate code from the CORE protobuf file during the build.
|
||||
|
||||
```shell
|
||||
python3 -m pip install grpcio-tools
|
||||
python3 -m pip install grpcio-tools
|
||||
```
|
||||
|
||||
## Distro Requirements
|
||||
|
@ -270,4 +270,4 @@ mkdir /tmp/core-build
|
|||
make fpm DESTDIR=/tmp/core-build
|
||||
```
|
||||
|
||||
This will produce and RPM and Deb package for the currently configured python version.
|
||||
This will produce and RPM and Deb package for the currently configured python version.
|
||||
|
|
Loading…
Reference in a new issue