Commit 35ec2e25 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

feat(demas): add standalone deploy playbooks

Add a reusable DEMAS role with deploy and undeploy playbooks, document the new variables, and align the local docker OEG environment with the current SRM credential names expected by the gateway code.
parent 34e9bd3f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ This directory holds shared Ansible variables under `inventory/group_vars/all/`.
- `homer.yml`: Homer settings
- `lite2edge.yml`: Lite2Edge settings
- `i2edge.yml`: i2edge settings
- `demas.yml`: DEMAS compose stack settings

## How to think about overrides

@@ -32,6 +33,7 @@ If you want to change behavior for one run only, prefer `-e`.
- cluster and port mappings: `inventory/group_vars/all/k8s_cluster.yml`
- host-independent kubeconfig defaults: `inventory/group_vars/all/all.yml`
- service ports: component-specific files such as `artefact_manager.yml`, `homer.yml`, `lite2edge.yml`, `federation_manager.yml`
- DEMAS compose source and behavior: `inventory/group_vars/all/demas.yml`

## Common NodePorts

+20 −0
Original line number Diff line number Diff line
---
# Standalone DeMAS stack configuration

demas_local_repo_path: /home/sergio/i2cat/DeMAS/demas
demas_remote_repo_path: "/home/{{ ansible_user | default('ubuntu') }}/demas"

demas_cluster_name: demas-monitoring
demas_namespace: monitoring
demas_kafka_topic: prometheus

demas_thanos_query_port: 32000
demas_thanos_ruler_port: 30905
demas_alertmanager_port: 30903
demas_kafka_ui_port: 30808
demas_rule_manager_port: 30081

demas_rule_manager_service_port: 8888
demas_alert_bridge_service_port: 9097

demas_recreate_cluster: false
+29 −0
Original line number Diff line number Diff line
---
# Playbook: Deploy DEMAS stack
# Description: Deploys the DEMAS-compatible NEF/CoreSim monitoring stack with Docker Compose
# Usage: ansible-playbook playbooks/tools/demas/deploy.yml -e target_hosts=localhost

- name: Deploy DEMAS stack
  hosts: "{{ target_hosts | default('localhost') }}"
  gather_facts: true

  pre_tasks:
    - name: Load secrets
      ansible.builtin.include_vars:
        file: "{{ inventory_dir }}/../secrets.yml"

    - name: Display playbook information
      ansible.builtin.debug:
        msg: |
          ==========================================
          Deploying standalone DeMAS stack
          ==========================================
          Target Host: {{ inventory_hostname }}
          Local source: {{ demas_local_repo_path }}
          Remote source: {{ demas_remote_repo_path }}
          ==========================================

  roles:
    - role: demas
      vars:
        demas_state: present
+18 −0
Original line number Diff line number Diff line
---
# Playbook: Undeploy DEMAS stack
# Description: Stops the DEMAS-compatible NEF/CoreSim monitoring stack managed by Docker Compose
# Usage: ansible-playbook playbooks/tools/demas/undeploy.yml -e target_hosts=localhost

- name: Undeploy DEMAS stack
  hosts: "{{ target_hosts | default('localhost') }}"
  gather_facts: true

  pre_tasks:
    - name: Load secrets
      ansible.builtin.include_vars:
        file: "{{ inventory_dir }}/../secrets.yml"

  roles:
    - role: demas
      vars:
        demas_state: absent
+8 −3
Original line number Diff line number Diff line
@@ -25,9 +25,12 @@ Open Operator Platform (OOP)
├── Supporting Services (support)
│   └── Homer (Dashboard UI)

└── Edge Cloud Platforms (edge)
    ├── i2edge (Full-featured)
    └── lite2edge (Lightweight)
├── Edge Cloud Platforms (edge)
│   ├── i2edge (Full-featured)
│   └── lite2edge (Lightweight)

└── External Integrations
    └── DEMAS (Compose-based NEF/CoreSim stack)
```

## Roles by Category
@@ -67,6 +70,7 @@ These roles deploy services that enhance operator experience and platform usabil
| Role | Purpose | Dependencies |
|------|---------|--------------|
| `homer` | Dashboard UI providing easy access to all platform services | Kind cluster |
| `demas` | Deploys the standalone DeMAS monitoring and alerting stack via its KinD/Helm scripts | Docker, kubectl, Helm, KinD, local DeMAS repo |

**Purpose**: Make life easy for operators through intuitive interfaces.

@@ -236,6 +240,7 @@ All roles use standardized variable patterns:
- **Deploy OOP core?**`srm`, `oeg`, `artefact-manager`, `federation-manager`
- **Add a dashboard?**`homer`
- **Deploy edge platforms?**`i2edge`, `lite2edge`
- **Deploy DEMAS stack?**`demas`
- **Undeploy something?** → Set `<role>_state: absent`
- **Check component health?** → Most roles have `verify.yml` tasks

Loading