Merge "[SLICEMS] Docs for SliceMS Kohn"
[dcaegen2.git] / docs / sections / services / datalake-handler / installation.rst
1 .. 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
5 Deployment Steps
6
7 ################
8 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.
9
10 Pre-requisite
11 -------------
12 Make sure dcae postgres is properly deployed and functional.
13 An 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
17 For 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.
33
34 After datalake getting deployed, the admin UI can be used to configure the sink database address and credentials.
35
36 Log-in to the DCAE Bootstrap POD
37 --------------------------------
38
39 First, we should find the bootstrap pod name through the following command and make sure that DCAE coudify manager is properly deployed.
40   .. image :: ./images/bootstrap-pod.png
41
42 Login 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
47 Validate Blueprint
48 ------------------
49 Before the blueprints uploading to Cloudify manager, the blueprints shoule be validated first through the following command.
50   .. code-block :: bash
51
52     #cfy blueprint validate /bluerints/k8s-datalake-feeder.yaml
53     #cfy blueprint validate /blueprints/k8s-datalake-admin-ui.yaml
54     #cfy blueprint validate /blueprints/k8s-datalake-des.yaml
55
56 Upload the Blueprint to Cloudify Manager.
57 -----------------------------------------
58 After validating, we can start to proceed blueprints uploading.
59   .. code-block :: bash
60
61      #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
64
65 Verify Uploaded Blueprints
66 --------------------------
67 Using "cfy blueprint list" to verify your work.
68   .. code-block :: bash
69
70      #cfy blueprint list
71
72 You can see the following returned message to show the blueprints have been correctly uploaded.
73   .. image :: ./images/blueprint-list.png
74
75
76 Verify Plugin Versions
77 ----------------------
78 If the version of the plugin used is different, update the blueprint import to match.
79   .. code-block :: bash
80
81      #cfy plugins list
82
83 Create Deployment
84 -----------------
85 Here we are going to create deployments for both feeder and admin UI.
86   .. code-block :: bash
87
88      #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
91
92 Launch Service
93 --------------
94 Next, 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
99      #cfy executions start -d des install
100
101
102 Verify the Deployment Result
103 ----------------------------
104 The following command can be used to list the datalake logs.
105
106   .. code-block :: bash
107   
108      #kubectl logs <datalake-pod> -n onap
109
110 The output should looks like.
111     .. image :: ./images/feeder-log.png
112
113 The des output should looks like.
114     .. image :: ./des-log.png
115
116 If you find any Java exception from log, make sure that the external database and datalake configuration are properly configured.
117 Admin UI can be used to configure the external database configuration.
118
119
120 Uninstall
121 ---------
122 Uninstall running component and delete deployment
123   .. code-block :: bash
124
125      #cfy uninstall feeder-deploy
126      #cfy uninstall admin-ui-deploy
127      #cfy uninstall des
128
129 Delete Blueprint
130 ----------------
131   .. code-block :: bash
132
133      #cfy blueprints delete dl-feeder
134      #cfy blueprints delett dl-admin-ui
135      #cfy blueprints delete des