1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 Installation of Amsterdam Controller and vCPE Policy
5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 This article explains how to install the Amsterdam policy controller and the Amsterdam policies on a raw ONAP Policy Framework installation running in Docker.
12 To build a raw Policy Framework installation, please follow either of the HowTo articles below prior to using this HowTo:
14 * `Standalone Quick Start <installation.html>`_
15 * `Standalone installation in Virtual Machine <installationVM.html>`_
17 You should have the ONAP Policy Framework running in Docker and started the Policy Framework with *docker-compose*.
20 Test that the ONAP Policy Framework is up and is empty
21 ------------------------------------------------------
23 **Step 1:** Run the command below.
27 curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam | python -m json.tool
29 You should get a response similar to the following:
34 "error": "amsterdam not found"
37 Install the Amsterdam policy controller
38 ---------------------------------------
40 **Step 1:** Log onto the Drools PDP.
44 docker exec -it drools bash
46 You now have a shell open in the Drools PDP container running in docker
49 **Step 2:** Create a temporary directory for controller installation
53 mkdir /tmp/apps-controlloop
54 cd /tmp/apps-controlloop
56 **Step 3:** Download the latest controller from Nexus (1.2.0 at the time of writing)
60 wget https://nexus.onap.org/content/repositories/releases/org/onap/policy/drools-applications/controlloop/packages/apps-controlloop/1.2.0/apps-controlloop-1.2.0.zip
62 **Step 4:** Unzip the controller
66 unzip apps-controlloop-1.2.0.zip
68 **Step 5:** Stop the policy engine
74 **Step 6:** Install the controller by running the controller installation script
78 ./apps-controlloop-installer
80 **Step 7:** Install the controlloop-utils Drools PDP feature to allow standalone execution of control loop policies
84 features install controlloop-utils
85 features enable controlloop-utils
87 **Step 8:** Start the policy engine
93 **Step 9:** Check if the Amsterdam controller is loaded
96 curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam | python -m json.tool
98 You should get a response similar to the following:
101 :caption: Amsterdam Controller JSON Response
108 "artifactId": "NO-ARTIFACT-ID",
110 "canonicalSessionNames": [],
112 "groupId": "NO-GROUP-ID",
114 "recentSinkEvents": [],
115 "recentSourceEvents": [],
117 "version": "NO-VERSION"
124 "allowSelfSignedCerts": false,
128 "partitionKey": "ea44d32e-e2e6-4a77-862b-aa33437179ed",
131 "vm1.mr.simpledemo.openecomp.org"
134 "topicCommInfrastructure": "UEB",
139 "allowSelfSignedCerts": false,
143 "partitionKey": "47769d22-03c8-4993-9f67-fe326a491b23",
146 "vm1.mr.simpledemo.openecomp.org"
148 "topic": "APPC-LCM-READ",
149 "topicCommInfrastructure": "UEB",
154 "allowSelfSignedCerts": false,
158 "partitionKey": "c33ca5ca-6ebd-47d7-a495-5a54f8a2a15a",
161 "vm1.mr.simpledemo.openecomp.org"
163 "topic": "POLICY-CL-MGT",
164 "topicCommInfrastructure": "UEB",
171 "allowSelfSignedCerts": false,
174 "consumerGroup": "6dcfdfb8-7c54-4dbd-9337-e4f1883083fb",
175 "consumerInstance": "drools",
177 "fetchTimeout": 15000,
181 "vm1.mr.simpledemo.openecomp.org"
183 "topic": "unauthenticated.DCAE_CL_OUTPUT",
184 "topicCommInfrastructure": "UEB",
189 "allowSelfSignedCerts": false,
192 "consumerGroup": "4f558331-3d32-494b-b7dc-4d5a509dda0d",
193 "consumerInstance": "drools",
195 "fetchTimeout": 15000,
199 "vm1.mr.simpledemo.openecomp.org"
202 "topicCommInfrastructure": "UEB",
207 "allowSelfSignedCerts": false,
210 "consumerGroup": "1e3edc1f-afa6-4ae5-907f-a7118ad7a0d2",
211 "consumerInstance": "drools",
213 "fetchTimeout": 15000,
217 "vm1.mr.simpledemo.openecomp.org"
219 "topic": "APPC-LCM-WRITE",
220 "topicCommInfrastructure": "UEB",
227 Install the Amsterdam vCPE Policy
228 ---------------------------------
230 We now install the Amsterdam policies for the vCPE, vFirewall, vDNS & VOLTE use cases.
232 **Step 1:** Log onto (or remain logged onto) the Drools PDP.
236 docker exec -it drools bash
238 You now have a shell open in the Drools PDP container running in docker
240 **Step 2:** Check that the Amsterdam policies are not loaded by querying for Drools facts
244 curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/amsterdam | python -m json.tool
246 Expect the response {} indicating no policies are loaded.
248 **Step 3:** Create a temporary directory for policy installation
252 mkdir /tmp/basex-controlloop
253 cd /tmp/basex-controlloop
255 **Step 4:** Extract the policies from the control loop zip file previously downloaded from Nexus and expanded in steps 3 and 4 above.
259 tar zxvf /tmp/apps-controlloop/basex-controlloop-1.2.0.tar.gz
261 **Step 5:** Install the Amsterdam policy rules, the script asks for a number of input parameters, accept the default for all parameters
265 bin/create-cl-amsterdam
267 # - Type Y when asked for confirmation of parameters
268 # - Accept /tmp as the install directory
269 # - Type Y to agree to creation of a Maven Artifact
272 **Step 6:** Maven artifact creation now proceeds. After some minutes, confirmation is requested for deployment of rules into Maven.
275 # - Type Y to deploy the rules.
277 The rules are deployed into Maven. Expect the rule deployment process to take a number of minutes, perhaps 10 minutes.
280 **Step 7:** Copy the Amsterdam properties file into the Drools PDP configuration directory. This file configures the Drools PDP with the Amsterdam policies
284 cp /tmp/amsterdam/amsterdam-controller.properties /opt/app/policy/config
286 **Step 8:** Stop and start the Drools PDP
293 **Step 9:** Now verify that the Amsterdam policies are loaded, there should be a fact in the Drools PDP
297 curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/amsterdam | python -m json.tool
304 "org.onap.policy.controlloop.Params": 1
308 Execute the vCPE Use Case Manually
309 ----------------------------------
311 You can now run the vCPE Policy use case manually using the HowTos below:
312 * `Tutorial: Testing the vCPE use case in a standalone PDP-D <tutorial_vCPE.html>`_
315 1. You should check that the topic names you use match those in the Amsterdam configuration file */opt/app/policy/config/amsterdam-controller.properties*.
316 2. You should ensure that you change to the directory */tmp/amsterdam* prior to running those HowTos
320 .. Installation of Amsterdam Controller and vCPE Policy : https://wiki.onap.org/display/DW/ONAP+Policy+Framework%3A+Installation+of+Amsterdam+Controller+and+vCPE+Policy