Commit 26dc69be authored by garciadav's avatar garciadav
Browse files

Update test procedures for VNF Proxy charms, native charms, vnf relations, ns...

Update test procedures for VNF Proxy charms, native charms, vnf relations, ns relations. Add ha-proxy-charm procedure
parent 1c8435ff
Loading
Loading
Loading
Loading
+230 −125

File changed.

Preview size limit exceeded, changes collapsed.

+75 −0
Original line number Diff line number Diff line
@@ -198,6 +198,81 @@ For more details on the current operation, run "osm ns-op-show OPERATION_ID"

The network service should be removed fine, without leaving models behind.

### \[PR-02\] HA Proxy Charms

[VNFD Package](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/tree/master/charm-packages/ha_proxy_charm_vnf)

[NSD Package](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/tree/master/charm-packages/ha_proxy_charm_ns)

Create a params.yaml file that will force 2 units of the vnf-member-index=1 Proxy Charm:

```yaml
additionalParamsForVnf:
  - member-vnf-index: "1"
    config-units: 2
```

```bash
$ osm ns-create --ns_name ha-proxy-charms --nsd_name  ha_proxy_charm-ns --vim_account openstack --config_file params.yaml
7a8b8fb1-3cea-4e86-8cf3-178771d9ac3a
$ juju switch 7a8b8fb1-3cea-4e86-8cf3-178771d9ac3a
controller:admin/default -> controller:admin/7a8b8fb1-3cea-4e86-8cf3-178771d9ac3a
$ watch -c juju status --color
Model                                 Controller  Cloud/Region       Version  SLA          Timestamp
7a8b8fb1-3cea-4e86-8cf3-178771d9ac3a  controller  lxd-cloud/default  2.8.0    unsupported  12:42:29+02:00

App                   Version  Status  Scale  Charm            Store  Rev  OS      Notes
app-vnf-3922753a5d75           active      2  simple-ha-proxy  local    0  ubuntu
app-vnf-feba90bf85a7           active      1  simple-ha-proxy  local    1  ubuntu

Unit                     Workload  Agent  Machine  Public address  Ports  Message
app-vnf-3922753a5d75/0*  active    idle   0        10.54.156.223
app-vnf-3922753a5d75/1   active    idle   2        10.54.156.29
app-vnf-feba90bf85a7/0*  active    idle   1        10.54.156.128

Machine  State    DNS            Inst id        Series  AZ  Message
0        started  10.54.156.223  juju-cf61c0-0  xenial      Running
1        started  10.54.156.128  juju-cf61c0-1  xenial      Running
2        started  10.54.156.29   juju-cf61c0-2  xenial      Running
```

We can see there are two units for the Proxy Charm of the vnf-member-index=1. The units that have `*` are the leaders. Now we will remove leader machine of the scaled Proxy Charm.

```bash
$ juju remove-machine 0 --force
$ juju status
Model                                 Controller  Cloud/Region       Version  SLA          Timestamp
7a8b8fb1-3cea-4e86-8cf3-178771d9ac3a  controller  lxd-cloud/default  2.8.0    unsupported  12:48:27+02:00

App                   Version  Status  Scale  Charm            Store  Rev  OS      Notes
app-vnf-3922753a5d75           active      1  simple-ha-proxy  local    0  ubuntu
app-vnf-feba90bf85a7           active      1  simple-ha-proxy  local    1  ubuntu

Unit                     Workload  Agent  Machine  Public address  Ports  Message
app-vnf-3922753a5d75/1*  active    idle   2        10.54.156.29
app-vnf-feba90bf85a7/0*  active    idle   1        10.54.156.128

Machine  State    DNS            Inst id        Series  AZ  Message
1        started  10.54.156.128  juju-cf61c0-1  xenial      Running
2        started  10.54.156.29   juju-cf61c0-2  xenial      Running
```

Now the second unit is the leader. Let's execute an action.

```bash
$ osm ns-action ha-proxy-charms --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mysecondunit}'
c4a32267-8d62-4751-9c0f-8c0f65b9ccc7
$ osm ns-op-list ha-proxy-charms
+--------------------------------------+-------------+-------------+-----------+---------------------+--------+
| id                                   | operation   | action_name | status    | date                | detail |
+--------------------------------------+-------------+-------------+-----------+---------------------+--------+
| 3bc998b2-f120-485b-bbfd-6965e800b960 | instantiate | N/A         | COMPLETED | 2020-07-13T12:41:10 | -      |
| c4a32267-8d62-4751-9c0f-8c0f65b9ccc7 | action      | touch       | COMPLETED | 2020-07-13T12:49:34 | -      |
+--------------------------------------+-------------+-------------+-----------+---------------------+--------+
```

The action has been successfully executed.

## Kubernetes Features

### [K8S-01] Kubernetes Proxy Charms