VENKATESH KUMAR | 7f3e453 | 2020-11-18 16:30:36 -0500 | [diff] [blame] | 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 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 5 | Deployment Steps |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 6 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 7 | ################ |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 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. |
Guobiao Mo | bb94cb7 | 2020-02-11 17:14:33 -0800 | [diff] [blame] | 9 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 10 | Pre-requisite |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 11 | ------------- |
Niranjana | 25c8aa0 | 2021-05-07 11:18:09 +0530 | [diff] [blame^] | 12 | Make sure dcae postgres is properly deployed and functional. |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 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. |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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 |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 37 | -------------------------------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 38 | |
| 39 | First, we should find the bootstrap pod name through the following command and make sure that DCAE coudify manager is properly deployed. |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 40 | .. image :: ./images/bootstrap-pod.png |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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 |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 48 | ------------------ |
| 49 | Before the blueprints uploading to Cloudify manager, the blueprints shoule be validated first through the following command. |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 50 | .. code-block :: bash |
| 51 | |
| 52 | #cfy blueprint validate /bluerints/k8s-datalake-feeder.yaml |
| 53 | #cfy blueprint validate /blueprints/k8s-datalake-admin-ui.yaml |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 54 | #cfy blueprint validate /blueprints/k8s-datalake-des.yaml |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 55 | |
| 56 | Upload the Blueprint to Cloudify Manager. |
| 57 | ----------------------------------------- |
| 58 | After validating, we can start to proceed blueprints uploading. |
| 59 | .. code-block :: bash |
| 60 | |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 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 |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 64 | |
| 65 | Verify Uploaded Blueprints |
| 66 | -------------------------- |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 67 | Using "cfy blueprint list" to verify your work. |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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. |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 73 | .. image :: ./images/blueprint-list.png |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 74 | |
| 75 | |
| 76 | Verify Plugin Versions |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 77 | ---------------------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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 | |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 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 |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 91 | |
| 92 | Launch Service |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 93 | -------------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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 |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 99 | #cfy executions start -d des install |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 100 | |
| 101 | |
| 102 | Verify the Deployment Result |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 103 | ---------------------------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 104 | The following command can be used to list the datalake logs. |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 105 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 106 | .. code-block :: bash |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 107 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 108 | #kubectl logs <datalake-pod> -n onap |
| 109 | |
| 110 | The output should looks like. |
VENKATESH KUMAR | e21c848 | 2020-11-12 15:00:02 -0500 | [diff] [blame] | 111 | .. image :: ./images/feeder-log.png |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 112 | |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 113 | The des output should looks like. |
| 114 | .. image :: ./des-log.png |
| 115 | |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 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 |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 121 | --------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 122 | Uninstall running component and delete deployment |
| 123 | .. code-block :: bash |
| 124 | |
| 125 | #cfy uninstall feeder-deploy |
| 126 | #cfy uninstall admin-ui-deploy |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 127 | #cfy uninstall des |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 128 | |
| 129 | Delete Blueprint |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 130 | ---------------- |
Kate Hsuan | 7e6e760 | 2020-03-26 14:15:13 +0800 | [diff] [blame] | 131 | .. code-block :: bash |
| 132 | |
Kai | 6c9735a | 2020-11-13 17:03:52 +0800 | [diff] [blame] | 133 | #cfy blueprints delete dl-feeder |
| 134 | #cfy blueprints delett dl-admin-ui |
| 135 | #cfy blueprints delete des |