Вы находитесь на странице: 1из 8

This below ONAP setup has been done in OPNFV free UNH Lab servers.

We have configured ONAP in 3 nos. of Server

Server Hostname RAM HDD IP OS Remarks


Name
om Lab
1 UNH-8 rancher 500GB 1TB 10.10.100.18 Ubuntu Used for Rancher
16.04
2 UNH-31 node1 500GB 1TB 10.10.100.41 Ubuntu Used for
16.04 Kubernetes minion
3 UNH-32 master 500GB 1TB 10.10.100.42 Ubuntu Used for
16.04 Kubernetes Master

1)Modify “hostname” and “hosts” file.

Edit /etc/hostname file and modify respective hostname to above these server

Edit /etc/hosts file and enter all system IP’s and hostname

2)Run below command in Rancher system

(the sed command removes the line that replaces the root password)

wget https://onap.readthedocs.io/en/beijing/_downloads/openstack-rancher.sh
chmod +x openstack-rancher.sh
sed -i "/passwd root$/d" ./openstack-rancher.sh
./openstack-rancher.sh

3)Run below command in Kubernetes systems (master and minion)


wget https://onap.readthedocs.io/en/beijing/_downloads/openstack-k8s-node.sh
chmod +x openstack-k8s-node.sh
sed -i "/passwd root$/d" ./openstack-k8s-node.sh
./openstack-k8s-node.sh

4) K8S configuration via Rancher Dashboard

 Connect to the Rancher Dashboard at http://10.10.100.18:8080/env/1a5/apps/stacks


 Click on the Default environment in the top left corner and select "Manage
Environments".
 Select "Add Environment", use "onap" as the environment's name and select the
Kubernetes template. Click "Create".
 At the top left switch to the "onap" environment. Now in the "Infrastructure" tab click on
"Hosts" and on "Add Host". Two kubernetes hosts will be added in the infrastructure of
this environment one by one.
 Confirm that http://10.10.100.18:8080 should be used as an URL for API calls; click
"Save"
 Select "Custom" as a machine driver
 For each kubernetes system (Master and minion), enter (at Step 4) its IP address (e.g.
10.10.100.42 ), and at Step 5 click the “Copy to Clipboard” button and run the copied
command ( sudo docker run ... ) on respective system.
 After running on both systems, click "Close" in the Dashboard: this should take you to
the "Hosts" screen, and both machines should soon show up.

5) Configure Kubectl and Helm

In the Rancher Dashboard switch to the "Kubernetes" tab -> "CLI" and click "Generate
Config". Copy the configuration for instance by clicking "Copy to Clipboard".

Master:

Create ~/.kube/config (directory .kube may already exist) and paste the copied configuration into
the new "config" file.

#mkdir ~/.kube
#vi ~/.kube/config

Now test the kubectl connection with

kubectl config get-contexts


kubectl get pods --all-namespaces -o=wide

Validate helm is running the correct version and initiate Tiller

helm list # shows an error


helm init –upgrade

Make sure running helm version is v2.8.2

6) ONAP Deployment via OOM in kubernetes master node.


Master:

git clone -b beijing http://gerrit.onap.org/r/oom


cd oom/kubernetes
helm serve &
helm repo add local http://127.0.0.1:8879
helm repo list
make all
helm search –l
7) Now we can setup ONAP by running
helm install local/onap -n dev --namespace onap

To check the status of the pods, you can use either one of the following commands:

kubectl get pods --all-namespaces -o=wide

kubectl get pods --all-namespaces|grep -v Running

root@master:~# kubectl get svc -n onap | grep portal-app

portal-app LoadBalancer 10.43.43.114 10.10.100.42


8989:30215/TCP,8006:30213/TCP,8010:30214/TCP

(Note:- 10.10.100.42 is the load balancer IP of ONAP Portal-app)

8) Post-Deployment steps

Edit and add /etc/hosts file of master and minion node of kubernetes with following below details

10.10.100.42 portal.api.simpledemo.onap.org
10.10.100.42 vid.api.simpledemo.onap.org
10.10.100.42 sdc.api.fe.simpledemo.onap.org
10.10.100.42 portal-sdk.simpledemo.onap.org
10.10.100.42 policy.api.simpledemo.onap.org
10.10.100.42 aai.api.sparky.simpledemo.onap.org
10.10.100.42 cli.api.simpledemo.onap.org
10.10.100.42 msb.api.discovery.simpledemo.onap.org
10.10.100.42 portal-app.onap.org

9) Access ONAP Portal outside kubernetes system

Once user get connected with UNH Server through VPN . Next edit & add "hosts" file in user's system
with below details

10.10.100.42 portal.api.simpledemo.onap.org
10.10.100.42 vid.api.simpledemo.onap.org
10.10.100.42 sdc.api.fe.simpledemo.onap.org
10.10.100.42 portal-sdk.simpledemo.onap.org
10.10.100.42 policy.api.simpledemo.onap.org
10.10.100.42 aai.api.sparky.simpledemo.onap.org
10.10.100.42 cli.api.simpledemo.onap.org
10.10.100.42 msb.api.discovery.simpledemo.onap.org
10.10.100.42 portal-app.onap.org

Now ONAP Login URL can open in firefox mozilla browser-

http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm

User - demo and password - demo123456!

=================================

HOME

=====================================================================================

A&AI UI
====================================================================================

CLI

====================================================================================

Policy Editor
=====================================================================================

SDC

=====================================================================================

VID
=====================================================================================

XDemo App

Вам также может понравиться