3 Provides a flexible and secure way for deploying and managing various RIC xApp applications.
5 ## Communication Interfaces (draft for R0)
6 * Northbound (External)
8 * Southbound (internal)
9 * Helm (Package manager for Kubernetes)
11 ## REST services for XApp managements
15 Deploy /ric/v1/xapps POST
16 Undeploy /ric/v1/xapps/{xappName} DELETE
17 Query Xapp Status /ric/v1/xapps/{xappName} GET
18 Query Xapp Instance Status /ric/v1/xapps/instances/{xappName} GET
19 Query All Xapp Status /ric/v1/xapps GET
20 Health Check /ric/v1/health GET
23 ## REST services for subscriptions (resthooks)
27 Add A Subscription /ric/v1/subscriptions POST
28 Update A Subscription /ric/v1/subscriptions/{id} PUT
29 Delete A Subscription /ric/v1/subscriptions/{id} DELETE
30 Get A Subscription /ric/v1/subscriptions GET
31 Get All Subscriptions /ric/v1/subscriptions/{id} GET
34 ## Used RIC platform services
38 Make sure that following tools are properly installed and configured
39 * GO (golang) development and runtime tools
41 * Kubernates and related tools (kubectl and helm)
42 * Xapp Docker repo (either local or remote)
46 ## Building go binary and docker container for xApp Manager
48 # Change to build-folder and run following command
52 ## Running xApp Manager unit tests
54 # Change to build-folder and run following command
58 ## Running xApp Manager locally
60 # Now run the xApp manager
61 ./xapp_mgr -f ../config/appmgr.yaml
64 # Running Docker container of xApp manager
69 # Deploy, undeploying xApps and querying status (using CURL command)
71 # Deploy a new xApp instance with the name 'dummy-xapp'
72 curl -H "Content-Type: application/json" -X POST http://172.17.0.3:8080/ric/v1/xapps -d '{"name": "dummy-xapp"}'
76 # Query the status of all xApp applications
77 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps
78 % Total % Received % Xferd Average Speed Time Time Time Current
79 Dload Upload Total Spent Left Speed
80 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
88 "name": "dummy-xapp-8984fc9fd-8jq9q",
90 "ip": "10.99.213.161",
96 "name": "dummy-xapp-8984fc9fd-zq47z",
98 "ip": "10.99.213.161",
104 "name": "dummy-xapp-8984fc9fd-zzxjj",
106 "ip": "10.99.213.161",
116 # Query the status of a sigle xApp (using the xApp name)
117 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps/dummy-xapp
118 % Total % Received % Xferd Average Speed Time Time Time Current
119 Dload Upload Total Spent Left Speed
120 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
122 "name": "dummy-xapp",
123 "status": "DEPLOYED",
127 "name": "dummy-xapp-8984fc9fd-8jq9q",
129 "ip": "10.99.213.161",
135 "name": "dummy-xapp-8984fc9fd-zq47z",
137 "ip": "10.99.213.161",
143 "name": "dummy-xapp-8984fc9fd-zzxjj",
145 "ip": "10.99.213.161",
154 # Query the status of a sigle xApp instance (using the xApp instance name)
155 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps/dummy-xapp
156 % Total % Received % Xferd Average Speed Time Time Time Current
157 Dload Upload Total Spent Left Speed
158 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
160 "name": "dummy-xapp-8984fc9fd-8jq9q",
162 "ip": "10.99.213.161",
169 # Undeploy xApp by name
170 curl -H "Content-Type: application/json" -X DELETE http://localhost:8080/ric/v1/xapps/dummy-xapp
173 # Health Check Probes (using CURL command)
175 # Health Check using CURL
176 curl -H "Content-Type: application/json" http://10.244.1.47:8080/ric/v1/health --verbose
177 * Trying 10.244.1.47...
179 * Connected to 10.244.1.47 (10.244.1.47) port 8080 (#0)
180 > GET /ric/v1/health HTTP/1.1
181 > Host: 10.244.1.47:8080
182 > User-Agent: curl/7.58.0
184 > Content-Type: application/json
187 < Content-Type: application/json
188 < Date: Sun, 24 Mar 2019 11:13:59 GMT
191 * Connection #0 to host 10.244.1.47 left intact
194 # Subsciptions: List, create, update and delete (using CURL command)
196 # Add a new subscription
197 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions -X POST -d '{"maxRetries": 3, "retryTimer": 5, "eventType":"Created", "targetUrl": "http://192.168.0.12:8088/"}'
199 % Total % Received % Xferd Average Speed Time Time Time Current
200 Dload Upload Total Spent Left Speed
201 100 169 100 70 100 99 17500 24750 --:--:-- --:--:-- --:--:-- 56333
203 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
205 "eventType": "Created"
209 # List all subscriptions
210 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions
211 % Total % Received % Xferd Average Speed Time Time Time Current
212 Dload Upload Total Spent Left Speed
213 100 259 100 259 0 0 252k 0 --:--:-- --:--:-- --:--:-- 252k
216 "id": "1ILBZTtEVVtQmIZnh1OJdBP7bcR",
217 "targetUrl": "http://192.168.0.12:8088/",
218 "eventType": "Created",
223 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
224 "targetUrl": "http://192.168.0.12:8088/",
225 "eventType": "Created",
233 # Get a specific subscription by Id
234 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions/1ILBZTtEVVtQmIZnh1OJdBP7bcR
235 % Total % Received % Xferd Average Speed Time Time Time Current
236 Dload Upload Total Spent Left Speed
237 100 128 100 128 0 0 125k 0 --:--:-- --:--:-- --:--:-- 125k
239 "id": "1ILBZTtEVVtQmIZnh1OJdBP7bcR",
240 "targetUrl": "http://192.168.0.12:8088/",
241 "eventType": "Created",
248 # Delete a specific subscription by Id
249 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions/1ILBZTtEVVtQmIZnh1OJdBP7bcR -X DELETE
250 % Total % Received % Xferd Average Speed Time Time Time Current
251 Dload Upload Total Spent Left Speed
252 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
256 # Example of subscription notification POSTed to targetUrl provided by the client
259 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
261 "eventType": "Created",
263 "name": "dummy-xapp",
264 "status": "DEPLOYED",
268 "name": "dummy-xapp-8984fc9fd-lh7r2",
269 "status": "ContainerCreating",
270 "ip": "10.104.73.185",
276 "name": "dummy-xapp-8984fc9fd-lzrdk",
278 "ip": "10.104.73.185",
284 "name": "dummy-xapp-8984fc9fd-xfjcn",
286 "ip": "10.104.73.185",
296 # Using xapp manager CLI (appmgrcli) to manage xapps (deploy, get, undeploy, etc)
298 Run command *appmgrcli help* for short usage instructions, or read the
299 script source; the instructions can be found as plain text near the
302 Unlike direct curl commands, using the *appmgrcli* validates some of
303 the parameters, and there is usually less to type...
305 The host and port where the xapp manager is running are given by
306 options *-h* and *-p*, or you can define environment variables
307 APPMGR_HOST and APPMGR_PORT to specify them (recommended). The
308 following examples assume they have been specified.
313 $ appmgrcli deploy dummy-xapp
315 "name": "dummy-xapp",
316 "status": "DEPLOYED",
320 "name": "dummy-xapp-667dfc9bfb-wd5m9",
332 $ appmgrcli undeploy dummy-xapp
333 dummy-xapp undeployed
335 # Add some subscriptions
337 $ appmgrcli subscriptions add https://kukkuu.reset created 500 600
339 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
341 "eventType": "created"
343 $ appmgrcli subscriptions add https://facebook.com all 10 4
345 "id": "1IoR85ZwgiNiIn82phUR6qJmBvq",
350 # list and delete (also shows using abbreviations):
353 $ appmgrcli subs list
356 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
357 "targetUrl": "https://kukkuu.reset",
358 "eventType": "created",
363 "id": "1IoR85ZwgiNiIn82phUR6qJmBvq",
364 "targetUrl": "https://facebook.com",
371 $ appmgrcli subs del 1IoR85ZwgiNiIn82phUR6qJmBvq
372 Subscription 1IoR85ZwgiNiIn82phUR6qJmBvq deleted
374 $ appmgrcli subs list
377 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
378 "targetUrl": "https://kukkuu.reset",
379 "eventType": "created",