...
Implementation
Deploying the RI
WIP
Jira | ||||||
---|---|---|---|---|---|---|
|
Deploy a Kubernetes cluster as normal via (No ONAP yet, just the K8S cluster) - ONAP on Kubernetes#InstallDocker/Rancher/Helm/Kubectl
Run the config and log pods
Code Block |
---|
clone oom
clone logging-analytics
./createConfig.sh -n onap
./createAll.bash -n onap -a log
# temp create config dirs
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ sudo mkdir /dockerdata-nfs/onap/logdemo
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ sudo mkdir /dockerdata-nfs/onap/logdemo/eteshare
# copy the logdemo folder into the oom folder
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ cp -R ../../../logdemo/ ../
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ ls ../logdemo/
#create the log demo
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ ./createAll.bash -n onap -a logdemo
********** Creating instance 1 of ONAP with port range 30200 and 30399
********** Creating ONAP:
********** Creating deployments for logdemo **********
Creating namespace **********
namespace "onap-logdemo" created
Creating service account **********
clusterrolebinding "onap-logdemo-admin-binding" created
Creating registry secret **********
secret "onap-docker-registry-key" created
Creating deployments and services **********
NAME: onap-logdemo
LAST DEPLOYED: Mon Jan 29 01:07:01 2018
NAMESPACE: onap
STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
logdemo NodePort 10.43.195.134 <none> 8080:30299/TCP 0s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
logdemo 1 1 1 0 0s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
logdemo-1873248906-7jgm9 0/1 ContainerCreating 0 0s
#check
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ kubectl get pods --all-namespaces | grep logdemo
onap-logdemo logdemo-4091951930-p0zcl 1/1 Running 0 43s
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ kubectl get services --all-namespaces -o wide | grep logdemo
onap-logdemo logdemo NodePort 10.43.98.104 <none> 8080:30299/TCP 57s app=logdemo
# test in-container and out-container
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ kubectl -n onap-logdemo exec -it logdemo-4091951930-zwd53 bash
root@logdemo-4091951930-zwd53:/usr/local/tomcat# ls webapps/
ROOT docs examples host-manager logging-demo logging-demo.war manager
root@logdemo-4091951930-zwd53:/usr/local/tomcat# curl http://127.0.0.1:8080/logging-demo/rest/read/test
testing: org.onap.demo.logging.ApplicationService@7a4fa9b
outside
ubuntu@ip-172-31-52-161:~/oom/kubernetes/oneclick$ curl http://dev.onap.info:30299/logging-demo/rest/read/test
testing: org.onap.demo.logging.ApplicationService@52772382
|
http://dev.onap.info:30299/logging-demo/rest/read/test
Kubernetes deployment of the RI
...