Merge "adding save for topology template content"
[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:: images/blueprintprocessor.jpg
22    :height: 600px
23    :width: 800px
24    
25 Running Blueprints Processor Microservice Locally:
26 --------------------------------------------------
27
28 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.
29
30 Check out the CDS' code:
31
32 Check out the latest code from Gerrit: https://gerrit.onap.org/r/#/admin/projects/ccsdk/cds
33
34 Build CDS locally:
35 In the checked out directory, type
36
37 .. code-block:: none
38    
39    mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
40         
41 Create the needed Docker images:
42
43 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.
44
45 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:
46
47 .. code-block:: none
48
49    cd ms/blueprintsprocessor/distribution/
50    
51 Build it using the Maven profile called Docker:
52
53 .. code-block:: none
54
55    mvn clean install -Pdocker
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.