-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(agw): Automated Deployment of Magma in Kubernetes Cluster #15480
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
✔️ The Semantic PR check ended with status success. See instructions on formatting your commit and pull request titles. |
cwf/gateway/docker/c/Dockerfile
Outdated
ENV MAGMA_DEV_MODE 0 | ||
ENV XDG_CACHE_HOME ${MAGMA_ROOT}/.cache | ||
|
||
RUN apt-get update && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cwf/gateway/docker/c/Dockerfile
Outdated
ln -s /usr/sbin/bazelisk-linux-"${DEB_PORT}" /usr/sbin/bazel | ||
|
||
# Install dependencies required for building | ||
RUN apt-get update && apt-get install -y \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cwf/gateway/docker/c/Dockerfile
Outdated
# Add the magma apt repo | ||
COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc | ||
RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list | ||
RUN apt-get update && apt-get install -y \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENV LINUX_HEADERS_VER 5.4.0-186-generic | ||
|
||
## Install packages | ||
RUN apt-get -q update && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENV LINUX_HEADERS_VER 5.4.0-186-generic | ||
|
||
## Install packages | ||
RUN apt-get -q update && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
markdownlint
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
- You shall see the joined nodes with the command `kubectl get nodes`. |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
#### Deploying in single node |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
If you are running a single node cluster, make sure that the master node is available to the scheduler by untainting it. |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
```bash |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
``` |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
### 3. Install AGW |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
Follow the AGW Helm Deployment guide in `$MAGMA_ROOT/lte/gateway/deploy/agwc-helm-charts` directory. |
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
If you are deploying AGW in multiple workers, ensure the Node Selection is configured properly in the Helm charts deployment files. |
cwf/gateway/docker/c/Dockerfile
Outdated
ln -s /usr/sbin/bazelisk-linux-"${DEB_PORT}" /usr/sbin/bazel | ||
|
||
# Install dependencies required for building | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cwf/gateway/docker/c/Dockerfile
Outdated
# Add the magma apt repo | ||
COPY keys/linux_foundation_registry_key.asc /etc/apt/trusted.gpg.d/magma.asc | ||
RUN echo "deb https://linuxfoundation.jfrog.io/artifactory/magma-packages-test focal-ci main" > /etc/apt/sources.list.d/magma.list | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: Deploy AGW in Kubernetes | ||
hide_title: true | ||
--- | ||
# Deploy AGW in Kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "# Deploy AGW in Kubernetes"]
hide_title: true | ||
--- | ||
# Deploy AGW in Kubernetes | ||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## Prerequisites"]
hide_title: true | ||
--- | ||
# Deploy AGW in Kubernetes | ||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Prerequisites"]
Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. | ||
Optionally you can setup an ansible controller where you will run the deploy script or run it directly from the master node. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
|
||
The worker nodes must satisfy the following requirements: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
- aarch64 or 64bit-X86 machine. | ||
- Two ethernet ports. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
|
||
The interfaces are renamed to `eth0` and `eth1` during the deploy process. Interface `eth0` will carry any traffic that is not S1. That is,data plane traffic (SGi), control plane traffic (Orc8r HTTP2) and management (ssh). The interface `eth1` carries S1 traffic. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
|
||
|
||
> NOTE: | ||
> - Interface names might have different names on your hardware, so just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "> - Interface names might have..."]
|
||
- Configure ssh key access from the worker to the nodes for the `magma` user. | ||
|
||
- Add your master and worker nodes to the ansible inventory file at `$MAGMA_ROOT/lte/gateway/deploy/agw_k8s_hosts.yml`. Make sure that the `ansible_user` is set to `magma` and the `ansible_sudo_pass` password is right. Set local ansible connection for the master node if you are deploying from it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
hide_title: true | ||
--- | ||
# Deploy AGW in Kubernetes | ||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
## Prerequisites | |
## Prerequisites |
--- | ||
# Deploy AGW in Kubernetes | ||
## Prerequisites | ||
Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. | |
Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. |
Make sure you setup the master and the worker nodes. They must run Ubuntu Server 20.04 LTS, and the master node must have ssh key access to the worker nodes with the user `magma`. | ||
Optionally you can setup an ansible controller where you will run the deploy script or run it directly from the master node. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
|
||
The worker nodes must satisfy the following requirements: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
- aarch64 or 64bit-X86 machine. | ||
- Two ethernet ports. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
|
||
The interfaces are renamed to `eth0` and `eth1` during the deploy process. Interface `eth0` will carry any traffic that is not S1. That is,data plane traffic (SGi), control plane traffic (Orc8r HTTP2) and management (ssh). The interface `eth1` carries S1 traffic. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
|
||
|
||
> NOTE: | ||
> - Interface names might have different names on your hardware, so just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
> - Interface names might have different names on your hardware, so just | |
> | |
> - Interface names might have different names on your hardware, so just |
|
||
- Configure ssh key access from the worker to the nodes for the `magma` user. | ||
|
||
- Add your master and worker nodes to the ansible inventory file at `$MAGMA_ROOT/lte/gateway/deploy/agw_k8s_hosts.yml`. Make sure that the `ansible_user` is set to `magma` and the `ansible_sudo_pass` password is right. Set local ansible connection for the master node if you are deploying from it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint-fix] reported by reviewdog 🐶
- Add your master and worker nodes to the ansible inventory file at `$MAGMA_ROOT/lte/gateway/deploy/agw_k8s_hosts.yml`. Make sure that the `ansible_user` is set to `magma` and the `ansible_sudo_pass` password is right. Set local ansible connection for the master node if you are deploying from it. | |
- Add your master and worker nodes to the ansible inventory file at `$MAGMA_ROOT/lte/gateway/deploy/agw_k8s_hosts.yml`. Make sure that the `ansible_user` is set to `magma` and the `ansible_sudo_pass` password is right. Set local ansible connection for the master node if you are deploying from it. |
61c7744
to
560bf64
Compare
* Fixed magmad starting command to create MME/AMF config files upon start. * Added StorageClass and PersistentVolume objects needed for deployment * Set the Magma image repository URL to base jfrog address. Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
module The Init Container is responsible for loading the vport-gtp module into the host node. Signed-off-by: Bruno Faria <bruno.faria@ektrum.com>
* Added openvswitch Dockerfile and compose for running openvswitch in container Signed-off-by: Bruno Faria <bruno.faria@ektrum.com>
…yaml * The ovs image is build if the option "--profile ovs" is passed to docker compose * Added the ovs container healthcheck script Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
…interface during pod startup Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
…mentation Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
560bf64
to
140f71e
Compare
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
140f71e
to
81e9b79
Compare
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
@panyogesh, I'm struggling to fix some of the failing checks in the PR. They are related to go builds, but the PR didn't change anything at that level. Do you have any thoughts on that? |
Signed-off-by: Bruno Faria <brunohcfaria@gmail.com>
Blocked on #15573 |
Summary
This PR allows the deployment of Magma on the nodes without the requirement to prepare the nodes specially before the deployment.
This PR is also the implementation of the proposal discussed in PR #15357.
Following is a list of fatures provided by this PR:
Test Plan
Additional Information
Added a new docker image for openvswitch-switch service.
Security Considerations