Update for Ubuntu20

pull/4/head
Ken 2020-08-12 22:36:06 -04:00
parent cd6cd9e07c
commit e0df633e64
7 changed files with 51 additions and 35 deletions

View File

@ -1,2 +1,3 @@
# tools # EdgeVPNio tools
Various development tools used with EdgeVPNio software
Various management and configuration tools used with EdgeVPNio software development.

View File

@ -1,12 +1,14 @@
# EdgeVPNio DEBIAN PACKAGE # EdgeVPNio DEBIAN PACKAGE
The Debian package installs EdgeVPNio (evio) as a systemd service and is supported in Ubuntu 18.04 and Raspberry Pi Raspbian OS. Use the following procedure to create a new installer package. The Debian package installs EdgeVPNio (evio) as a systemd service and is supported in Ubuntu 18.04 and Raspberry Pi Raspbian OS. Use the following procedure to create a new installer package.
1. Clone the `tools` repo and use `tools/deb-pak` as your base directory.
1. Clone the `tools` repo and use `tools/debian-package` as your base directory.
2. Copy the `tincan` executable, and the contents of the `controller` folder into `edge-vpnio/opt/edge-vpnio`. 2. Copy the `tincan` executable, and the contents of the `controller` folder into `edge-vpnio/opt/edge-vpnio`.
3. Copy `config.json`, the template or completed file, into `edge-vpnio/etc/opt/edge-vpnio`. 3. Copy `config.json`, the template or completed file, into `edge-vpnio/etc/opt/edge-vpnio`.
4. Execute `./deb-gen` to create the `edge-vpnio.deb` installer package. 4. Execute `./deb-gen` to create the `edge-vpnio.deb` installer package.
By default, the following files and directories are created: Installation creates the following files and directories:
1. `/opt/edge-vpnio/tincan` 1. `/opt/edge-vpnio/tincan`
2. `/opt/edge-vpnio/controller/` 2. `/opt/edge-vpnio/controller/`
3. `/etc/opt/edge-vpnio/config.json` 3. `/etc/opt/edge-vpnio/config.json`
@ -14,7 +16,6 @@ By default, the following files and directories are created:
5. `/var/logs/edge-vpnio/tincan_log` 5. `/var/logs/edge-vpnio/tincan_log`
6. `/var/logs/edge-vpnio/ctrl.log` 6. `/var/logs/edge-vpnio/ctrl.log`
The installer has dependencies on, and will install `python3`, `python3-pip`, `iproute2`, `openvswitch-switch`, `bridge-utils`.
To install EdgeVPNio invoke `sudo apt install -y <path/to/installer>/edge-vpnio.deb`. To install EdgeVPNio invoke `sudo apt install -y <path/to/installer>/edge-vpnio.deb`.
After installation but before starting evio, complete `config.json` by adding the XMPP credentials, setting the IP address, and applying other configurations as needed. After installation but before starting evio, complete `config.json` by adding the XMPP credentials, setting the IP address, and applying other configurations as needed.
Then start evio using `sudo systemctl start evio`. Then start evio using `sudo systemctl start evio`.

View File

