Helm chartv1.5.13App 1.4BSD-3-ClauseVerified publisher

A Helm chart for magma orchestrator

About this chart

Orchestrator Helm Deployment

The contents of this README have been moved to the "Deploying Orchestrator" section of the docs: https://magma.github.io/magma.

If you're running locally in Minikube, see the section below.

Configuration

The following table list the configurable parameters of the orchestrator chart and their default values.

ParameterDescriptionDefault
imagePullSecretsReference to one or more secrets to be used when pulling images.[]
secrets.createCreate orchestrator secrets. See charts/secrets subchart.false
secret.certsSecret name containing orchestrator certs.orc8r-secrets-certs
secret.configsSecret name containing orchestrator configs.orc8r-secrets-configs
secret.envdirSecret name containing orchestrator envdir.orc8r-secrets-envdir
proxy.podDisruptionBudget.enabledEnables creation of a PodDisruptionBudget for proxy.false
proxy.podDisruptionBudget.minAvailableMinimum number / percentage of pods that should remain scheduled.1
proxy.podDisruptionBudget.maxUnavailableMaximum number / percentage of pods that may be made unavailable.""
proxy.service.enabledEnables proxy service.true
proxy.service.lagacyEnabledEnables proxy legacy service.true
proxy.service.annotationsAnnotations to be added to the proxy service.{}
proxy.service.extraAnnotations.bootstrapLagacyExtra annotations to be added to the bootstrap-legacy proxy service.{}
proxy.service.extraAnnotations.clientcertLegacyExtra annotations to be added to the clientcert-legacy proxy service.{}
proxy.service.labelsProxy service labels.{}
proxy.service.typeProxy service type.ClusterIP
proxy.service.port.clientcert.portProxy client certificate service external port.9443
proxy.service.port.clientcert.targetPortProxy client certificate service internal port.9443
proxy.service.port.clientcert.nodePortProxy client certificate service node port.nil
proxy.service.port.open.portProxy open service external port.9444
proxy.service.port.open.targetPortProxy open service internal port.9444
proxy.service.port.open.nodePortProxy open service node port.nil
proxy.image.repositoryRepository for orchestrator proxy image.nil
proxy.image.tagTag for orchestrator proxy image.latest
proxy.image.pullPolicyPull policy for orchestrator proxy image.IfNotPresent
proxy.spec.hostnameMagma controller domain name.""
proxy.replicasNumber of instances to deploy for orchestrator proxy.1
proxy.resourcesDefine resources requests and limits for Pods.{}
proxy.nodeSelectorDefine which Nodes the Pods are scheduled on.{}
proxy.tolerationsIf specified, the pod's tolerations.[]
proxy.affinityAssign the orchestrator proxy to run on specific nodes.{}
controller.podDisruptionBudget.enabledEnables creation of a PodDisruptionBudget for proxy.false
controller.podDisruptionBudget.minAvailableMinimum number / percentage of pods that should remain scheduled.1
controller.podDisruptionBudget.maxUnavailableMaximum number / percentage of pods that may be made unavailable.""
controller.service.annotationsAnnotations to be added to the controller service.{}
controller.service.labelsController service labels.{}
controller.service.typeController service type.ClusterIP
controller.service.portController web service external port.8080
controller.service.targetPortController web service internal port.8080
controller.service.portStartController service port range start.9079
controller.service.portEndController service inclusive port range end.9108
controller.image.repositoryRepository for orchestrator controller image.nil
controller.image.tagTag for orchestrator controller image.latest
controller.image.pullPolicyPull policy for orchestrator controller image.IfNotPresent
controller.spec.database.driverorc8r database name.mysql/postgres
controller.spec.database.sql_dialectdatabase dialect name.maria/psql
controller.spec.database.dborc8r database name.magma
controller.spec.database.hostdatabase host.postgresql
controller.spec.database.portdatabase port.5432
controller.spec.database.userDatabase username.postgres
controller.spec.database.passDatabase password.postgres
controller.replicasNumber of instances to deploy for orchestrator controller.1
controller.resourcesDefine resources requests and limits for Pods.{}
controller.nodeSelectorDefine which Nodes the Pods are scheduled on.{}
controller.tolerationsIf specified, the pod's tolerations.[]
controller.affinityAssign the orchestrator proxy to run on specific nodes.{}
nms.enabledIf true, deploy the nms sub-charttrue
nms.nginx.createEnable nms nginx service.true
nms.magmalte.createEnable nms magmalte app.true
nms.rbacEnable rbac for nginx and magmalte app.false
logging.enabledIf true, deploy the logging sub-charttrue

Running in Minikube

For the most part, you'll still follow the docs. Here's what you should do before doing that.

  • Start Minikube with 8192 MB of memory and 4 CPUs. This example uses Kuberenetes version 1.14.1 and uses Minikube Hypervisor Driver:
$ minikube start --memory=8192 --cpus=4 --kubernetes-version=v1.14.1 --mount --mount-string "<path-to-metrics-configs>:/configs"
  • Install Postgres Helm chart:
$ helm install \
    --name postgresql \
    --namespace magma \
    --set postgresqlPassword=postgres,postgresqlDatabase=magma,fullnameOverride=postgresql \
    bitnami/postgresql

Note: If the postgresql pod is crashing with error : unable to write to directory /bitnami/..., redeploy with --values=<vals.yml>:

volumePermissions:
  enabled: true
  • Copy orchestrator secrets (this replaces the secret management steps for the deployment guide):
cd magma/orc8r/cloud/helm/orc8r
mkdir -p charts/secrets/.secrets/certs
# You need to add the following files to the certs directory:
#   bootstrapper.key certifier.key certifier.pem vpn_ca.crt vpn_ca.key
#   admin_operator.pem admin_operator.key.pem nms_nginx.pem nms_nginx.key.pem
#   controller.crt controller.key rootCA.pem
# The controller.crt, controller.key and rootCA.pem are the certificate info
# for your public domain name.
# For local testing, you can do the following after running Orc8r using docker:
cp -r ../../../../.cache/test_certs/* charts/secrets/.secrets/certs/.
  • Add the admin in the datastore:
kubectl exec -it -n magma \
    $(kubectl get pod -n magma -l app.kubernetes.io/component=controller -o jsonpath="{.items[0].metadata.name}") -- \
    /var/opt/magma/bin/accessc add-existing -admin -cert /var/opt/magma/certs/admin_operator.pem admin_operator
  • Port forward traffic to orchestrator nginx proxy:
kubectl port-forward -n magma svc/orc8r-nginx-proxy 8443:8443

# If using minikube, run:
minikube service orc8r-nginx-proxy -n magma --https
  • Orchestrator proxy should be reachable via https://localhost:8443 and requires magma client certificate to be installed on browser.

Deploy orc8r with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has orc8r on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartorc8r is pinned at v1.5.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply