Install Docker-based Access Gateway on Ubuntu
To set up a Magma Access Gateway, you will need a machine that satisfies the following requirements:
- AGW_HOST: aarch64 or 64bit-X86 machine. You will need two ethernet ports. In this guide,
enp1s0: Will carry any traffic that is not S1. That is, data plane traffic (SGi), control plane traffic (Orc8r HTTP2) and management (ssh).
enp2s0: S1 interface.
Interface names might have different names on your hardware, so just replace
enp2s0with your current interface names when following this guide.
agw_install_docker.shscript will rename the
If you do not want all internet traffic to go through
enp1s0to separate control plane (Orc8r Http2 traffic) from user plane, you may want to add another interface and configure proper routing.
1. Create boot USB stick and install Ubuntu on your AGW host
- Download the Ubuntu Server 20.04 LTS
.isoimage from the Ubuntu website
- Create a bootable USB using this Etcher tutorial
- Boot your AGW host from USB
- Press F11 to select boot sequence. WARNING: This might be different for your machine.
- If you see two options to boot from USB, select the non-UEFI option.
- Install and configure your Access Gateway according to your network defaults.
- Make sure to enable ssh server and utilities (untick every other).
- Connect your SGi interface to the internet and select this port during the installation process to get an IP using DHCP.
2. Deploy magma on the AGW_HOST
Do pre-installation steps
Become root user:
rootCA.pem file from orc8r to the following location:
mkdir -p /var/opt/magma/certs vim /var/opt/magma/certs/rootCA.pem
Run AGW installation
Download AGW docker install script
wget https://github.com/magma/magma/raw/v1.8/lte/gateway/deploy/agw_install_docker.sh bash agw_install_docker.sh
Once you see the output
Reboot this machine to apply kernel settings, reboot your AGW host.
control_proxy.yml file with your orc8r details:
cat << EOF | sudo tee /var/opt/magma/configs/control_proxy.yml cloud_address: controller.orc8r.magmacore.link cloud_port: 443 bootstrap_address: bootstrapper-controller.orc8r.magmacore.link bootstrap_port: 443 fluentd_address: fluentd.orc8r.magmacore.link fluentd_port: 24224 rootca_cert: /var/opt/magma/certs/rootCA.pem EOF
Start your access gateway:
cd /var/opt/magma/docker sudo docker compose --compatibility up -d
Now get Hardware ID and Challenge key and add AGW in your orc8r:
docker exec magmad show_gateway_info.py
Then restart your access gateway:
sudo docker compose --compatibility up -d --force-recreate