Build and install a magma package in AGW
Description
The purpose of this document is to describe how to build and install a magma package in AGW.
Environment
AGW
Steps
Note that the following is supported starting with magma v1.9. For older versions see respective documentation.
-
Clone or Update your local repository. In any machine (i.e. your computer) clone the magma repo (and switch to the branch you want to build).
git clone https://github.com/magma/magma.git -
Install prerequisites. Make sure you have installed all the tools specified in the prerequisites
-
Build and create deb package. To build an AGW package spin up a vagrant machine and then build and create a deb package.
From
$MAGMA_ROOT/lte/gatewayon your host machine run:vagrant up magma
vagrant ssh magmaIn the VM from
$MAGMA_ROOTrun:bazel run //lte/gateway/release:release_build --config=productionTo create a package for development or testing, run
bazel run //lte/gateway/release:release_buildOmitting the
--config=productionflag 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 can find the packages inside the VM:
cd /tmp/packagesThere should be two packages named
magma_1.9.XXXandmagma-sctpd_1.9.XXX(for v1.9 versions). -
Copy the packages to the target machine.
-
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