summaryrefslogtreecommitdiffstats
path: root/docs/developerguide
diff options
context:
space:
mode:
authorJakobKrieg <jakob.krieg@bcmsolutions.de>2020-08-27 16:36:38 +0200
committerJakobKrieg <jakob.krieg@bcmsolutions.de>2020-08-27 16:59:08 +0200
commit668466f9338e38ab13e2fb331b9c4c758db7bc47 (patch)
treeb6ad096352dd45edee156edf77d16d9cfdd05d64 /docs/developerguide
parente0da7c94aedc038c76d17c1d4a904c7b12ba3c5b (diff)
Fix issues guide 'Run BP Processor in IDE'
Issue-ID: CCSDK-2703 Change-Id: I853db9cde0b38258dbd0a82618436c73ced4fff5 Signed-off-by: JakobKrieg <jakob.krieg@bcmsolutions.de>
Diffstat (limited to 'docs/developerguide')
-rw-r--r--docs/developerguide/media/vsc_logs.pngbin0 -> 161184 bytes
-rw-r--r--docs/developerguide/running-bp-processor-in-ide.rst123
2 files changed, 88 insertions, 35 deletions
diff --git a/docs/developerguide/media/vsc_logs.png b/docs/developerguide/media/vsc_logs.png
new file mode 100644
index 000000000..886d1b3c5
--- /dev/null
+++ b/docs/developerguide/media/vsc_logs.png
Binary files differ
diff --git a/docs/developerguide/running-bp-processor-in-ide.rst b/docs/developerguide/running-bp-processor-in-ide.rst
index 00daa2f5c..a695554a8 100644
--- a/docs/developerguide/running-bp-processor-in-ide.rst
+++ b/docs/developerguide/running-bp-processor-in-ide.rst
@@ -109,9 +109,9 @@ Execute the following commands to create the needed directories, and grant acces
Import the project into the IDE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.. tabs ::
+.. tabs::
- .. group-tab:: IntelliJ IDEA
+ .. tab:: IntelliJ IDEA
Go to *File | Open* and choose the :file:`pom.xml` file of the cds directory:
@@ -122,8 +122,7 @@ Import the project into the IDE
|imageReimportMaven|
- Override some application properties
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ **Override some application properties:**
After the project is compiled, a Run Configuration profile overriding some application properties
with custom values needs to be created, to reflect the local environment characteristics.
@@ -277,8 +276,7 @@ Import the project into the IDE
-Dserver.port=55555
- Add/replace the following in Blueprint's application-dev.properties file:
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ **Add/replace the following in Blueprint's application-dev.properties file:**
.. code-block:: java
@@ -290,8 +288,7 @@ Import the project into the IDE
blueprintprocessor.remoteScriptCommand.enabled=true
- Run the application
- ~~~~~~~~~~~~~~~~~~~
+ **Run the application:**
Select either run or debug for this Run Configuration to start the Blueprints Processor:
@@ -299,31 +296,80 @@ Import the project into the IDE
|imageBuildLogs|
- .. group-tab:: Visual Studio Code
+ .. tab:: Visual Studio Code
+
+ .. tabs::
+
+ .. group-tab:: Latest
+
+ * **Step #1** - Make sure your installation of Visual Studio Code is up to date. This guide was writen using version 1.48
+ * **Step #2** - Install `Kotlin extension from the Visual Studio Code Marketplace <https://marketplace.visualstudio.com/items?itemName=fwcd.kotlin>`_
+ * **Step #3** - On the top menu click *Run | Open Configurations*
+
+ .. warning:: This should open the file called `launch.json` but in some cases you'll need to wait for the Kotlin Language Server to be installed before you can do anything.
+ Please watch the bottom bar in Visual Studio Code for messages about things getting installed.
+
+ * **Step #4** - add configuration shown below to your configurations list.
+
+ .. code-block:: json
+
+ {
+ "type": "kotlin",
+ "request": "launch",
+ "name": "Blueprint Processor",
+ "projectRoot": "${workspaceFolder}/ms/blueprintsprocessor/application",
+ "mainClass": "-Dspring.profiles.active=dev org.onap.ccsdk.cds.blueprintsprocessor.BlueprintProcessorApplicationKt"
+ }
+
+ .. warning:: The `projectRoot` path assumes that you created your Workspace in the main CDS repository folder. If not - please change the path accordingly
+
+ .. note:: The `mainClass` contains a spring profile param before the full class name. This is done because `args` is not supported by Kotlin launch.json configuration.
+ If you have a cleaner idea how to solve this - please let us know.
+
+ **Add/replace the following in Blueprint's application-dev.properties file:**
+
+ .. code-block:: java
+
+ blueprintsprocessor.grpcclient.remote-python.type=token-auth
+ blueprintsprocessor.grpcclient.remote-python.host=localhost
+ blueprintsprocessor.grpcclient.remote-python.port=50051
+ blueprintsprocessor.grpcclient.remote-python.token=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
+
+ blueprintprocessor.remoteScriptCommand.enabled=true
+
+ **Currently the following entries need to be added in VSC too:**
+
+ .. code-block:: java
+
+ logging.level.web=DEBUG
+ logging.level.org.springframework.web: DEBUG
- * **Step #1** - Make sure your installation of Visual Studio Code is up to date. This guide was writen using version 1.48
- * **Step #2** - Install `Kotlin extension from the Visual Studio Code Marketplace <https://marketplace.visualstudio.com/items?itemName=fwcd.kotlin>`_
- * **Step #3** - On the top menu click *Run | Open Configurations*
+ #Encrypted username and password for health check service
+ endpoints.user.name=eHbVUbJAj4AG2522cSbrOQ==
+ endpoints.user.password=eHbVUbJAj4AG2522cSbrOQ==
- .. warning:: This should open the file called `launch.json` but in some cases you'll need to wait for the Kotlin Language Server to be installed before you can do anything.
- Please watch the bottom bar in Visual Studio Code for messages about things getting installed.
+ #BaseUrls for health check blueprint processor services
+ blueprintprocessor.healthcheck.baseUrl=http://localhost:8080/
+ blueprintprocessor.healthcheck.mapping-service-name-with-service-link=[Execution service,/api/v1/execution-service/health-check],[Resources service,/api/v1/resources/health-check],[Template service,/api/v1/template/health-check]
- * **Step #4** - add configuration shown below to your configurations list.
+ #BaseUrls for health check Cds Listener services
+ cdslistener.healthcheck.baseUrl=http://cds-sdc-listener:8080/
+ cdslistener.healthcheck.mapping-service-name-with-service-link=[SDC Listener service,/api/v1/sdclistener/healthcheck]
- .. code-block:: json
+ #Actuator properties
+ management.endpoints.web.exposure.include=*
+ management.endpoint.health.show-details=always
+ management.info.git.mode=full
- {
- "type": "kotlin",
- "request": "launch",
- "name": "Blueprint Processor",
- "projectRoot": "${workspaceFolder}/ms/blueprintsprocessor/application",
- "mainClass": "-Dspring.profiles.active=dev org.onap.ccsdk.cds.blueprintsprocessor.BlueprintProcessorApplicationKt"
- }
+ In VSC the properties are read from target folder, thats why the following maven command needs to be rerun:
- .. warning:: The `projectRoot` path assumes that you created your Workspace in the main CDS repository folder. If not - please change the path accordingly
+ .. code-block:: bash
+
+ mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
- .. note:: The `mainClass` contains a spring profile param before the full class name. This is done because `args` is not supported by Kotlin launch.json configuration.
- If you have a cleaner idea how to solve this - please let us know.
+ Click Run in Menu bar.
+
+ |imageLogsVSC|
Testing the application
@@ -355,38 +401,45 @@ Compilation error?
* Change Java Version to 11 or 8
+
+.. image alignment inside tabs doesn't work
+
.. |imageRunConfigJava| image:: media/run_config_java.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageRunConfigKt| image:: media/run_config_kt.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageCreateRunConfigJava| image:: media/create_run_config_java.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageCreateRunConfigKt| image:: media/create_run_config_kt.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageImportProject| image:: media/import_project.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageReimportMaven| image:: media/reimport_maven.png
- :scale: 70 %
+ :scale: 75 %
:align: middle
.. |imageRunDebug| image:: media/run_debug.png
- :scale: 100 %
+ :scale: 75 %
:align: middle
.. |imageRunDebug| image:: media/run_debug.png
:align: middle
- :scale: 100 %
+ :scale: 75 %
.. |imageBuildLogs| image:: media/build_logs.png
:align: middle
- :scale: 100 % \ No newline at end of file
+ :scale: 75 %
+
+.. |imageLogsVSC| image:: media/vsc_logs.png
+ :align: middle
+ :scale: 75 % \ No newline at end of file