Build and install a magma package in AGW
Description: Purpose of this document is describe how to build and install a magma package in AGW.
Environment: AGW
Steps:
Clone or Update your local repository. In any machine (i.e. your computer) clone the magma repo and checkout the version from where you would like to build your package. For example, for v1.8 you can run:
git clone https://github.com/magma/magma.git git checkout v1.8Install prerequisites. Make sure you have installed all the tools specified in the prerequisites https://magma.github.io/magma/docs/basics/prerequisites#prerequisites
Build and create deb package. To build an AGW package, use the script located at
$MAGMA_ROOT/lte/gateway/fabfile.py. The commands below will create a vagrant machine, then build and create a deb package.The following commands are to be run from
$MAGMA_ROOT/lte/gatewayon your host machine. To create a package for production, runfab release packageTo create a package for development or testing, run
fab dev packageThe
devflag will compile all C++ services withDebugcompiler flags and enable ASAN. This is recommended for testing only as it will impact performance. In contrast, the production package has C++ services built withRelWithDebInfocompiler flags.Locate the packages. Once the above command finished. You need to enter the VM to verify the deb packages are there.
vagrant ssh magma cd ~/magma-packages/You will need only the ones that say
magma_1.1.XXXandmagma-sctpd_1.1.XXX(for v1.1 versions)Download the package. You can download the files to your computer from the vagrant machine. To do so, you can install a vagrant plugin in your computer and then download the package from the VM to your computer with the following commands:
vagrant plugin install vagrant-scp vagrant scp magma: ~/magma-packages/<deb_package>Upload the package to AGW that you would like to install.
Install the package. In order to install the new deb package in AGW, you can run
sudo apt -f install MAGMA_PACKAGERestart the magma services
sudo service magma@* stop sudo service magma@magmad restartYou can verify the installed version with
apt show magma