With the previous SA architecture based on POL and MON, it is possible to enable/disable autoscaling by patching the POL deployment in kubernetes:
The steps are given below:
1. To enable the autoscaling feature, modify the env `OSMPOL_AUTOSCALE_ENABLED` to `True` in `pol` deployment:
```bash
kubectl -n osm edit deployment pol
```
```yaml
OSMPOL_AUTOSCALE_ENABLED:True
```
2. To disable the autoscaling feature, modify the env `OSMPOL_AUTOSCALE_ENABLED` to `False` in `pol` deployment:
```bash
kubectl -n osm edit deployment pol
```
```yaml
OSMPOL_AUTOSCALE_ENABLED:False
```
With the new architecture, Airflow DAGs for scaling can be selectively disabled in Airflow UI by pressing the toggle next to the DAG to pause/unpause it:
-`scalein_vdu`, to enable/disable auto-scale-in
-`scaleout_vdu`, to enable/disable auto-scale-out
#### Example
This will launch a Network Service formed by an HAProxy load balancer and an (autoscalable) Apache web server. Please check:
@@ -1444,6 +1475,42 @@ osm ns-list
osm ns-show heal
```
#### How to enable/disable autohealing
With the previous SA architecture, it is possible to enable/disable autohealing by patching the POL deployment in kubernetes:
The steps are given below:
1. To enable the autohealing feature
- change the env `OSMPOL_AUTOHEAL_ENABLED` to `True` in devops dockerfile.
- To enable during runtime, in pol deployment file modify the env `OSMPOL_AUTOHEAL_ENABLED` to `True`.
```bash
kubectl -n osm edit deployment pol
```
```yaml
-env:
-name:OSMPOL_AUTOHEAL_ENABLED
value:True
```
2. To disable the autohealing feature
- change the env `OSMPOL_AUTOHEAL_ENABLED` to `False` in devops dockerfile.
- To disable during runtime, in pol deployment file modify the env `OSMPOL_AUTOHEAL_ENABLED` to `False`.
```bash
kubectl -n osm edit deployment pol
```
```yaml
- env:
- name: OSMPOL_AUTOHEAL_ENABLED
value: False
```
With the new architecture, Airflow DAGs for healing can be selectively disabled in Airflow UI by pressing the toggle next to the DAG to pause/unpause it:
- vdu_down, to enable/disable auto-heal
#### Testing:
1. To ensure NS is instantiated successfully, check metrics at Prometheus, visit `http://[OSM_IP]:9091` and look for `osm_vm_status`. Metric value should be '1'.