@ -7,13 +7,11 @@ Version: 20.7
Maintainer: <ip.over.p2p@gmail.com> Maintainer: <ip.over.p2p@gmail.com>
Architecture: $(dpkg --print-architecture) Architecture: $(dpkg --print-architecture)
Homepage: http://edgevpnio.github.io Homepage: http://edgevpnio.github.io
Depends: python3, python3-dev, python3-pip, iproute2, openvswitch-switch, bridge-utils Depends: python3.8, python3-dev, python3-venv, python3-pip, iproute2, openvswitch-switch, bridge-utils
Description: Virtual Overlay Networks. Description: Virtual Overlay Networking.
EdgeVPN is an open-source user-centric software virtual network allowing end users to define and create their own virtual private networks (VPNs). EdgeVPNio virtual networks provide end-to-end tunneling of IP or Ethernet over Tincan links setup and managed through a control API to create various software-defined VPN overlays. EdgeVPN is an open-source user-centric software virtual network allowing end users to define and create their own virtual private networks (VPNs). EdgeVPNio virtual networks provide end-to-end tunneling of IP or Ethernet over Tincan links setup and managed through a control API to create various software-defined VPN overlays.
Tag: P2P Overlay Networking Tag: P2P Overlay Networking
! !
mkdir -p edge-vpnio/etc/opt/edge-vpnio && \ dpkg-deb --build --root-owner-group edge-vpnio .
cp edge-vpnio/opt/edge-vpnio/template-config.json edge-vpnio/etc/opt/edge-vpnio/config.json && \ rm -f edge-vpnio/DEBIAN/control
dpkg-deb --build --root-owner-group edge-vpnio .
rm -f edge-vpnio/DEBIAN/control edge-vpnio/etc/opt/edge-vpnio/config.json

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
cd /opt/edge-vpnio cd /opt/edge-vpnio
pip3 --no-cache-dir install virtualenv python3 -m venv venv
virtualenv --python=python3.6 venv
source venv/bin/activate source venv/bin/activate
pip3 --no-cache-dir install psutil sleekxmpp requests simplejson ryu pip3 --no-cache-dir install wheel psutil slixmpp requests simplejson ryu
deactivate deactivate
systemctl daemon-reload systemctl daemon-reload
systemctl enable evio systemctl enable evio

View File

@ -6,8 +6,8 @@ RUN apt-get update -y && apt-get install -y \
psmisc \ psmisc \
iputils-ping \ iputils-ping \
nano \ nano \
python3.6 \ python3.8 \
python3.6-dev \ python3-dev \
python3-pip \ python3-pip \
python3-venv \ python3-venv \
iproute2 \ iproute2 \

View File

@ -5,5 +5,5 @@ mkdir -p /opt/edge-vpnio && \
cd /opt/edge-vpnio && \ cd /opt/edge-vpnio && \
python3 -m venv venv && \ python3 -m venv venv && \
source venv/bin/activate && \ source venv/bin/activate && \
pip3 --no-cache-dir install psutil sleekxmpp requests simplejson ryu && \ pip3 --no-cache-dir install wheel psutil slixmpp requests simplejson ryu && \
deactivate deactivate

53
setup
View File

