From be5a4d12dc01a483e62ec001ee295f70604c7319 Mon Sep 17 00:00:00 2001 From: "preethika.p" Date: Mon, 25 Apr 2022 07:31:14 +0000 Subject: [PATCH] appending kamailio actions to kamailio_sipp section Signed-off-by: preethika.p --- 05-quickstarts.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/05-quickstarts.md b/05-quickstarts.md index 0101b6e..d002df3 100644 --- a/05-quickstarts.md +++ b/05-quickstarts.md @@ -1124,6 +1124,10 @@ applications: sipp-image: grigiu/sipp:latest ``` +Two Workloads in juju-bundle +- Kamailio: SIP Server +- SIPP: SIP Client + The charms referenced in this bundle is local which is present as part of package. For more details of kamailio charm refer [here](https://github.com/davigar15/kamailio-operator) and on sipp charm refer [here](https://github.com/davigar15/sipp-operator). @@ -1134,6 +1138,21 @@ The file `kamailio_cnfd.yaml` is the CNF descriptor, which models a single KDU ( For day-0 configuration in OSM, cloud-init is usually used, but that is not available in CNFs. Instead, in the juju bundle, we could be able to define some options to the charms, that will be considered at deployment time. These configs could trigger some internal actions in the charms, so we can consider these as day-0 actions. +- In Kamailio + +```yaml + kamailio: + charm: ./kamailio-k8s_ubuntu-20.04-amd64.charm + scale: 1 + trust: true + options: # <-- OPTIONS FOR THE CHARM HERE + sip-domain: localhost + resources: + kamailio-image: kamailio/kamailio:5.3.3-stretch +``` + +- In SIPP + ```yaml sipp: charm: ./sipp-k8s_ubuntu-20.04-amd64.charm @@ -1150,6 +1169,28 @@ Generally, Day 1 actions can be specified under the `initial-config-primitive` s Day 2 actions are specifies under the `config-primitive` section in the vnfd descriptor. +- Day 2 action for Kamailio application. + +```yaml +- name: restart + parameter: + - name: application-name + data-type: STRING + default-value: kamailio +- name: start + parameter: + - name: application-name + data-type: STRING + default-value: kamailio +- name: stop + parameter: + - name: application-name + data-type: STRING + default-value: kamailio +``` + +- Day 2 action for SIPP application. + ```yaml config-primitive: - name: options @@ -1231,12 +1272,24 @@ Furthermore, you can check: #### Step 4: Execute Day 2 action +- Execute Day2 action in SIPP. + ``` osm ns-action --action_name options --vnf_name kamailio --kdu_name kamailio-kdu --params '{ip: SIP_SERVER_IP}' kamailio_sipp ``` Action "options" is executed against SIPP KDU which allows a User Agent (UA) to query another UA or a proxy regarding its capabilities. +- Execute Day2 action in Kamailio. + +``` +osm ns-action --action_name stop --vnf_name kamailio --kdu_name kamailio-kdu kamailio_sipp +``` + +Action "stop" stops the kamailio service running and to confirm the same, `juju status -m kamailio-kdu-NS_ID` where the status of kamailio unit will turn to `kamailio service is not running`. + +Similarly Action "start" to start the kamailio service and action "restart" to restart the kamailio service. + Furthermore, you can check: - The status of the action can be identified with `osm ns-op-list kamailio_sipp` command or visiting the GUI. -- GitLab