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.
- 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.1 you can run:
git clone https://github.com/magma/magma.git git checkout v1.1
Install 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, run
fab test package:vcs=git
To create a package for development or testing, run
fab dev package:vcs=git
This will compile all C++ services with compiler flag
Debugand enable ASAN. This is recommended for testing only as it will impact performance.
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-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 package>
Restart the magma services
sudo service magma@* stop sudo service magma@magmad restart
You can verify the installed version with
apt show magma