fab release packageon the host to create production packages inside the gateway VM
- Commit changes to build-magma.sh and magma.lockfile.ubuntu
Creating a production release package
Run the fab command under lte/gateway/ on the host to create a Magma
release. This runs the
build-magma.sh script with the latest commit id with
production compiler flags (
It builds everything, identifies dependencies (assuming they're specified in the
setup.py properly), and creates a Debian package in the magma-packages/
directory on dev VM.
If you want to bump the package version, this can be done inside build-magma.sh. The version number should be bumped when there is a minor or major feature or bug fix release. If you're just making a minor tweak (e.g., mistake in building the package), you can also increment the iteration number.
Creating a development package
To create an AGW package with debug compiler flags (
fab dev package
Testing a release package before you push it
You should always do this. In general, try your best not to release broken packages.
- Build the release like you normally would.
- Spin up a fresh prod VM or gateway machine and copy the
sudo apt-get install gdebi; sudo gdebi magma_<version>.deb
- A VM reload or gateway reboot will likely be required due to kernel upgrade.
This will simulate the exact steps that apt-get performs in production.
After you've done this, your environment is identical to what you'll have if
you had released your package and run
apt-get install magma.
If you want to test upgrading versions, skip the part where you spin up a fresh prod VM, and instead set up a VM with whatever version you're trying to test upgrade from. For example, if you want to test upgrading from the currently released version N to the new version N+1, install magma v(N) on the prod VM, then install your pre-release package of magma v(N+1).
Building Python dependencies
pydep tool lets you build Python dependencies. By default,
build-magma.sh figures out what Python packages we depend on, but it doesn't
build those packages. You can manually build packages by running
./pydep finddep -b ../python/setup.py
This will figure out what Python dependencies aren't satisfied by released system packages and build those. You only need to do this when you've added a Python dependency that doesn't have a debian package already available that satisfies your constraints.
What is magma.lockfile?
magma.lockfile is generated by
pydep every time you run
and captures a specific set of Python packages that satisfy the Python
dependencies of Magma. This lets us keep track of what we're actually using for
each release. The lockfile has a distro-specific suffix. Ubuntu packaging, for