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
42 * Kubernates and related tools (kubectl and helm)
43 * Xapp Docker repo (either local or remote)
47 ## Building go binary and docker container for xApp Manager
49 # Run following command. Make sure that mdclog is installed and found in the standard library path
53 ## Running xApp Manager unit tests
55 # Run following command
59 ## Running xApp Manager locally
61 # Now run the xApp manager
62 build/appmgr -f config/appmgr.yaml
65 # Running Docker container of xApp manager
70 # Deploy, undeploying xApps and querying status (using CURL command)
72 # Deploy a new xApp instance with the name 'dummy-xapp'
73 curl -H "Content-Type: application/json" -X POST http://172.17.0.3:8080/ric/v1/xapps -d '{"name": "dummy-xapp"}'
77 # Query the status of all xApp applications
78 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps
79 % Total % Received % Xferd Average Speed Time Time Time Current
80 Dload Upload Total Spent Left Speed
81 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
89 "name": "dummy-xapp-8984fc9fd-8jq9q",
91 "ip": "10.99.213.161",
97 "name": "dummy-xapp-8984fc9fd-zq47z",
99 "ip": "10.99.213.161",
105 "name": "dummy-xapp-8984fc9fd-zzxjj",
107 "ip": "10.99.213.161",
117 # Query the status of a sigle xApp (using the xApp name)
118 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps/dummy-xapp
119 % Total % Received % Xferd Average Speed Time Time Time Current
120 Dload Upload Total Spent Left Speed
121 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
123 "name": "dummy-xapp",
124 "status": "DEPLOYED",
128 "name": "dummy-xapp-8984fc9fd-8jq9q",
130 "ip": "10.99.213.161",
136 "name": "dummy-xapp-8984fc9fd-zq47z",
138 "ip": "10.99.213.161",
144 "name": "dummy-xapp-8984fc9fd-zzxjj",
146 "ip": "10.99.213.161",
155 # Query the status of a sigle xApp instance (using the xApp instance name)
156 curl -H "Content-Type: application/json" http://localhost:8080/ric/v1/xapps/dummy-xapp
157 % Total % Received % Xferd Average Speed Time Time Time Current
158 Dload Upload Total Spent Left Speed
159 100 95 100 95 0 0 95000 0 --:--:-- --:--:-- --:--:-- 95000
161 "name": "dummy-xapp-8984fc9fd-8jq9q",
163 "ip": "10.99.213.161",
170 # Undeploy xApp by name
171 curl -H "Content-Type: application/json" -X DELETE http://localhost:8080/ric/v1/xapps/dummy-xapp
174 # Health Check Probes (using CURL command)
176 # Health Check using CURL
177 curl -H "Content-Type: application/json" http://10.244.1.47:8080/ric/v1/health --verbose
178 * Trying 10.244.1.47...
180 * Connected to 10.244.1.47 (10.244.1.47) port 8080 (#0)
181 > GET /ric/v1/health HTTP/1.1
182 > Host: 10.244.1.47:8080
183 > User-Agent: curl/7.58.0
185 > Content-Type: application/json
188 < Content-Type: application/json
189 < Date: Sun, 24 Mar 2019 11:13:59 GMT
192 * Connection #0 to host 10.244.1.47 left intact
195 # Subsciptions: List, create, update and delete (using CURL command)
197 # Add a new subscription
198 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/"}'
200 % Total % Received % Xferd Average Speed Time Time Time Current
201 Dload Upload Total Spent Left Speed
202 100 169 100 70 100 99 17500 24750 --:--:-- --:--:-- --:--:-- 56333
204 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
206 "eventType": "Created"
210 # List all subscriptions
211 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions
212 % Total % Received % Xferd Average Speed Time Time Time Current
213 Dload Upload Total Spent Left Speed
214 100 259 100 259 0 0 252k 0 --:--:-- --:--:-- --:--:-- 252k
217 "id": "1ILBZTtEVVtQmIZnh1OJdBP7bcR",
218 "targetUrl": "http://192.168.0.12:8088/",
219 "eventType": "Created",
224 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
225 "targetUrl": "http://192.168.0.12:8088/",
226 "eventType": "Created",
234 # Get a specific subscription by Id
235 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions/1ILBZTtEVVtQmIZnh1OJdBP7bcR
236 % Total % Received % Xferd Average Speed Time Time Time Current
237 Dload Upload Total Spent Left Speed
238 100 128 100 128 0 0 125k 0 --:--:-- --:--:-- --:--:-- 125k
240 "id": "1ILBZTtEVVtQmIZnh1OJdBP7bcR",
241 "targetUrl": "http://192.168.0.12:8088/",
242 "eventType": "Created",
249 # Delete a specific subscription by Id
250 curl -H "Content-Type: application/json" http://172.17.0.3:8080/ric/v1/subscriptions/1ILBZTtEVVtQmIZnh1OJdBP7bcR -X DELETE
251 % Total % Received % Xferd Average Speed Time Time Time Current
252 Dload Upload Total Spent Left Speed
253 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
257 # Example of subscription notification POSTed to targetUrl provided by the client
260 "id": "1ILBltYYzEGzWRrVPZKmuUmhwcc",
262 "eventType": "Created",
264 "name": "dummy-xapp",
265 "status": "DEPLOYED",
269 "name": "dummy-xapp-8984fc9fd-lh7r2",
270 "status": "ContainerCreating",
271 "ip": "10.104.73.185",
277 "name": "dummy-xapp-8984fc9fd-lzrdk",
279 "ip": "10.104.73.185",
285 "name": "dummy-xapp-8984fc9fd-xfjcn",
287 "ip": "10.104.73.185",
297 # Using xapp manager CLI (appmgrcli) to manage xapps (deploy, get, undeploy, etc)
299 Run command *appmgrcli help* for short usage instructions, or read the
300 script source; the instructions can be found as plain text near the
303 Unlike direct curl commands, using the *appmgrcli* validates some of
304 the parameters, and there is usually less to type...
306 The host and port where the xapp manager is running are given by
307 options *-h* and *-p*, or you can define environment variables
308 APPMGR_HOST and APPMGR_PORT to specify them (recommended). The
309 following examples assume they have been specified.
314 $ appmgrcli deploy dummy-xapp
316 "name": "dummy-xapp",
317 "status": "DEPLOYED",
321 "name": "dummy-xapp-667dfc9bfb-wd5m9",
333 $ appmgrcli undeploy dummy-xapp
334 dummy-xapp undeployed
336 # Add some subscriptions
338 $ appmgrcli subscriptions add https://kukkuu.reset created 500 600
340 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
342 "eventType": "created"
344 $ appmgrcli subscriptions add https://facebook.com all 10 4
346 "id": "1IoR85ZwgiNiIn82phUR6qJmBvq",
351 # list and delete (also shows using abbreviations):
354 $ appmgrcli subs list
357 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
358 "targetUrl": "https://kukkuu.reset",
359 "eventType": "created",
364 "id": "1IoR85ZwgiNiIn82phUR6qJmBvq",
365 "targetUrl": "https://facebook.com",
372 $ appmgrcli subs del 1IoR85ZwgiNiIn82phUR6qJmBvq
373 Subscription 1IoR85ZwgiNiIn82phUR6qJmBvq deleted
375 $ appmgrcli subs list
378 "id": "1IoQqEI24sPfLkq8prmMqk6Oz1I",
379 "targetUrl": "https://kukkuu.reset",
380 "eventType": "created",