Skip to content
5 changes: 2 additions & 3 deletions docusaurus/docs/basics/prerequisites.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current documentation lives on readmes, don't change anything else unless you have a reason to.

Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ Install the following tools:

1. [Docker](https://www.docker.com) and Docker Compose
2. [Homebrew](https://brew.sh/) *only* for MacOS users
3. [VirtualBox](https://www.virtualbox.org/)
3. [Vagrant](https://vagrantup.com)

Replace `brew` with your OS-appropriate package manager as necessary:

```bash
brew install python3
pip3 install ansible fabric3 jsonpickle requests PyYAML
vagrant plugin install vagrant-vbguest
```

> **Note**: Vagrant-based development has been deprecated. Please use the Docker-based AGW deployment instead.

If you are on MacOS, you should start Docker for Mac and increase the memory
allocation for the Docker engine to at least 4GB (Preferences -> Advanced).

Expand Down
89 changes: 26 additions & 63 deletions docusaurus/docs/basics/quick_start_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,32 @@ installing Magma for a production deployment.

With the [prereqs](prerequisites.md) installed, we can now set up a minimal
end-to-end system on your development environment. In this guide, we'll start
by running the LTE access gateway and orchestrator cloud, and then
by running the LTE access gateway (via Docker) and orchestrator cloud, and then
register your local access gateway with your local cloud for management.

We will be spinning up a virtual machine and some docker containers for this
full setup, so you'll probably want to do this on a system with at least 8GB
of memory. Our development VM's are in the 192.168.80.0/24 address space, so
make sure that you don't have anything running which hijacks that (e.g. VPN).
> **Note**: Vagrant-based development has been deprecated. Please use the
> Docker-based AGW deployment. See the [AGW Docker deployment guide](../deployment/agw/docker.md)
> for the latest instructions.

In the following steps, note the prefix in terminal commands. `HOST` means to
run the indicated command on your host machine, and `MAGMA-VM` on the `magma`
vagrant machine under `lte/gateway`.
We will be spinning up docker containers for this full setup, so you'll
probably want to do this on a system with at least 8GB of memory.

## Provisioning the environment

Go ahead and open up 2 fresh terminal tabs. Start in
Go ahead and open up 2 fresh terminal tabs.

### Terminal Tab 1: Provision the AGW VM
### Terminal Tab 1: Provision the AGW (Docker)

The development environment virtualizes the access gateway so you don't need
any production hardware on hand to test an end-to-end setup.
We'll be setting up the LTE AGW VM in this tab.
The development environment can use Docker to run the Access Gateway. See the
[AGW Docker deployment](../deployment/agw/docker.md) for detailed instructions.

For quick setup:

```bash
HOST [magma]$ cd lte/gateway
HOST [magma/lte/gateway]$ vagrant up magma
HOST [magma]$ cd lte/gateway/deploy
HOST [magma/lte/gateway/deploy]$ ./agw_docker_install.sh
```

This will take a few minutes to spin up the VM. While that runs, switch over
to...

### Terminal Tab 2: Build Orchestrator

Here, we'll be building the Orchestrator docker containers.
Expand All @@ -51,38 +47,12 @@ HOST [magma]$ cd orc8r/cloud/docker
HOST [magma/orc8r/cloud/docker]$ ./build.py -a
```

This will build all the docker images for Orchestrator. The `vagrant up` from
the first tab should finish before the image building, so you should switch
to that tab and move on for now.

## Initial Run

Once `vagrant up` in the first tab finishes:

### Terminal Tab 1: Build AGW from Source

We will kick off the initial build of the AGW from source here.

```bash
HOST [magma/lte/gateway]$ vagrant ssh magma
MAGMA-VM [/home/vagrant]$ cd magma/lte/gateway
MAGMA-VM [/home/vagrant/magma/lte/gateway]$ make run
```

This will take a while (we have a lot of CXX files to build). With 2 extensive
build jobs running, now is a good time to grab a coffee or lunch. The first
build ever from source will take a while, but afterwards, a persistent ccache
and Docker's native layer caching will speed up subsequent builds
significantly.

You can monitor what happens in the other tab now:

### Terminal Tab 2: Start Orchestrator

Once the Orchestrator build finishes, we can start the development Orchestrator
cloud for the first time. We'll also use this time to register the local
client certificate you'll need to access the local API gateway for your
development stack.
cloud for the first time.

Starting Orchestrator is as simple as:

Expand Down Expand Up @@ -123,31 +93,23 @@ installed client certificates. See [here](https://support.globalsign.com/custome
for instructions. If you use Chrome or Safari, you may have to restart the
browser before the certificate can be used.

### Connecting Your Local LTE Gateway to Your Local Cloud
### Register Your AGW with Orchestrator

At this point, you will have built all the code in the LTE access gateway and
the Orchestrator cloud. All the services on the LTE access gateway and
orchestrator cloud are running, but your gateway VM isn't yet set up to
communicate with your local cloud.

We have a fabric command set up to do this:
Register your Docker-based AGW with Orchestrator:

```bash
HOST [magma]$ cd lte/gateway
HOST [magma/lte/gateway]$ fab -f dev_tools.py register_vm
HOST [magma/lte/gateway]$ fab -f dev_tools.py register_agw
```

This command will seed your gateway and network on Orchestrator with some
default LTE configuration values and set your gateway VM up to talk to your
local Orchestrator cloud. Wait a minute or 2 for the changes to propagate,
then you can verify that things are working:
Wait a minute or 2 for the changes to propagate, then you can verify that things are working:

```bash
HOST [magma/lte/gateway]$ vagrant ssh magma
HOST [magma/lte/gateway]$ docker exec -it magma_control /bin/bash

MAGMA-VM$ sudo service magma@* stop
MAGMA-VM$ sudo service magma@magmad restart
MAGMA-VM$ sudo tail -f /var/log/syslog
MAGMA-CONTROL$ sudo service magma@* stop
MAGMA-CONTROL$ sudo service magma@magmad restart
MAGMA-CONTROL$ sudo tail -f /var/log/syslog

# After a minute or 2 you should see these messages:
Sep 27 22:57:35 magma-dev magmad[6226]: [2018-09-27 22:57:35,550 INFO root] Checkin Successful!
Expand All @@ -172,6 +134,7 @@ After this, you will be able to access the UI by visiting
and password `password1234`. If you see Gateway Error 502, don't worry, the
NMS can take upto 60 seconds to finish starting up.

## Additional Resources



- For detailed AGW Docker deployment, see [AGW Docker deployment guide](../deployment/agw/docker.md)
- For testing LTE features without cloud-based network management, see [S1AP integration tests](../lte/s1ap_tests.md)
39 changes: 18 additions & 21 deletions docusaurus/docs/cwf/setup.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
---
id: version-1.0.0-setup
title: CWAG Setup (With Vagrant)
sidebar_label: Setup (With Vagrant)
title: CWAG Setup
sidebar_label: Setup
hide_title: true
original_id: setup
---
# CWF Access Gateway Setup (With Vagrant)
### Prerequisites
To develop and manage a Magma VM, you must have the following applications installed locally:

* Virtualbox
* Vagrant
* Ansible
# Carrier Wifi Access Gateway (CWAG) Setup

### Steps
> **Note**: Vagrant-based CWAG setup has been deprecated. Please use Docker-based deployment.

To bring up a Wifi Access Gateway (CWAG) VM using Vagrant:
### Prerequisites

* Run the following command:
To develop and manage a Magma CWAG using Docker, you must have the following installed:

``HOST:magma/cwf/gateway USER$ vagrant up cwag``
- Docker and Docker Compose
- Ansible (for configuration)

Vagrant will bring up the VM, then Ansible will provision the VM.
### Steps

To bring up a Carrier Wifi Access Gateway (CWAG) using Docker, follow the [AGW Docker deployment guide](../deployment/agw/docker.md).

* Once the CWAG VM is up and provisioned, run the following commands:
Quick start:

``HOST:magma/cwf/gateway USER$ vagrant ssh cwag``<br></br>
``AGW:~ USER$ cd magma/cwf/gateway/docker``<br></br>
``AGW:~/magma/cwf/gateway/docker USER$ docker-compose build --parallel``
``AGW:~/magma/cwf/gateway/docker USER$ docker-compose up -d``
```bash
HOST [magma/cwf/gateway]$ cd cwf/gateway/deploy
HOST [magma/cwf/gateway/deploy]$ ./agw_docker_install.sh
```

After this, all the CWAG docker containers should have been brought up
successfully.
For more details, see:
- [Quick Start Guide](../basics/quick_start_guide.md)
- [AGW Docker Deployment](../deployment/agw/docker.md)
8 changes: 5 additions & 3 deletions docusaurus/docs/lte/README_AGW.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ magma/lte/gateway/python/scripts. These are:
6. Subscriberdb: subscriber_cli.py
7. Enodebd: enodebd_cli.py

Each of these CLIs can be used in the gateway VM:
Each of these CLIs can be used in the Docker container:

```bash
vagrant@magma-dev:~$ magtivate
(python) vagrant@magma-dev:~$ enodebd_cli.py -h
MAGMA-CONTROL$ docker exec -it magma_control /bin/bash
MAGMA-CONTROL$ enodebd_cli.py -h

usage: enodebd_cli.py [-h]
{get_parameter,set_parameter,config_enodeb,reboot_enodeb,get_status}
Expand All @@ -137,3 +137,5 @@ subcommands:
reboot_enodeb Reboot eNodeB
get_status Get eNodeB status
```

> **Note**: For Vagrant-based development (deprecated), use `vagrant@magma-dev:~$ magtivate`
7 changes: 5 additions & 2 deletions docusaurus/docs/lte/s1ap_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ hide_title: true
original_id: s1ap_tests
---
# S1AP Integration Tests
Current testing workflow for VM-only S1AP integration tests. We cover gateway-only tests, cloud-included tests, and some general notes.

Our VM-only tests use 2 to 4 Vagrant-managed VMs hosted on the local device (laptop):
> **Note**: Vagrant-based testing has been deprecated. Docker-based AGW deployment is now recommended for testing.

Current testing workflow for S1AP integration tests. We cover gateway-only tests, cloud-included tests, and some general notes.

For VM-based testing (deprecated), our tests use 2 to 4 Vagrant-managed VMs:

- *magma*, i.e. magma-dev or gateway
- *magma_test*, i.e. s1ap_tester
Expand Down
37 changes: 19 additions & 18 deletions docusaurus/docs/lte/setup.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
---
id: version-1.0.0-setup
title: AGW Setup (With Vagrant)
sidebar_label: Setup (With Vagrant)
title: AGW Setup
sidebar_label: Setup
hide_title: true
original_id: setup
---
# Access Gateway Setup (With Vagrant)
### Prerequisites
To develop and manage a Magma VM, you must have the following applications installed locally:
# Access Gateway Setup

* Virtualbox
* Vagrant
* Ansible
> **Note**: Vagrant-based AGW setup has been deprecated. Please use Docker-based deployment.

### Steps
### Prerequisites

To bring up an Access Gateway (AGW) VM using Vagrant:
To develop and manage a Magma AGW using Docker, you must have the following installed:

* Run the following command:
- Docker and Docker Compose
- Ansible (for configuration)

``HOST:magma/lte/gateway USER$ vagrant up magma``
### Steps

Vagrant will bring up the VM, then Ansible will provision the VM.
To bring up an Access Gateway (AGW) using Docker, follow the [AGW Docker deployment guide](../deployment/agw/docker.md).

Quick start:

* Once the Access Gateway VM is up and provisioned, run the following commands:
```bash
HOST [magma/lte/gateway]$ cd deploy
HOST [magma/lte/gateway/deploy]$ ./agw_docker_install.sh
```

``HOST:magma/lte/gateway USER$ vagrant ssh magma``<br></br>
``AGW:~ USER$ cd magma/lte/gateway``<br></br>
``AGW:~/magma/lte/gateway USER$ make run``
Once the Access Gateway is running successfully, proceed to attaching the eNodeB.

Once the Access Gateway VM is running successfully, proceed to attaching the eNodeB.
For more details, see:
- [Quick Start Guide](../basics/quick_start_guide.md)
- [AGW Docker Deployment](../deployment/agw/docker.md)
9 changes: 9 additions & 0 deletions readmes/basics/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ Magma leverages a variety of modern technologies to implement its solutions:
- The main programming languages used in development.
- Multiple language equals multiple opportunities to contribute.

## Deployment Methods

Magma supports multiple deployment methods for the Access Gateway (AGW):

- **Docker-based AGW** (Recommended): The modern, containerized approach for development and production. See the [AGW Docker deployment guide](../lte/deploy_install_docker.md).
- **Bare Metal**: For production deployments on physical hardware.

> **Deprecation Notice**: Vagrant-based AGW deployment has been **deprecated** and will be removed in a future release. Please migrate to the Docker-based deployment method. See the Vagrant-to-Docker migration guide in issue [#15754](https://github.com/magma/magma/issues/15754) for detailed instructions.

## Community

Join the [Magma Slack channel](https://join.slack.com/t/magmacore/shared_invite/zt-g76zkofr-g6~jYiS3KRzC9qhAISUC2A) and interact with our active community.
Expand Down
13 changes: 0 additions & 13 deletions readmes/basics/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Development can occur from multiple OS's, where **macOS** and **Ubuntu** are **e

1. [Docker and Docker Compose](https://docs.docker.com/desktop/install/mac-install/)
2. [Homebrew](https://brew.sh/)
3. [VirtualBox](https://www.virtualbox.org/)
4. [Vagrant](https://vagrantup.com)

```bash
brew install go@1.20 pyenv
Expand All @@ -42,7 +40,6 @@ Development can occur from multiple OS's, where **macOS** and **Ubuntu** are **e
pyenv install 3.8.10
pyenv global 3.8.10
pip3 install ansible fabric jsonpickle requests PyYAML
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-reload
```

**Note**: In the case where installation of `fabric` through pip was unsuccessful,
Expand All @@ -59,8 +56,6 @@ Development can occur from multiple OS's, where **macOS** and **Ubuntu** are **e

1. Install the following tools
1. [Docker and Docker Compose](https://docs.docker.com/engine/install/ubuntu/)
2. [VirtualBox](https://www.virtualbox.org/wiki/Linux_Downloads)
3. [Vagrant](https://www.vagrantup.com/downloads)
2. Install golang version 1.20.1.

1. Download the tar file.
Expand Down Expand Up @@ -147,14 +142,6 @@ Development can occur from multiple OS's, where **macOS** and **Ubuntu** are **e
pip3 install ansible fabric jsonpickle requests PyYAML
```

5. Install `vagrant` necessary plugin.

```bash
vagrant plugin install vagrant-vbguest vagrant-disksize vagrant-reload
```

Make sure `virtualbox` is the default provider for `vagrant` by adding the following line to your `.bashrc` (or equivalent) and restart your shell: `export VAGRANT_DEFAULT_PROVIDER="virtualbox"`.

## Downloading Magma

You can find Magma code on [Github](https://github.com/magma/magma).
Expand Down
Loading