Setup infrastructure
Rancher
Create a plain Ubuntu VM in your cloud infrastructure.
The following specs are enough for Rancher
ID 3 VCPUs 2 RAM 4Go Taille 40Go Setup Rancher stable 1.6.10 by running this command:
Code Block docker run -d -p 8080:8080 rancher/server:v1.6.10
Navigate to Rancher UI
Code Block http://<rancher-vm-ip>:8080
- Setup basic access control: Admin → Access Control
- Install Openstack as machine driver: Admin → Machine Drivers
We're now all set to create our Kubernetes host.
Kubernetes on Rancher
see related ONAP on Kubernetes#QuickstartInstallation
...
- Create an environment
- Default → Managed Environments
- Click Add Environment
- Fill in the Name and the Description
- Select Kubernetes as Environment Template
- Click Create
- Create an API key: API → Keys
- Click Add Account API Key
- Fill in the Name and the Description
- Click Create
- Backup the Access Key and the Secret Key
- Retrieve your environment ID
- Navigate to the previously created environment
In the browser URL, you should see the following, containing your <env-id>
Code Block http://<rancher-vm-ip>:8080/env/<env-id>/kubernetes/dashboard
Create the Kubernetes host on OpenStack. Make sure to fill in the placeholder as follow:
{API_ACCESS_KEY}: The API KEY created in the previous step
{API_SECRET_KEY}: The API Secret created in the previous step
{OPENSTACK_INSTANCE}: The OpenStack Instance Name to give to your K8S VM
{OPENSTACK_IP}: The IP of your OpenStack deployment
{RANCHER_IP}: The IP of the Rancher VM created previously
{K8S_FLAVOR}: The Flavor to use for the kubernetes VM. Recommanded specs:VCPUs 8 RAM 64Go Taille 100Go Swap 16GO I added some swap because in ONAP, most of the app are not always active, most of them are idle, so it's fine to let the host store dirty page in the swap memory.
{UBUNTU_1604}: The Ubuntu 16.04 image
{PRIVATE_NETWORK_NAME}: a private network
{OPENSTACK_TENANT_NAME}: Openstack tenant
{OPENSTACK_USERNAME}: Openstack username
{OPENSTACK_PASSWORD}: OpenStack passwordCode Block curl -u "{API_ACCESS_KEY}:{API_SECRET_KEY}" \ -X POST \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "hostname":"{OPENSTACK_INSTANCE}", "engineInstallUrl":"wget https://raw.githubusercontent.com/rancher/install-docker/master/1.12.6.sh", "openstackConfig":{ "authUrl":"http://{OPENSTACK_IP}:5000/v3", "domainName":"Default", "endpointType":"adminURL", "flavorName":"{K8S_FLAVOR}", "imageName":"{UBUNTU_1604}", "netName":"{PRIVATE_NETWORK_NAME}", "password":"{OPENSTACK_PASSWORD}", "sshUser":"ubuntu", "tenantName":"{OPENSTACK_TENANT_NAME}", "username":"{OPENSTACK_USERNAME}"} }' \ 'http://{RANCHER_IP}:8080/v2-beta/projects/{ENVIRONMENT_ID}/hosts/'
- Let's wait a few minutes until it's ready.
- Get your kubectl config
- Click Kubernetes → CLI
- Click Generate Config
Copy/Paste in your host, under
Code Block ~/.kube/config
If you have multiple Kubernetes environments, you can give it a different name, instead of config. Then reference all your kubectl config in your bash_profile as follow
Code Block KUBECONFIG=\ /Users/adetalhouet/.kube/k8s.adetalhouet1.env:\ /Users/adetalhouet/.kube/k8s.adetalhouet2.env:\ /Users/adetalhouet/.kube/k8s.adetalhouet3.env export KUBECONFIG
Make your kubectl use this new environment
Code Block kubectl config use-context <environment-name>
After a little bit, you're environment should be ready. To verify, use the following command
Code Block $ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system heapster-4285517626-4dst0 1/1 Running 0 4m kube-system kube-dns-638003847-lx9f2 3/3 Running 0 4m kube-system kubernetes-dashboard-716739405-f0kgq 1/1 Running 0 4m kube-system monitoring-grafana-2360823841-0hm22 1/1 Running 0 4m kube-system monitoring-influxdb-2323019309-4mh1k 1/1 Running 0 4m kube-system tiller-deploy-737598192-8nb31 1/1 Running 0 4m
Deploy OOM
Video describing all the steps
View file | ||||||
---|---|---|---|---|---|---|
|
We will basically follow this guide: http://onap.readthedocs.io/en/latest/submodules/oom.git/docs/OOM%20User%20Guide/oom_user_guide.html?highlight=oom
Clone OOM amsterdam branch
Code Block git clone -b amsterdam https://gerrit.onap.org/r/p/oom.git
- Prepare configuration
Edit the onap-parameters.yaml under
Code Block oom/kubernetes/config
TODO - Add explanationTo have endpoints registering to MSB, add your kubectl config token in kube2msb config, under kubeMasterAuthToken located at
Code Block oom/kubernetes/kube2msb/values.yaml
Create the config
Code Block cd oom/kubernetes/config ./createConfig.sh -n onap
TODO - Add explanationDeploy ONAP
Code Block cd oom/kubernetes/oneclick ./createAll.bash -n onap
- Now, time for a break. This will take arround 30/40 minutes.
After 45mn, everything is ready
Code Block $ kubectl get pods --all-namespaces
Result:
Code Block collapse true $ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system heapster-4285517626-n5b57 1/1 Running 0 55m kube-system kube-dns-638003847-px0s1 3/3 Running 0 55m kube-system kubernetes-dashboard-716739405-llh0w 1/1 Running 0 55m kube-system monitoring-grafana-2360823841-tn80f 1/1 Running 0 55m kube-system monitoring-influxdb-2323019309-34ml1 1/1 Running 0 55m kube-system tiller-deploy-737598192-k2ttl 1/1 Running 0 55m onap-aaf aaf-1993711932-0xcdt 0/1 Running 0 46m onap-aaf aaf-cs-1310404376-6zjjh 1/1 Running 0 46m onap-aai aai-resources-1412762642-kh8r0 2/2 Running 0 47m onap-aai aai-service-749944520-t87vn 1/1 Running 0 47m onap-aai aai-traversal-3084029645-x29p6 2/2 Running 0 47m onap-aai data-router-3434587794-hj9b3 1/1 Running 0 47m onap-aai elasticsearch-622738319-m85sn 1/1 Running 0 47m onap-aai hbase-1949550546-lncls 1/1 Running 0 47m onap-aai model-loader-service-4144225433-0m8sp 2/2 Running 0 47m onap-aai search-data-service-378072033-sfrnd 2/2 Running 0 47m onap-aai sparky-be-3094577325-902jg 2/2 Running 0 47m onap-appc appc-1828810488-xg5k3 2/2 Running 0 47m onap-appc appc-dbhost-2793739621-ckxrf 1/1 Running 0 47m onap-appc appc-dgbuilder-2298093128-qd4b4 1/1 Running 0 47m onap-clamp clamp-2211988013-qwkvl 1/1 Running 0 46m onap-clamp clamp-mariadb-1812977665-mp89r 1/1 Running 0 46m onap-cli cli-595710742-wj4mg 1/1 Running 0 47m onap-consul consul-agent-3312409084-kv21c 1/1 Running 1 47m onap-consul consul-server-1173049560-966zr 1/1 Running 0 47m onap-consul consul-server-1173049560-d656s 1/1 Running 1 47m onap-consul consul-server-1173049560-k41w3 1/1 Running 0 47m onap-dcaegen2 dcaegen2 1/1 Running 0 47m onap-kube2msb kube2msb-registrator-1359309322-p60lx 1/1 Running 0 46m onap-log elasticsearch-1942187295-mtw6l 1/1 Running 0 47m onap-log kibana-3372627750-k8q6p 1/1 Running 0 47m onap-log logstash-1708188010-2vpd1 1/1 Running 0 47m onap-message-router dmaap-3126594942-vnj5w 1/1 Running 0 47m onap-message-router global-kafka-666408702-1z9c5 1/1 Running 0 47m onap-message-router zookeeper-624700062-kvk1m 1/1 Running 0 47m onap-msb msb-consul-3334785600-nz1zt 1/1 Running 0 47m onap-msb msb-discovery-196547432-pqs3g 1/1 Running 0 47m onap-msb msb-eag-1649257109-nl11h 1/1 Running 0 47m onap-msb msb-iag-1033096170-6cx7t 1/1 Running 0 47m onap-mso mariadb-829081257-q90fd 1/1 Running 0 47m onap-mso mso-3784963895-brdxx 2/2 Running 0 47m onap-multicloud framework-2273343137-nnvr5 1/1 Running 0 47m onap-multicloud multicloud-ocata-1517639325-gwkjr 1/1 Running 0 47m onap-multicloud multicloud-vio-4239509896-zxmvx 1/1 Running 0 47m onap-multicloud multicloud-windriver-3629763724-993qk 1/1 Running 0 47m onap-policy brmsgw-1909438199-k2ppk 1/1 Running 0 47m onap-policy drools-2600956298-p9t68 2/2 Running 0 47m onap-policy mariadb-2660273324-lj0ts 1/1 Running 0 47m onap-policy nexus-3663640793-pgf51 1/1 Running 0 47m onap-policy pap-466625067-2hcxb 2/2 Running 0 47m onap-policy pdp-2354817903-65rnb 2/2 Running 0 47m onap-portal portalapps-1783099045-prvmp 2/2 Running 0 47m onap-portal portaldb-3181004999-0t228 2/2 Running 0 47m onap-portal portalwidgets-2060058548-w6hr9 1/1 Running 0 47m onap-portal vnc-portal-3680188324-b22zq 1/1 Running 0 47m onap-robot robot-2551980890-cw3vj 1/1 Running 0 47m onap-sdc sdc-be-2336519847-hcs6h 2/2 Running 0 47m onap-sdc sdc-cs-1151560586-sfkf0 1/1 Running 0 47m onap-sdc sdc-es-2438522492-cw6rj 1/1 Running 0 47m onap-sdc sdc-fe-2862673798-lplcx 2/2 Running 0 47m onap-sdc sdc-kb-1258596734-43lf7 1/1 Running 0 47m onap-sdnc sdnc-1395102659-rd27h 2/2 Running 0 47m onap-sdnc sdnc-dbhost-3029711096-vl2jg 1/1 Running 0 47m onap-sdnc sdnc-dgbuilder-4267203648-bb828 1/1 Running 0 47m onap-sdnc sdnc-portal-2558294154-3nh31 1/1 Running 0 47m onap-uui uui-4267149477-bqt0r 1/1 Running 0 46m onap-uui uui-server-3441797946-dx683 1/1 Running 0 46m onap-vfc vfc-catalog-840807183-lx4d0 1/1 Running 0 46m onap-vfc vfc-emsdriver-2936953408-fb2pf 1/1 Running 0 46m onap-vfc vfc-gvnfmdriver-2866216209-k5t1t 1/1 Running 0 46m onap-vfc vfc-hwvnfmdriver-2588350680-bpglx 1/1 Running 0 46m onap-vfc vfc-jujudriver-406795794-ttp9p 1/1 Running 0 46m onap-vfc vfc-nokiavnfmdriver-1760240499-xm0qk 1/1 Running 0 46m onap-vfc vfc-nslcm-3756650867-1dnr0 1/1 Running 0 46m onap-vfc vfc-resmgr-1409642779-0603z 1/1 Running 0 46m onap-vfc vfc-vnflcm-3340104471-xsk72 1/1 Running 0 46m onap-vfc vfc-vnfmgr-2823857741-r04xj 1/1 Running 0 46m onap-vfc vfc-vnfres-1792029715-ls480 1/1 Running 0 46m onap-vfc vfc-workflow-3450325534-flwtw 1/1 Running 0 46m onap-vfc vfc-workflowengineactiviti-4110617986-mvlgl 1/1 Running 0 46m onap-vfc vfc-ztesdncdriver-1452986549-c59jb 1/1 Running 0 46m onap-vfc vfc-ztevmanagerdriver-2080553526-wdxwq 1/1 Running 0 46m onap-vid vid-mariadb-3318685446-hmf2q 1/1 Running 0 47m onap-vid vid-server-2994633010-x3t74 2/2 Running 0 47m onap-vnfsdk postgres-436836560-cl2dz 1/1 Running 0 46m onap-vnfsdk refrepo-1924147637-wft62 1/1 Running 0 46m
Let's run health check to see current status, with the expected failure for DCAE, as it's now deployed.
Code Block cd oom/kubernetes/robot $ ./ete-k8s.sh health
Result:
Code Block collapse true Starting Xvfb on display :88 with res 1280x1024x24 Executing robot tests at log level TRACE ============================================================================== OpenECOMP ETE ============================================================================== OpenECOMP ETE.Robot ============================================================================== OpenECOMP ETE.Robot.Testsuites ============================================================================== OpenECOMP ETE.Robot.Testsuites.Health-Check :: Testing ecomp components are... ============================================================================== Basic DCAE Health Check [ WARN ] Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffa61dbfa50>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /healthcheck [ WARN ] Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffa61dbf650>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /healthcheck [ WARN ] Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffa5fe40510>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /healthcheck | FAIL | ConnectionError: HTTPConnectionPool(host='dcae-controller.onap-dcae', port=8080): Max retries exceeded with url: /healthcheck (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffa619bf7d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)) ------------------------------------------------------------------------------ Basic SDNGC Health Check | PASS | ------------------------------------------------------------------------------ Basic A&AI Health Check | PASS | ------------------------------------------------------------------------------ Basic Policy Health Check | PASS | ------------------------------------------------------------------------------ Basic MSO Health Check | PASS | ------------------------------------------------------------------------------ Basic ASDC Health Check | PASS | ------------------------------------------------------------------------------ Basic APPC Health Check | PASS | ------------------------------------------------------------------------------ Basic Portal Health Check | PASS | ------------------------------------------------------------------------------ Basic Message Router Health Check | PASS | ------------------------------------------------------------------------------ Basic VID Health Check | PASS | ------------------------------------------------------------------------------ Basic Microservice Bus Health Check | PASS | ------------------------------------------------------------------------------ Basic CLAMP Health Check | PASS | ------------------------------------------------------------------------------ catalog API Health Check | PASS | ------------------------------------------------------------------------------ emsdriver API Health Check | PASS | ------------------------------------------------------------------------------ gvnfmdriver API Health Check | PASS | ------------------------------------------------------------------------------ huaweivnfmdriver API Health Check | PASS | ------------------------------------------------------------------------------ multicloud API Health Check | PASS | ------------------------------------------------------------------------------ multicloud-ocata API Health Check | PASS | ------------------------------------------------------------------------------ multicloud-titanium_cloud API Health Check | PASS | ------------------------------------------------------------------------------ multicloud-vio API Health Check | PASS | ------------------------------------------------------------------------------ nokiavnfmdriver API Health Check | PASS | ------------------------------------------------------------------------------ nslcm API Health Check | PASS | ------------------------------------------------------------------------------ resmgr API Health Check | PASS | ------------------------------------------------------------------------------ usecaseui-gui API Health Check | PASS | ------------------------------------------------------------------------------ vnflcm API Health Check | PASS | ------------------------------------------------------------------------------ vnfmgr API Health Check | PASS | ------------------------------------------------------------------------------ vnfres API Health Check | PASS | ------------------------------------------------------------------------------ workflow API Health Check | PASS | ------------------------------------------------------------------------------ ztesdncdriver API Health Check | PASS | ------------------------------------------------------------------------------ ztevmanagerdriver API Health Check | PASS | ------------------------------------------------------------------------------ OpenECOMP ETE.Robot.Testsuites.Health-Check :: Testing ecomp compo... | FAIL | 30 critical tests, 29 passed, 1 failed 30 tests total, 29 passed, 1 failed ============================================================================== OpenECOMP ETE.Robot.Testsuites | FAIL | 30 critical tests, 29 passed, 1 failed 30 tests total, 29 passed, 1 failed ============================================================================== OpenECOMP ETE.Robot | FAIL | 30 critical tests, 29 passed, 1 failed 30 tests total, 29 passed, 1 failed ============================================================================== OpenECOMP ETE | FAIL | 30 critical tests, 29 passed, 1 failed 30 tests total, 29 passed, 1 failed ============================================================================== Output: /share/logs/ETE_46070/output.xml Log: /share/logs/ETE_46070/log.html Report: /share/logs/ETE_46070/report.html command terminated with exit code 1
Let's run the init_robot script, that will enable us to check the robot logs
Code Block cd oom/kubernetes/robot $ ./demo-k8s.sh init_robot
Result:
Code Block collapse true WEB Site Password for user 'test': Starting Xvfb on display :89 with res 1280x1024x24 Executing robot tests at log level TRACE ============================================================================== OpenECOMP ETE ============================================================================== OpenECOMP ETE.Robot ============================================================================== OpenECOMP ETE.Robot.Testsuites ============================================================================== OpenECOMP ETE.Robot.Testsuites.Update Onap Page :: Initializes ONAP Test We... ============================================================================== Update ONAP Page | PASS | ------------------------------------------------------------------------------ OpenECOMP ETE.Robot.Testsuites.Update Onap Page :: Initializes ONA... | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot.Testsuites | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Output: /share/logs/demo/UpdateWebPage/output.xml Log: /share/logs/demo/UpdateWebPage/log.html Report: /share/logs/demo/UpdateWebPage/report.html
Navigate to
Code Block <kubernetes-vm-ip>:30209
and to see the robot logs, go to
Code Block <kubernetes-vm-ip>:30209/logs/
Let's run the init goal
Code Block cd oom/kubernetes/robot $ ./demo-k8s.sh init
Result:
Code Block collapse true Starting Xvfb on display :89 with res 1280x1024x24 Executing robot tests at log level TRACE ============================================================================== OpenECOMP ETE ============================================================================== OpenECOMP ETE.Robot ============================================================================== OpenECOMP ETE.Robot.Testsuites ============================================================================== OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestration Test ... ============================================================================== Initialize Customer And Models | PASS | ------------------------------------------------------------------------------ OpenECOMP ETE.Robot.Testsuites.Demo :: Executes the VNF Orchestrat... | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot.Testsuites | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE.Robot | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== OpenECOMP ETE | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Output: /share/logs/demo/InitDemo/output.xml Log: /share/logs/demo/InitDemo/log.html Report: /share/logs/demo/InitDemo/report.html