Add des rst
[dcaegen2.git] / docs / sections / services / datalake-handler / installation.rst
1 Deployment Steps
2
3 ################
4 DL-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.
5
6 Pre-requisite
7 -------------
8 Make sure mariadb-galera from OOM is properly deployed and functional.
9 An external database, such as Elasticsearch and MongoDB is deployed. Install mongodb through the following command.
10
11      #docker run -itd --restart=always --name dl-mongo -p 27017:27017 mongo
12
13 For DES service deployment, presto service is deployed. Here is a sample how presto deploy in the environment.
14     Build a presto image:
15       The package of presto version we are using is v0.0.2:presto-v0.0.2.tar.gz 
16
17         #docker build -t presto:v0.0.2 .
18         #docker tag presto:v0.0.2 registry.baidubce.com/onap/presto:v0.0.2
19         #docker push registry.baidubce.com/onap/presto:v0.0.2
20
21     Note: Replace the repository path with your own repository. 
22     
23     Install presto service:
24
25         #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" 
26         #kubectl -n onap expose deployment dl-presto --port=9000 --target-port=9000 --type=NodePort
27
28     Note: MonoDB_IP and Mongo_PORT you can replace this two values with your own configuration.
29
30 After datalake getting deployed, the admin UI can be used to configure the sink database address and credentials.
31
32 Log-in to the DCAE Bootstrap POD
33 --------------------------------
34
35 First, we should find the bootstrap pod name through the following command and make sure that DCAE coudify manager is properly deployed.
36   .. image :: ./images/bootstrap-pod.png
37
38 Login to the DCAE bootstrap pod through the following command.
39   .. code-block :: bash
40
41      #kubectl exec -it <DCAE bootstrap pod> /bin/bash -n onap
42
43 Validate Blueprint
44 ------------------
45 Before the blueprints uploading to Cloudify manager, the blueprints shoule be validated first through the following command.
46   .. code-block :: bash
47
48     #cfy blueprint validate /bluerints/k8s-datalake-feeder.yaml
49     #cfy blueprint validate /blueprints/k8s-datalake-admin-ui.yaml
50     #cfy blueprint validate /blueprints/k8s-datalake-des.yaml
51
52 Upload the Blueprint to Cloudify Manager.
53 -----------------------------------------
54 After validating, we can start to proceed blueprints uploading.
55   .. code-block :: bash
56
57      #cfy blueprint upload -b dl-feeder /bluerints/k8s-datalake-feeder.yaml
58      #cfy blueprint upload -b dl-admin-ui /blueprints/k8s-datalake-admin-ui.yaml
59      #cfy blueprint upload -b des /blueprints/k8s-datalake-des.yaml
60
61 Verify Uploaded Blueprints
62 --------------------------
63 Using "cfy blueprint list" to verify your work.
64   .. code-block :: bash
65
66      #cfy blueprint list
67
68 You can see the following returned message to show the blueprints have been correctly uploaded.
69   .. image :: ./images/blueprint-list.png
70
71
72 Verify Plugin Versions
73 ----------------------
74 If the version of the plugin used is different, update the blueprint import to match.
75   .. code-block :: bash
76
77      #cfy plugins list
78
79 Create Deployment
80 -----------------
81 Here we are going to create deployments for both feeder and admin UI.
82   .. code-block :: bash
83
84      #cfy deployments create -b dl-feeder feeder-deploy
85      #cfy deployments create -b dl-admin-ui admin-ui-deploy
86      #cfy deployments create -b des des
87
88 Launch Service
89 --------------
90 Next, we are going to launch the datalake.
91   .. code-block :: bash
92
93      #cfy executions start -d feeder-deploy install
94      #cfy executions start -d admin-ui-deploy install
95      #cfy executions start -d des install
96
97
98 Verify the Deployment Result
99 ----------------------------
100 The following command can be used to list the datalake logs.
101
102   .. code-block :: bash
103   
104      #kubectl logs <datalake-pod> -n onap
105
106 The output should looks like.
107     .. image :: ./images/feeder-log.png
108
109 The des output should looks like.
110     .. image :: ./des-log.png
111
112 If you find any Java exception from log, make sure that the external database and datalake configuration are properly configured.
113 Admin UI can be used to configure the external database configuration.
114
115
116 Uninstall
117 ---------
118 Uninstall running component and delete deployment
119   .. code-block :: bash
120
121      #cfy uninstall feeder-deploy
122      #cfy uninstall admin-ui-deploy
123      #cfy uninstall des
124
125 Delete Blueprint
126 ----------------
127   .. code-block :: bash
128
129      #cfy blueprints delete dl-feeder
130      #cfy blueprints delett dl-admin-ui
131      #cfy blueprints delete des