Chengkai Yan | 7f278e3 | 2018-11-06 16:32:03 +0100 | [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 |
|
| 4 | Installation
|
| 5 | ============
|
| 6 |
|
| 7 | An environment suitable for running docker containers is recommended.
|
| 8 |
|
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame^] | 9 | Using Cloudify deployment
|
| 10 | -------------------------
|
Chengkai Yan | 7f278e3 | 2018-11-06 16:32:03 +0100 | [diff] [blame] | 11 |
|
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame^] | 12 | The first possibility is to use blueprints and cfy commands.
|
| 13 |
|
| 14 | Deployment Prerequisite/dependencies
|
| 15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 16 |
|
| 17 | Make sure that **cfy** is installed and configured to work with the Cloudify deployment.
|
| 18 |
|
| 19 | Make sure the Message Router and Data Router are running.
|
| 20 |
|
| 21 | Deployment steps
|
| 22 | ^^^^^^^^^^^^^^^^
|
| 23 |
|
| 24 | 1. Execute bash on the cloudify manager kubernetes pod.
|
| 25 |
|
| 26 | .. code-block:: json
|
| 27 | kubectl -n onap exec -it <dev-dcaegen2-dcae-cloudify-manager> bash
|
| 28 |
|
| 29 | 2. Download the dfc `blueprint`_.
|
| 30 | .. _blueprint
|
| 31 |
|
| 32 | https://gerrit.onap.org/r/gitweb?p=dcaegen2/platform/blueprints.git;a=blob;f=blueprints/reference_templates/k8s-datafile-collector.yaml-template;h=17d2aedec131154b4f5f84a08a099b0364b1e627;hb=HEAD
|
| 33 |
|
| 34 | 3. Run Cloudify Install command to install dfc.
|
| 35 |
|
| 36 | .. code-block:: json
|
| 37 | cfy install <dfc-blueprint-path>
|
| 38 |
|
| 39 | Sample output:
|
| 40 |
|
| 41 | ..code-block:: json
|
| 42 | cfy install k8s-datafile.yaml
|
| 43 |
|
| 44 | Run '*cfy events list -e 37da3f5f-a06b-4ce8-84d3-8b64ccd81c33'* to retrieve the execution's events/logs.
|
| 45 |
|
| 46 | Validation
|
| 47 | ^^^^^^^^^^
|
| 48 |
|
| 49 | curl <dcaegen2-dcae-healthcheck> and check if datafile-collector is in *'ready'* state.
|
| 50 |
|
| 51 | Standalone deployment of a container
|
| 52 | ------------------------------------
|
| 53 |
|
| 54 | DFC is delivered as a docker container based on openjdk:8-jre-alpine. The
|
Chengkai Yan | 7f278e3 | 2018-11-06 16:32:03 +0100 | [diff] [blame] | 55 | host or VM that will run this container must have the docker application
|
| 56 | loaded and available to the userID that will be running the DFC container.
|
| 57 |
|
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame^] | 58 | Also required is a working DMAAP/MR and DMAAP/DR environment. DFC
|
Chengkai Yan | 7f278e3 | 2018-11-06 16:32:03 +0100 | [diff] [blame] | 59 | subscribes to DMAAP/MR fileReady event as JSON messages and publishes the downloaded files to the DMAAP/DR.
|
| 60 |
|
| 61 | Installation
|
| 62 | ^^^^^^^^^^^^
|
| 63 |
|
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame^] | 64 | The following command will download the Dublin version of the datafile container from
|
Chengkai Yan | 7f278e3 | 2018-11-06 16:32:03 +0100 | [diff] [blame] | 65 | nexus and launch it in the container named "datafile":
|
| 66 |
|
maximesson | c762eb1 | 2019-04-04 14:43:43 +0000 | [diff] [blame] | 67 | ``docker run -d -p 8100:8100 -p 8433:8433
|
maximesson | e707b22 | 2019-05-09 14:27:34 +0000 | [diff] [blame^] | 68 | nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.1.2``
|
| 69 |
|
| 70 | For another version, it is possible to replace the tag '1.1.2' with any version that seems suitable (including latest).
|
| 71 | Available images are visible following this `link`_.
|
| 72 |
|
| 73 | .. _link https://nexus3.onap.org/#browse/search=keyword%3D*datafile*
|
| 74 |
|
| 75 | Another option is to pull the container first, and then run it with the image ID:
|
| 76 |
|
| 77 | ``docker pull nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest``
|
| 78 |
|
| 79 | ``docker images | grep 'datafile'``
|
| 80 |
|
| 81 | ``docker run -d -p 8100:8100 -p 8433:8433 <image ID>``
|
| 82 |
|
| 83 | The grep command will display the images corresponding to DFC. There can be several due to remotely or locally built
|
| 84 | image, and also to different tags, i.e. different versions.
|