Refactoring and fixing Docs
[ccsdk/cds.git] / docs / microservices / blueprintsProcessorMS.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.
3 .. Copyright (C) 2019 IBM.
4
5 Blueprints Processor
6 ====================
7
8 .. toctree::
9    :maxdepth: 1
10    :titlesonly:
11
12 Micro service to Manage Controller Blueprint Models, such as Resource Dictionary, Service Models, Velocity Templates etc,  which will serve service for Controller Design Studio and Controller runtimes.
13
14 This microservice is used to deploy Controller Blueprint Archive file in Run time database. This also helps to test the Valid Blueprint.
15
16 Architecture:
17 -------------
18
19 |image0|
20
21 .. |image0| image:: media/blueprintprocessor.jpg
22    :width: 400pt
23
24 Running Blueprints Processor Microservice Locally:
25 --------------------------------------------------
26
27 The purpose of this page is to show how to run the Blueprints Processor microservice locally, using the docker-compose.yaml file provided in the project.
28
29 Check out the CDS' code:
30
31 Check out the latest code from Gerrit: https://gerrit.onap.org/r/#/admin/projects/ccsdk/cds
32
33 Build CDS locally:
34 In the checked out directory, type
35
36 .. code-block:: none
37
38    mvn clean install -Pq -Dadditionalparam=-Xdoclint:none
39
40 Create the needed Docker images:
41
42 The Blueprints Processor microservice project has a module, called distribution, that provides a docker-compose.yaml file that can be used to spin up Docker containers to run this microservice.
43
44 The first step is to create any custom image needed, by building the distribution module.  From the CDS home directory (where the code was checked out), navigate to the module:
45
46 .. code-block:: none
47
48    cd ms/blueprintsprocessor/distribution/
49
50 Build it using the Maven profile called Docker:
51
52 .. code-block:: none
53
54    mvn clean install -Pdocker
55
56
57 Start Docker containers using docker-composer:
58 ----------------------------------------------
59
60 Navigate to the docker-compose file in the distribution module:
61
62 .. code-block:: none
63
64    cd src/main/dc/
65
66 From there, start the containers:
67
68 .. code-block:: none
69
70    docker-compose up -d
71
72 This will spin the Docker containers declared inside the docker-compose.yaml file in the background.
73
74
75 To verify the logs generated by docker-composer, type:
76
77 .. code-block:: none
78
79    docker-compose logs -f
80
81
82 Testing the environment:
83 ------------------------
84
85 Point your browser to http://localhost:8000/api/v1/execution-service/ping (please note that the port is 8000, not 8080)
86
87 To authenticate, use login user id and password.