blob: e9215c29c65993c34c0c5874736c9c6de803f756 [file] [log] [blame]
VENKATESH KUMAR7f3e4532020-11-18 16:30:36 -05001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. _dl-installation:
4
Kate Hsuan7e6e7602020-03-26 14:15:13 +08005Deployment Steps
Kai6c9735a2020-11-13 17:03:52 +08006
Kate Hsuan7e6e7602020-03-26 14:15:13 +08007################
Kai6c9735a2020-11-13 17:03:52 +08008DL-handler consists of three pods- the feeder, admin UI and des. It can be deployed by using cloudify blueprint. Datalake can be easily deployed through DCAE cloudify manager. The following steps guides you launch Datalake though cloudify manager.
Guobiao Mobb94cb72020-02-11 17:14:33 -08009
Kate Hsuan7e6e7602020-03-26 14:15:13 +080010Pre-requisite
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050011-------------
Niranjana25c8aa02021-05-07 11:18:09 +053012Make sure dcae postgres is properly deployed and functional.
Kai6c9735a2020-11-13 17:03:52 +080013An external database, such as Elasticsearch and MongoDB is deployed. Install mongodb through the following command.
14
15 #docker run -itd --restart=always --name dl-mongo -p 27017:27017 mongo
16
17For DES service deployment, presto service is deployed. Here is a sample how presto deploy in the environment.
18 Build a presto image:
19 The package of presto version we are using is v0.0.2:presto-v0.0.2.tar.gz
20
21 #docker build -t presto:v0.0.2 .
22 #docker tag presto:v0.0.2 registry.baidubce.com/onap/presto:v0.0.2
23 #docker push registry.baidubce.com/onap/presto:v0.0.2
24
25 Note: Replace the repository path with your own repository.
26
27 Install presto service:
28
29 #kubectl -n onap run dl-presto --image=registry.baidubce.com/onap/presto:v0.0.2 --env="MongoDB_IP=192.168.235.11" --env="MongoDB_PORT=27017"
30 #kubectl -n onap expose deployment dl-presto --port=9000 --target-port=9000 --type=NodePort
31
32 Note: MonoDB_IP and Mongo_PORT you can replace this two values with your own configuration.
Kate Hsuan7e6e7602020-03-26 14:15:13 +080033
34After datalake getting deployed, the admin UI can be used to configure the sink database address and credentials.
35
36Log-in to the DCAE Bootstrap POD
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050037--------------------------------
Kate Hsuan7e6e7602020-03-26 14:15:13 +080038
39First, we should find the bootstrap pod name through the following command and make sure that DCAE coudify manager is properly deployed.
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050040 .. image :: ./images/bootstrap-pod.png
Kate Hsuan7e6e7602020-03-26 14:15:13 +080041
42Login to the DCAE bootstrap pod through the following command.
43 .. code-block :: bash
44
45 #kubectl exec -it <DCAE bootstrap pod> /bin/bash -n onap
46
47Validate Blueprint
Kai6c9735a2020-11-13 17:03:52 +080048------------------
49Before the blueprints uploading to Cloudify manager, the blueprints shoule be validated first through the following command.
Kate Hsuan7e6e7602020-03-26 14:15:13 +080050 .. code-block :: bash
51
52 #cfy blueprint validate /bluerints/k8s-datalake-feeder.yaml
53 #cfy blueprint validate /blueprints/k8s-datalake-admin-ui.yaml
Kai6c9735a2020-11-13 17:03:52 +080054 #cfy blueprint validate /blueprints/k8s-datalake-des.yaml
Kate Hsuan7e6e7602020-03-26 14:15:13 +080055
56Upload the Blueprint to Cloudify Manager.
57-----------------------------------------
58After validating, we can start to proceed blueprints uploading.
59 .. code-block :: bash
60
Kai6c9735a2020-11-13 17:03:52 +080061 #cfy blueprint upload -b dl-feeder /bluerints/k8s-datalake-feeder.yaml
62 #cfy blueprint upload -b dl-admin-ui /blueprints/k8s-datalake-admin-ui.yaml
63 #cfy blueprint upload -b des /blueprints/k8s-datalake-des.yaml
Kate Hsuan7e6e7602020-03-26 14:15:13 +080064
65Verify Uploaded Blueprints
66--------------------------
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050067Using "cfy blueprint list" to verify your work.
Kate Hsuan7e6e7602020-03-26 14:15:13 +080068 .. code-block :: bash
69
70 #cfy blueprint list
71
72You can see the following returned message to show the blueprints have been correctly uploaded.
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050073 .. image :: ./images/blueprint-list.png
Kate Hsuan7e6e7602020-03-26 14:15:13 +080074
75
76Verify Plugin Versions
VENKATESH KUMARe21c8482020-11-12 15:00:02 -050077----------------------
Kate Hsuan7e6e7602020-03-26 14:15:13 +080078If the version of the plugin used is different, update the blueprint import to match.
79 .. code-block :: bash
80
81 #cfy plugins list
82
83Create Deployment
84-----------------
85Here we are going to create deployments for both feeder and admin UI.
86 .. code-block :: bash
87
Kai6c9735a2020-11-13 17:03:52 +080088 #cfy deployments create -b dl-feeder feeder-deploy
89 #cfy deployments create -b dl-admin-ui admin-ui-deploy
90 #cfy deployments create -b des des
Kate Hsuan7e6e7602020-03-26 14:15:13 +080091
92Launch Service
Kai6c9735a2020-11-13 17:03:52 +080093--------------
Kate Hsuan7e6e7602020-03-26 14:15:13 +080094Next, we are going to launch the datalake.
95 .. code-block :: bash
96
97 #cfy executions start -d feeder-deploy install
98 #cfy executions start -d admin-ui-deploy install
Kai6c9735a2020-11-13 17:03:52 +080099 #cfy executions start -d des install
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800100
101
102Verify the Deployment Result
Kai6c9735a2020-11-13 17:03:52 +0800103----------------------------
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800104The following command can be used to list the datalake logs.
VENKATESH KUMARe21c8482020-11-12 15:00:02 -0500105
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800106 .. code-block :: bash
VENKATESH KUMARe21c8482020-11-12 15:00:02 -0500107
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800108 #kubectl logs <datalake-pod> -n onap
109
110The output should looks like.
VENKATESH KUMARe21c8482020-11-12 15:00:02 -0500111 .. image :: ./images/feeder-log.png
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800112
Kai6c9735a2020-11-13 17:03:52 +0800113The des output should looks like.
114 .. image :: ./des-log.png
115
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800116If you find any Java exception from log, make sure that the external database and datalake configuration are properly configured.
117Admin UI can be used to configure the external database configuration.
118
119
120Uninstall
Kai6c9735a2020-11-13 17:03:52 +0800121---------
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800122Uninstall running component and delete deployment
123 .. code-block :: bash
124
125 #cfy uninstall feeder-deploy
126 #cfy uninstall admin-ui-deploy
Kai6c9735a2020-11-13 17:03:52 +0800127 #cfy uninstall des
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800128
129Delete Blueprint
Kai6c9735a2020-11-13 17:03:52 +0800130----------------
Kate Hsuan7e6e7602020-03-26 14:15:13 +0800131 .. code-block :: bash
132
Kai6c9735a2020-11-13 17:03:52 +0800133 #cfy blueprints delete dl-feeder
134 #cfy blueprints delett dl-admin-ui
135 #cfy blueprints delete des