mirror of https://github.com/EdgeVPNio/tools.git
Package name update
parent
6fee0a1f8b
commit
f18d3f3316
|
@ -14,8 +14,8 @@ __pycache__/
|
||||||
|
|
||||||
/evio-tools.sh
|
/evio-tools.sh
|
||||||
/evio-tools
|
/evio-tools
|
||||||
debian-package/edge-vpnio/etc/opt/edge-vpnio/config.json
|
debian-package/evio/etc/opt/evio/config.json
|
||||||
debian-package/edge-vpnio/opt/edge-vpnio/framework
|
debian-package/evio/opt/evio/framework
|
||||||
debian-package/edge-vpnio/opt/edge-vpnio/modules
|
debian-package/evio/opt/evio/modules
|
||||||
debian-package/edge-vpnio/opt/edge-vpnio/Controller.py
|
debian-package/evio/opt/evio/Controller.py
|
||||||
debian-package/edge-vpnio/opt/edge-vpnio/tincan
|
debian-package/evio/opt/evio/tincan
|
|
@ -3,20 +3,20 @@
|
||||||
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/debian-package` 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 `evio/opt/evio`.
|
||||||
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 `evio/etc/opt/evio`.
|
||||||
4. Execute `./deb-gen` to create the `edge-vpnio.deb` installer package.
|
4. Execute `./deb-gen` to create the `evio.deb` installer package.
|
||||||
|
|
||||||
Installation creates the following files and directories:
|
Installation creates the following files and directories:
|
||||||
|
|
||||||
1. `/opt/edge-vpnio/tincan`
|
1. `/opt/evio/tincan`
|
||||||
2. `/opt/edge-vpnio/controller/`
|
2. `/opt/evio/controller/`
|
||||||
3. `/etc/opt/edge-vpnio/config.json`
|
3. `/etc/opt/evio/config.json`
|
||||||
4. `/etc/systemd/system`
|
4. `/etc/systemd/system`
|
||||||
5. `/var/logs/edge-vpnio/tincan_log`
|
5. `/var/logs/evio/tincan_log`
|
||||||
6. `/var/logs/edge-vpnio/ctrl.log`
|
6. `/var/logs/evio/ctrl.log`
|
||||||
|
|
||||||
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>/evio.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`.
|
||||||
Additionally, use `systemctl` to start/stop/restart/status evio.
|
Additionally, use `systemctl` to start/stop/restart/status evio.
|
||||||
|
|
|
@ -10,8 +10,8 @@ PkgVer=$3
|
||||||
PkgArch=$2
|
PkgArch=$2
|
||||||
OutDir=$1
|
OutDir=$1
|
||||||
|
|
||||||
cat <<! > edge-vpnio/DEBIAN/control
|
cat <<! > evio/DEBIAN/control
|
||||||
Package: edge-vpnio
|
Package: evio
|
||||||
Name: EdgeVPNio
|
Name: EdgeVPNio
|
||||||
Version : $PkgVer
|
Version : $PkgVer
|
||||||
Maintainer: <ip.over.p2p@gmail.com>
|
Maintainer: <ip.over.p2p@gmail.com>
|
||||||
|
@ -23,8 +23,8 @@ Description: Virtualized Overlay Networks.
|
||||||
Tag: P2P Edge Overlay Networking
|
Tag: P2P Edge Overlay Networking
|
||||||
!
|
!
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
rm -f edge-vpnio/DEBIAN/control
|
rm -f evio/DEBIAN/control
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dpkg-deb --build --root-owner-group edge-vpnio $OutDir
|
dpkg-deb --build --root-owner-group evio $OutDir
|
||||||
rm -f edge-vpnio/DEBIAN/control
|
rm -f evio/DEBIAN/control
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
/etc/opt/edge-vpnio/config.json
|
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/opt/evio/config.json
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd /opt/edge-vpnio
|
cd /opt/evio
|
||||||
python3.8 -m venv venv
|
python3.8 -m venv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
pip3 --no-cache-dir install wheel
|
pip3 --no-cache-dir install wheel
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
systemctl -q is-active evio && systemctl -q stop evio || true
|
systemctl -q is-active evio && systemctl -q stop evio || true
|
||||||
systemctl -q is-enabled evio && systemctl -q disable evio || true
|
systemctl -q is-enabled evio && systemctl -q disable evio || true
|
||||||
rm -rf /opt/edge-vpnio/venv
|
rm -rf /opt/evio/venv
|
||||||
if [ -d /opt/edge-vpnio/controller ]; then
|
if [ -d /opt/evio/controller ]; then
|
||||||
for dir in $(find /opt/edge-vpnio/controller -type d -name __pycache__); do
|
for dir in $(find /opt/evio/controller -type d -name __pycache__); do
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
|
@ -3,7 +3,7 @@ Description=EdgeVPNio service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/opt/edge-vpnio/evio-start
|
ExecStart=/opt/evio/evio-start
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
Restart=no
|
Restart=no
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
evio_start() {
|
evio_start() {
|
||||||
cd /opt/edge-vpnio
|
cd /opt/evio
|
||||||
./tincan &
|
./tincan &
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
python Controller.py -c /etc/opt/edge-vpnio/config.json &
|
python Controller.py -c /etc/opt/evio/config.json &
|
||||||
}
|
}
|
||||||
|
|
||||||
evio_start
|
evio_start
|
|
@ -1,7 +1,7 @@
|
||||||
FROM edgevpnio/evio-base:1.0
|
FROM edgevpnio/evio-base:1.1
|
||||||
WORKDIR /root/
|
WORKDIR /root/
|
||||||
COPY ./edge-vpnio.deb .
|
COPY ./evio.deb .
|
||||||
RUN apt-get install -y ./edge-vpnio.deb && rm -rf /var/lib/apt/lists/* && apt-get autoclean
|
RUN apt-get install -y ./evio.deb && rm -rf /var/lib/apt/lists/* && apt-get autoclean
|
||||||
|
|
||||||
CMD ["/sbin/init"]
|
CMD ["/sbin/init"]
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
systemctl mask getty@tty1.service && \
|
systemctl mask getty@tty1.service && \
|
||||||
mkdir -p /opt/edge-vpnio && \
|
mkdir -p /opt/evio && \
|
||||||
cd /opt/edge-vpnio && \
|
cd /opt/evio && \
|
||||||
python3 -m venv venv && \
|
python3.8 -m venv venv && \
|
||||||
source venv/bin/activate && \
|
source venv/bin/activate && \
|
||||||
pip3 --no-cache-dir install wheel psutil slixmpp requests simplejson ryu && \
|
pip3 --no-cache-dir install wheel psutil slixmpp requests simplejson ryu && \
|
||||||
deactivate
|
deactivate
|
||||||
|
|
|
@ -57,17 +57,17 @@ function make_debpak
|
||||||
{
|
{
|
||||||
wd=$(pwd)
|
wd=$(pwd)
|
||||||
# copy controller and tincan files to debpak directory
|
# copy controller and tincan files to debpak directory
|
||||||
cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/Controller.py $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/ && \
|
cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/Controller.py $TOOLS_DIR/debian-package/evio/opt/evio/ && \
|
||||||
cp $WorkspaceRoot/EdgeVPNio/evio/controller/template-config.json $TOOLS_DIR/debian-package/edge-vpnio/etc/opt/edge-vpnio/config.json && \
|
cp $WorkspaceRoot/EdgeVPNio/evio/controller/template-config.json $TOOLS_DIR/debian-package/evio/etc/opt/evio/config.json && \
|
||||||
cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/modules/ $WorkspaceRoot/EdgeVPNio/evio/controller/framework/ $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/ && \
|
cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/modules/ $WorkspaceRoot/EdgeVPNio/evio/controller/framework/ $TOOLS_DIR/debian-package/evio/opt/evio/ && \
|
||||||
chmod 0775 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/framework/ && \
|
chmod 0775 $TOOLS_DIR/debian-package/evio/opt/evio/framework/ && \
|
||||||
chmod 0664 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/framework/* && \
|
chmod 0664 $TOOLS_DIR/debian-package/evio/opt/evio/framework/* && \
|
||||||
chmod 0775 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/modules/ && \
|
chmod 0775 $TOOLS_DIR/debian-package/evio/opt/evio/modules/ && \
|
||||||
chmod 0664 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/modules/* && \
|
chmod 0664 $TOOLS_DIR/debian-package/evio/opt/evio/modules/* && \
|
||||||
chmod 0664 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/Controller.py && \
|
chmod 0664 $TOOLS_DIR/debian-package/evio/opt/evio/Controller.py && \
|
||||||
chmod 0664 $TOOLS_DIR/debian-package/edge-vpnio/etc/opt/edge-vpnio/config.json && \
|
chmod 0664 $TOOLS_DIR/debian-package/evio/etc/opt/evio/config.json && \
|
||||||
cp $EVIO_DIR/tincan/out/"$PLATFORM"/"$BUILD_TYPE"/tincan $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/ && \
|
cp $EVIO_DIR/tincan/out/"$PLATFORM"/"$BUILD_TYPE"/tincan $TOOLS_DIR/debian-package/evio/opt/evio/ && \
|
||||||
chmod 0775 $TOOLS_DIR/debian-package/edge-vpnio/opt/edge-vpnio/tincan
|
chmod 0775 $TOOLS_DIR/debian-package/evio/opt/evio/tincan
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -78,12 +78,12 @@ function make_debpak
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# remove previously copied files
|
# remove previously copied files
|
||||||
rm -rf edge-vpnio/opt/edge-vpnio/framework \
|
rm -rf evio/opt/evio/framework \
|
||||||
edge-vpnio/opt/edge-vpnio/modules \
|
evio/opt/evio/modules \
|
||||||
edge-vpnio/opt/edge-vpnio/tincan \
|
evio/opt/evio/tincan \
|
||||||
edge-vpnio/opt/edge-vpnio/template-config.json \
|
evio/opt/evio/template-config.json \
|
||||||
edge-vpnio/opt/edge-vpnio/Controller.py \
|
evio/opt/evio/Controller.py \
|
||||||
edge-vpnio/etc/opt/edge-vpnio/config.json
|
evio/etc/opt/evio/config.json
|
||||||
cd $wd
|
cd $wd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,12 +115,12 @@ function install_testbed_deps
|
||||||
function make_dkrimg
|
function make_dkrimg
|
||||||
{
|
{
|
||||||
display_env
|
display_env
|
||||||
DPK_NAME=edge-vpnio_$VER"_"$ARCH.deb
|
DPK_NAME=evio_$VER"_"$ARCH.deb
|
||||||
echo docker image using $DPK_NAME
|
echo docker image using $DPK_NAME
|
||||||
cp $OUT_DIR/$DPK_NAME $TOOLS_DIR/docker-image/edge-vpnio.deb && \
|
cp $OUT_DIR/$DPK_NAME $TOOLS_DIR/docker-image/evio.deb && \
|
||||||
docker build -f $TOOLS_DIR/docker-image/evio-base.Dockerfile -t edgevpnio/evio-base:1.0 $TOOLS_DIR/docker-image && \
|
docker build -f $TOOLS_DIR/docker-image/evio-base.Dockerfile -t edgevpnio/evio-base:1.1 $TOOLS_DIR/docker-image && \
|
||||||
docker build -f $TOOLS_DIR/docker-image/evio-node.Dockerfile -t edgevpnio/evio-node:"$VER" $TOOLS_DIR/docker-image
|
docker build -f $TOOLS_DIR/docker-image/evio-node.Dockerfile -t edgevpnio/evio-node:"$VER" $TOOLS_DIR/docker-image
|
||||||
rm $TOOLS_DIR/docker-image/edge-vpnio.deb
|
rm $TOOLS_DIR/docker-image/evio.deb
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_openfire
|
function install_openfire
|
||||||
|
@ -155,11 +155,11 @@ function do_clean
|
||||||
#debian pak
|
#debian pak
|
||||||
cd $TOOLS_DIR/debian-package/ && \
|
cd $TOOLS_DIR/debian-package/ && \
|
||||||
rm -ri ./*.deb \
|
rm -ri ./*.deb \
|
||||||
edge-vpnio/opt/edge-vpnio/framework \
|
evio/opt/evio/framework \
|
||||||
edge-vpnio/opt/edge-vpnio/modules \
|
evio/opt/evio/modules \
|
||||||
edge-vpnio/opt/edge-vpnio/tincan \
|
evio/opt/evio/tincan \
|
||||||
edge-vpnio/opt/edge-vpnio/template-config.json \
|
evio/opt/evio/template-config.json \
|
||||||
edge-vpnio/opt/edge-vpnio/Controller.py
|
evio/opt/evio/Controller.py
|
||||||
# docker-image
|
# docker-image
|
||||||
cd ..
|
cd ..
|
||||||
rm -f docker-image/*.deb
|
rm -f docker-image/*.deb
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sudo apt install -y python3.8 python3.8-dev python3.8-venv python3-pip git
|
sudo apt install -y python3.8 python3.8-dev python3.8-venv python3-pip git
|
||||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 38
|
#sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 38
|
||||||
deactivate 2>/dev/null
|
deactivate 2>/dev/null
|
||||||
python -m venv venv && \
|
python -m venv venv && \
|
||||||
source venv/bin/activate && \
|
source venv/bin/activate && \
|
||||||
|
|
|
@ -17,12 +17,12 @@ import ipaddress
|
||||||
class Testbed():
|
class Testbed():
|
||||||
__metaclass__ = ABCMeta
|
__metaclass__ = ABCMeta
|
||||||
|
|
||||||
LAUNCH_WAIT = 60
|
LAUNCH_WAIT = 5
|
||||||
BATCH_SZ = 5
|
BATCH_SZ = 5
|
||||||
VIRT = NotImplemented
|
VIRT = NotImplemented
|
||||||
APT = spawn.find_executable("apt-get")
|
APT = spawn.find_executable("apt-get")
|
||||||
CONTAINER = NotImplemented
|
CONTAINER = NotImplemented
|
||||||
BF_VIRT_IMG = "edgevpnio/evio-node:20.7"
|
BF_VIRT_IMG = "edgevpnio/evio-node:20.12.0.45-dev"
|
||||||
|
|
||||||
def __init__(self, exp_dir=None):
|
def __init__(self, exp_dir=None):
|
||||||
parser = argparse.ArgumentParser(description="Configures and runs EdgeVPN Testbed")
|
parser = argparse.ArgumentParser(description="Configures and runs EdgeVPN Testbed")
|
||||||
|
@ -284,10 +284,10 @@ class DockerTestbed(Testbed):
|
||||||
if not os.path.isfile(cfg_file):
|
if not os.path.isfile(cfg_file):
|
||||||
self.gen_config(instance, instance+1)
|
self.gen_config(instance, instance+1)
|
||||||
|
|
||||||
mount_cfg = "{0}:/etc/opt/edge-vpnio/config.json".format(cfg_file)
|
mount_cfg = "{0}:/etc/opt/evio/config.json".format(cfg_file)
|
||||||
mount_log = "{0}/:/var/log/edge-vpnio/".format(log_dir)
|
mount_log = "{0}/:/var/log/evio/".format(log_dir)
|
||||||
#mount_data = "{0}/:/var/edge-vpnio/".format(self.data_dir)
|
#mount_data = "{0}/:/var/evio/".format(self.data_dir)
|
||||||
mount_cert = "{0}/:/var/edge-vpnio/cert/".format(self.cert_dir)
|
mount_cert = "{0}/:/var/evio/cert/".format(self.cert_dir)
|
||||||
args = ["--rm", "--privileged"]
|
args = ["--rm", "--privileged"]
|
||||||
opts = "-d"
|
opts = "-d"
|
||||||
img = Testbed.BF_VIRT_IMG
|
img = Testbed.BF_VIRT_IMG
|
||||||
|
|
Loading…
Reference in New Issue