* Your local maven repository is in the location *~/.m2/repository*
* You have copied the settings.xml from oparent to *~/.m2/* directory
* You have added settings to access the ONAP Nexus to your M2 configuration, see `Maven Settings Example <https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment>`_ (bottom of the linked page)
+* Your local helm is in the location /usr/local/bin/helm
+* Your local kubectl is in the location /usr/local/bin/kubectl
The procedure documented in this article has been verified using Ubuntu 20.04 LTS VM.
.. literalinclude:: files/participant-kubernetes-application.yaml
:language: yaml
+If the helm location is not '/usr/local/bin/helm' or the kubectl location is not '/usr/local/bin/kubectl', you have to update
+the file 'participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java'.
+
2.3.3 Automation composition Runtime
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To start the automation composition runtime service, we need to execute the following maven command from the "runtime-acm" directory in the clamp repo. Automation composition runtime uses the config file "src/main/resources/application.yaml" by default.
.. code-block:: bash
- cd ~/git/onap/policy/clamp/packages/
+ cd ~/git/onap/policy/clamp/
mvn clean install -P docker
"primeOrder": "PRIME"
}
+A successful prime request gives 202 responses in the postman client.
+
3.3 Create New Instances of Automation composition
==================================================
Once AC definition is primes, we can instantiate automation composition instances. This will create the instances with default state "UNDEPLOYED".
:download:`Instantiation json <json/acm-instantiation.json>`
+A successful creation of new instance gives 201 responses in the postman client.
+
3.4 Change the State of the Instance
====================================
When the automation composition is updated with state “DEPLOYED”, the Kubernetes participant fetches the node template for all automation composition elements and deploys the helm chart of each AC element into the cluster. The following sample json input is passed on the request body.
}
+A successful deploy request gives 202 responses in the postman client.
After the state changed to "DEPLOYED", nginx-ingress pod is deployed in the kubernetes cluster. And http participant should have posted the dummy data to the configured URL in the tosca template.
The following command can be used to verify the pods deployed successfully by kubernetes participant.
- Observe PARTICIPANT_REGISTER going from participant to runtime
- Observe PARTICIPANT_REGISTER_ACK going from runtime to participant
-- Observe PARTICIPANT_PRIME going from runtime to participant
3.2 Participant Deregistration
==============================
- Observe PARTICIPANT_PRIME going from runtime to participant with acm type definitions and common property values for participant types
- Observe that the acm type definitions and common property values for participant types are stored on ParticipantHandler
-- Observe PARTICIPANT_PRIME_ACK going from runtime to participant
+- Observe PARTICIPANT_PRIME_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.4 Participant DePriming
=========================
- If acm instances exist in runtime database, return a response for the REST API with error response saying "Cannot decommission acm type definition"
- If no acm instances exist in runtime database, Observe PARTICIPANT_PRIME going from runtime to participant with definitions as null
- Observe that the acm type definitions and common property values for participant types are removed on ParticipantHandler
-- Observe PARTICIPANT_PRIME_ACK going from runtime to participant
+- Observe PARTICIPANT_PRIME_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.5 Automation Composition Instance
===================================
- Observe that the AutomationCompositionElements deploy state is DEPLOYED
- Observe that the acm deploy state is DEPLOYED
- Observe AUTOMATION_COMPOSITION_DEPLOY_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.7 Automation Composition lock state change to UNLOCK
======================================================
- Observe that the AutomationCompositionElements lock state is UNLOCK
- Observe that the acm state is UNLOCK
- Observe AUTOMATION_COMPOSITION_STATE_CHANGE_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.8 Automation Composition lock state change to LOCK
====================================================
- Observe that the AutomationCompositionElements lock state is LOCK
- Observe that the acm lock state is LOCK
- Observe AUTOMATION_COMPOSITION_STATE_CHANGE_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.9 Automation Composition deploy state change to UNDEPLOYED
============================================================
- Observe that the AutomationCompositionElements undeploy the instances from respective frameworks
- Observe that the automation composition instances are removed from participants
- Observe AUTOMATION_COMPOSITION_STATE_CHANGE_ACK going from participant to runtime
+- Observe PARTICIPANT_SYNC_MSG going from runtime to participant
3.10 Automation Composition monitoring and reporting
====================================================
Test result:
- Observe that PARTICIPANT_STATUS message is sent from participants to runtime in a regular interval
-- Trigger a PARTICIPANT_STATUS_REQ from runtime and observe a PARTICIPANT_STATUS message with tosca definitions of automation composition type definitions sent
- from all the participants to runtime
+- Trigger a PARTICIPANT_STATUS_REQ from runtime and observe a PARTICIPANT_STATUS message from all the participants to runtime
This concluded the required smoke tests
.. code-block:: bash
cd ~/git/clamp/runtime-acm
- java -jar target/policy-clamp-runtime-acm-7.1.3-SNAPSHOT.jar
+ java -jar target/policy-clamp-runtime-acm-8.1.0-SNAPSHOT.jar
Running participant simulator
.. code-block:: bash
cd ~/git/clamp/participant/participant-impl/participant-impl-simulator
- java -jar target/policy-clamp-participant-impl-simulator-7.1.3-SNAPSHOT.jar
+ java -jar target/policy-clamp-participant-impl-simulator-8.1.0-SNAPSHOT.jar
Running the CLAMP automation composition docker image
participant:
intermediaryParameters:
+ topics:
+ operationTopic: policy-acruntime-participant
+ syncTopic: acm-ppnt-sync
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01
clampAutomationCompositionTopics:
topicSources:
- - topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ - topic: ${participant.intermediaryParameters.topics.syncTopic}
+ servers:
+ - localhost:29092
topicCommInfrastructure: kafka
fetchTimeout: 15000
topicSinks:
- - topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
topicCommInfrastructure: kafka
participantSupportedElementTypes:
-
localChartDirectory: /home/policy/local-charts
infoFileName: CHART_INFO.json
intermediaryParameters:
+ topics:
+ operationTopic: policy-acruntime-participant
+ syncTopic: acm-ppnt-sync
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02
clampAutomationCompositionTopics:
topicSources:
- -
- topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ - topic: ${participant.intermediaryParameters.topics.syncTopic}
+ servers:
+ - localhost:29092
topicCommInfrastructure: kafka
fetchTimeout: 15000
topicSinks:
- -
- topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
topicCommInfrastructure: kafka
participantSupportedElementTypes:
-
useHttps: false
allowSelfSignedCerts: false
intermediaryParameters:
+ topics:
+ operationTopic: policy-acruntime-participant
+ syncTopic: acm-ppnt-sync
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03
clampAutomationCompositionTopics:
topicSources:
- -
- topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ - topic: ${participant.intermediaryParameters.topics.syncTopic}
+ servers:
+ - localhost:29092
topicCommInfrastructure: kafka
fetchTimeout: 15000
topicSinks:
- -
- topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
topicCommInfrastructure: kafka
participantSupportedElementTypes:
-
participant:
intermediaryParameters:
+ topics:
+ operationTopic: policy-acruntime-participant
+ syncTopic: acm-ppnt-sync
reportingTimeIntervalMs: 120000
description: Participant Description
participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
clampAutomationCompositionTopics:
topicSources:
- - topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
+ topicCommInfrastructure: kafka
+ fetchTimeout: 15000
+ - topic: ${participant.intermediaryParameters.topics.syncTopic}
+ servers:
+ - localhost:29092
topicCommInfrastructure: kafka
fetchTimeout: 15000
topicSinks:
- - topic: policy-acruntime-participant
+ - topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
topicCommInfrastructure: kafka
participantSupportedElementTypes:
-
runtime:
+ topics:
+ operationTopic: policy-acruntime-participant
+ syncTopic: acm-ppnt-sync
participantParameters:
heartBeatMs: 20000
maxStatusWaitMs: 200000
topicParameterGroup:
topicSources:
- -
- topic: policy-acruntime-participant
+ - topic: ${runtime.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
topicCommInfrastructure: kafka
fetchTimeout: 15000
topicSinks:
- -
- topic: policy-acruntime-participant
+ - topic: ${runtime.topics.operationTopic}
servers:
- - ${topicServer:localhost:29092}
+ - localhost:29092
+ topicCommInfrastructure: kafka
+ - topic: ${runtime.topics.syncTopic}
+ servers:
+ - localhost:29092
topicCommInfrastructure: kafka
acmParameters:
toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement
"chart": {
"chartId": {
"name": "nginx-ingress",
- "version": "0.11.0"
+ "version": "1.4.1"
},
"releaseName": "nginxapp",
"namespace": "onap"