What's on this page

OpenShift Origin

This section details how to set up a local OpenShift Origin (community distribution of OpenShift) all-in-one cluster and configure that cluster for installing Telco Network Cloud Orchestration (TNC-O).

Pre-requisites

OpenShift all-in-one set-up

This guide follows OpenShift Origin (version 3.11) documentation.

Docker

{
  "insecure-registries": [
    "172.30.0.0/16",
    "myregistry:5000"
  ]
}
sudo systemctl daemon-reload
sudo systemctl restart docker

Firewall

Ensure that your firewall allows access to the OpenShift master API (8443/tcp) and DNS (53/udp) endpoints. In RHEL and Fedora, you can create a new firewalld zone to enable this access:

docker network inspect -f "{{range .IPAM.Config }}{{ .Subnet }}{{end}}" bridge
firewall-cmd --permanent --new-zone dockerc
firewall-cmd --permanent --zone dockerc --add-source 172.17.0.0/16
firewall-cmd --permanent --zone dockerc --add-port 8443/tcp
firewall-cmd --permanent --zone dockerc --add-port 53/udp
firewall-cmd --permanent --zone dockerc --add-port 8053/udp
firewall-cmd --reload

OpenShift Client Tool

Start an OpenShift cluster

Run the following as a user that has permission to run Docker commands:

oc cluster up

Configuration

After your OpenShift cluster has been up, log in as system admin to perform further configuration steps:

oc login -u system:admin

Helm

TNC-O will be installed using Helm charts, so you would need Helm client and server:

oc project kube-system
oc process -f https://github.com/openshift/origin/raw/master/examples/helm/tiller-template.yaml -p TILLER_NAMESPACE=kube-system -p HELM_VERSION=v2.14.3 | oc create -f -
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:tiller

Security policies for TNC-O’s Foundation chart

These configuration steps only apply to Telco Network Cloud Orchestration (TNC-O) helm-foundation chart (version 2.1 GA).

oc adm policy add-scc-to-group anyuid system:authenticated
oc project myproject
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:default
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:foundation
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:foundation-nginx-ingress
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:foundation-elasticsearch-client
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:foundation-elasticsearch-data
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:foundation-elasticsearch-master

Local HostPath storage

OpenShift supports many Persistent Volume Types but in this case we’ll be looking at hostPath Persistent Volumes created by helm-foundation. Read more about TNC-O storage set-up here and helm inspect command on your helm-foundation chart. Default path on the host will be determined by the location from which you run the oc cluster up command, most likely $HOME/openshift.local.clusterup/openshift.local.pv/.

sudo mkdir -p $HOME/openshift.local.clusterup/openshift.local.pv/lm
sudo chmod -R 666 $HOME/openshift.local.clusterup/openshift.local.pv/lm
volumesInit:
  enabled: true
  hostPath: /home/<your-user>/openshift.local.clusterup/openshift.local.pv/lm

Notes and next steps