Skip to main content
Version: 1.4.X

Build Orchestrator

We'll build and publish Magma container images and Helm charts from source.

If this is your first time building Orchestrator, each step may take a while. We recommend continuing to the next step (Terraforming cloud resources) in a different shell and coming back to this section as each command completes.

Prerequisites

We assume MAGMA_ROOT is set as described in the deployment intro.

We'll go over how to publish images to Docker Hub and charts to a GitHub repo. For this you'll need

You can of course publish to a container registry or chart repository of your choice.

First, start up your Docker daemon then log in to the Docker Hub registry

$ docker login

Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: REGISTRY_USERNAME
Password:
Login Succeeded

Build and publish container images

We provide scripts to build and publish images. The publish script is provided as a starting point, as individual needs may vary.

First define some necessary variables

export PUBLISH=${MAGMA_ROOT}/orc8r/tools/docker/publish.sh  # or add to path
export REGISTRY=registry.hub.docker.com/REGISTRY # or desired registry
export MAGMA_TAG=1.4.0-master # or desired tag

Checkout the v1.4 release branch

cd ${MAGMA_ROOT}
git fetch origin
git checkout -b v1.4 origin/v1.4

Build and publish Orchestrator images

cd ${MAGMA_ROOT}/orc8r/cloud/docker
./build.py --all
for image in controller nginx ; do ${PUBLISH} -r ${REGISTRY} -i ${image} -v ${MAGMA_TAG} ; done

Build and publish NMS images

cd ${MAGMA_ROOT}/nms/app/packages/magmalte
docker-compose build magmalte
COMPOSE_PROJECT_NAME=magmalte ${PUBLISH} -r ${REGISTRY} -i magmalte -v ${MAGMA_TAG}

Build and publish Helm charts

We'll build the Orchestrator Helm charts, as well as publish them to a GitHub repo acting as a Helm chart repo.

To start, create a private GitHub repo to use as your Helm chart repo. We'll refer to this as GITHUB_REPO.

Define some necessary variables

export GITHUB_REPO=GITHUB_REPO_NAME
export GITHUB_REPO_URL=GITHUB_REPO_URL
export GITHUB_USERNAME=GITHUB_USERNAME
export GITHUB_ACCESS_TOKEN=GITHUB_ACCESS_TOKEN

Next we'll run the package script. This script will package and publish the necessary helm charts to the GITHUB_REPO. The script expects a deployment type to be provided, which will determine which orc8r modules are deployed. The valid deployment type options are

  • fwa
  • federated_fwa
  • all

Run the package script

$ ${MAGMA_ROOT}/orc8r/tools/helm/package.sh -d fwa  # or chosen deployment type

...

Uploaded orc8r charts successfully.