@ -2,21 +2,24 @@
EVIO=https://github.com/EdgeVPNio/evio.git EVIO=https://github.com/EdgeVPNio/evio.git
EXLIBS=https://github.com/ipop-project/3rd-Party-Libs.git EXLIBS=https://github.com/ipop-project/3rd-Party-Libs.git
PYVER=3.6 PY=python3.8
function install_build_tools function install_build_tools
{ {
sudo bash -c " sudo bash -c "
apt-get update -y && \ apt-get update -y && \
apt-get install -y build-essential" apt-get install -y git \
make clang libc++-dev libssl-dev $PY"
} }
function pull_src function pull_src
{ {
wd=$(pwd) wd=$(pwd)
cd .. cd ..
#stat evio dir clone or pull
git clone $EVIO git clone $EVIO
cd evio/tincan/external cd evio/tincan/external
#
git clone -b ubuntu-x64 --single-branch https://github.com/ipop-project/3rd-Party-Libs.git git clone -b ubuntu-x64 --single-branch https://github.com/ipop-project/3rd-Party-Libs.git
cd $wd cd $wd
} }
@ -31,25 +34,36 @@ function make_tincan
function make_debpak function make_debpak
{ {
cp -r ../evio/controller/* debian-package/edge-vpnio/opt/edge-vpnio/ && \ wd=$(pwd)
cp ../evio/tincan/trunk/out/release/x86_64/tincan debian-package/edge-vpnio/opt/edge-vpnio/ && \ cp ../evio/controller/Controller.py debian-package/edge-vpnio/opt/edge-vpnio/ && \
chmod +x debian-package/edge-vpnio/opt/edge-vpnio/tincan && \ mkdir -p debian-package/edge-vpnio/etc/opt/edge-vpnio/
wd=$(pwd) && cd debian-package/ && \ cp ../evio/controller/template-config.json debian-package/edge-vpnio/etc/opt/edge-vpnio/config.json && \
./deb-gen && \ cp -r ../evio/controller/modules/ ../evio/controller/framework/ debian-package/edge-vpnio/opt/edge-vpnio/ && \
rm -rf edge-vpnio/opt/edge-vpnio/framework \ chmod 0775 debian-package/edge-vpnio/opt/edge-vpnio/framework/ && \
edge-vpnio/opt/edge-vpnio/modules \ chmod 0664 debian-package/edge-vpnio/opt/edge-vpnio/framework/* && \
edge-vpnio/opt/edge-vpnio/tincan \ chmod 0775 debian-package/edge-vpnio/opt/edge-vpnio/modules/ && \
edge-vpnio/opt/edge-vpnio/template-config.json \ chmod 0664 debian-package/edge-vpnio/opt/edge-vpnio/modules/* && \
edge-vpnio/opt/edge-vpnio/Controller.py && \ chmod 0664 debian-package/edge-vpnio/opt/edge-vpnio/Controller.py && \
cd $wd chmod 0664 debian-package/edge-vpnio/etc/opt/edge-vpnio/config.json && \
cp ../evio/tincan/trunk/out/release/x86_64/tincan debian-package/edge-vpnio/opt/edge-vpnio/ && \
chmod 0775 debian-package/edge-vpnio/opt/edge-vpnio/tincan && \
cd debian-package/ && \
./deb-gen && \
rm -rf edge-vpnio/opt/edge-vpnio/framework \
edge-vpnio/opt/edge-vpnio/modules \
edge-vpnio/opt/edge-vpnio/tincan \
edge-vpnio/opt/edge-vpnio/template-config.json \
edge-vpnio/opt/edge-vpnio/Controller.py \
edge-vpnio/etc/opt/edge-vpnio/config.json
cd $wd
} }
function make_testbed_prereqs function install_testbed_deps
{ {
sudo bash -c " sudo bash -c "
apt-get update -y && \ apt-get update -y && \
apt-get install -y openvswitch-switch \ apt-get install -y openvswitch-switch \
python$PYVER python3-pip python3-venv python3-dev \ $PY python3-pip python3-venv python3-dev \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
curl git \ curl git \
@ -71,7 +85,7 @@ function make_venv
{ {
wd=$(pwd) wd=$(pwd)
cd testbed && \ cd testbed && \
python$PYVER -m venv venv && \ $PY -m venv venv && \
source venv/bin/activate && \ source venv/bin/activate && \
pip3 install simplejson pip3 install simplejson
cd $wd cd $wd
@ -81,7 +95,7 @@ function make_dkrimg
{ {
mv debian-package/edge-vpnio_20.7_amd64.deb docker-image/ && \ mv debian-package/edge-vpnio_20.7_amd64.deb docker-image/ && \
docker build -f ./docker-image/evio-base.Dockerfile -t edgevpnio/evio-base:1.0 ./docker-image && \ docker build -f ./docker-image/evio-base.Dockerfile -t edgevpnio/evio-base:1.0 ./docker-image && \
docker build -f ./docker-image/evio-node.Dockerfile -t edgevpnio/evio-node:20.7 ./docker-image docker build -f ./docker-image/evio-node.Dockerfile -t edgevpnio/evio-node:20.7.3 ./docker-image
} }
@ -143,6 +157,9 @@ function do_full_setup
} }
case $1 in case $1 in
deps)
install_build_tools
;;
src) src)
pull_src pull_src
;; ;;
@ -156,7 +173,7 @@ case $1 in
make_dkrimg make_dkrimg
;; ;;
testbed) testbed)
make_testbed_prereqs install_testbed_deps
;; ;;
venv) venv)
make_venv make_venv