Installation#
System Requirements#
python 3.7+
Dependencies for C and Linux:
Dependencies for deploying in Linux:
Install system dependencies#
Install the C dependencies:
sudo apt -y install --no-install-recommends \
git mercurial make cmake ninja-build \
gcc musl musl-dev musl-tools clang \
python3-dev python3-pip python3-setuptools \
python3-tk python3-wheel python3-venv \
libjansson-dev libpcre2-dev perl dos2unix liburing-dev \
kconfig-frontends telnet pipx
pipx install kconfiglib
Why these dependencies?
libjansson-dev # required for libjwt libpcre2-dev # required by openresty perl dos2unix mercurial # required by openresty pipx kconfiglib # used by yunetas, configuration tool kconfig-frontends # used by yunetas, other configuration tool telnet # required by tests
Install yunetas
#
Install pipx
pipx is used to install Python CLI applications globally while still isolating them in virtual environments.
On Linux:
Ubuntu 23.04 or above:
sudo apt install pipx pipx ensurepath
Ubuntu 22.04 or below
python3 -m pip install --user pipx python3 -m pipx ensurepath
Install yunetas
pipx install yunetas
Update or uninstall yunetas
Click to see
Update yunetas:
pipx upgrade yunetas
Uninstall yunetas:
pipx uninstall yunetas
Steps to install and create a virtual environment:
Install conda:
mkdir -p ~/miniconda3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh ~/miniconda3/bin/conda init bash
Now you must close and re-open your current shell:
exit # exit and RE-open bash to continue !!
Add conda-forge channel:
conda config --add channels conda-forge
Create the virtual environment
conda_yunetas
and activate:conda create -y -n conda_yunetas pip conda config --set auto_activate_base false echo 'conda activate conda_yunetas' >> ~/.bashrc echo '' >> ~/.bashrc source ~/.bashrc
Install yunetas
pip install yunetas
Clone#
Clone Yunetas with submodules:
Build your own project directory:
mkdir ~/yunetaprojects
cd ~/yunetaprojects
Get the current version of yunetas:
git clone --recurse-submodules https://github.com/artgins/yunetas.git
Or Get some version of yunetas:
git clone -b <version> --recurse-submodules https://github.com/artgins/yunetas.git <version>
Activating yunetas#
Go to the yunetas directory in your project and activate:
cd ~/yunetaprojects/yunetas
source yunetas-env.sh
Configure .bashrc#
Next times, to activate yunetas environment,
(you can add these lines to ~/.bashrc
:
# edit: "vim ~/.bashrc" and add next lines:
cd ~/yunetaprojects/yunetas
source yunetas-env.sh
Configure .yunetasrc#
The script source yunetas-env.sh
also sources the file
~/.yunetasrc
where you can place your own scripts.
Install dependencies#
Firstly, install yuneta dependencies:
Goto linux-ext-libs
directory:
cd ~/yunetaprojects/yunetas/kernel/c/linux-ext-libs/
Extract, compile and install:
./extrae.sh
./configure-libs.sh
Compile Yunetas#
Configuring (Kconfig)#
Configuration options are defined in Kconfig
file.
The output from Kconfig is a header file yuneta_config.h
with macros that can be tested at build time.
Goto yunetas
directory:
cd ~/yunetaprojects/yunetas
Use this utility to edit the Kconfig file:
menuconfig
⚠️ Warning: Save the configuration, otherwise the compilation will fail, the .config file is required.
Compiling and Installing Yunetas#
To build and install yunetas:
yunetas init-debug # or init-prod
yunetas build
Test#
To test:
yunetas test
By default, the installation directory of include files,
libraries and binaries will be in /yuneta/development/outputs/