Commit b4da2662 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

Update docs

parent 8949a6e0
Loading
Loading
Loading
Loading
+79 −0
Original line number Diff line number Diff line
# Dual OOP Deployment

This scenario deploys two complete, independent Operator Platform (OP) instances on two separate sets of nodes. This is useful for testing federation, inter-domain communication, and other multi-operator scenarios.

## Prerequisites

1. **Inventory Configuration**: You must define two groups in your inventory: `op1_nodes` and `op2_nodes`. Each group should contain the target host(s) for that specific OP instance.

    Example `ansible/inventory/hosts.yml`:

    ```yaml
    all:
      children:
        op1_nodes:
          hosts:
            node_for_op1:
        op2_nodes:
          hosts:
            node_for_op2:
    ```

2. **Resources**: Ensure both target environments have sufficient resources to run a full OP stack (Kind cluster, Harbor, Federation Manager, etc.). Note that this takes a several amount of resources.

## Deployment

To deploy both OPs, run the scenario playbook:

```bash
ansible-playbook playbooks/scenarios/deploy_two_full_oops.yml
```

### Partial Deployment (Tags)

You can deploy only one of the OPs using Ansible tags:

- **Deploy only OP1**:

  ```bash
  ansible-playbook playbooks/scenarios/deploy_two_full_oops.yml --tags op1
  ```

- **Deploy only OP2**:

  ```bash
  ansible-playbook playbooks/scenarios/deploy_two_full_oops.yml --tags op2
  ```

## Architecture

This playbook performs the following for **each** OP instance (OP1 and OP2):

1. **Infrastructure**:
    - Deploys a **Kind Cluster** (Kubernetes).
    - Installs **Node Feature Discovery** and **Prometheus**.
2. **Services**:
    - **Harbor**: Private artefact registry.
    - **Artefact Manager**: Manages network function artefacts.
    - **Federation Manager**: Handles federation logic.
    - **Lite2Edge**: Kubernetes adapter.
    - **Homer**: Dashboard for service visibility.

## Access

Each OP will have its own set of services accessible via the IP of its respective node.

| Service | Port | Description |
| :--- | :--- | :--- |
| **Dashboard** | 30088 | Central dashboard for all services |
| **Harbor** | 30002 | Artefact Registry |
| **Artefact Manager** | 30080 | API |
| **Federation Manager** | 30989 | API |

## Cleanup

To undeploy both environments, use the corresponding cleanup playbook (ensure it exists and is targeted correctly):

```bash
ansible-playbook playbooks/scenarios/quick_undeploy_full_oops.yml
```
+75 −0
Original line number Diff line number Diff line
# Manual Tool Deployment

If you need to deploy specific components individually or want to customize a single component without running a full scenario, you can use the tool-specific playbooks.

## Common Usage

Run any tool playbook from the `ansible` directory:

```bash
cd ansible
ansible-playbook playbooks/tools/<component>/deploy.yml
```

You can override default variables using `-e`:

```bash
ansible-playbook playbooks/tools/federation-manager/deploy.yml -e "federation_manager_port=31000"
```

## Available Components

### Artefact Manager

Manages the lifecycle and storage of network function artefacts.

- **Playbook**: `playbooks/tools/artefact-manager/deploy.yml`
- **Default Port**: `30080` (NodePort)
- **Dependencies**: Requires a running Kubernetes cluster.

### Federation Manager

Handles the federation logic and inter-domain communication.

- **Playbook**: `playbooks/tools/federation-manager/deploy.yml`
- **Default Port**: `30989` (NodePort)
- **Key Variables**:
  - `federation_manager_image`: Docker image to use.
  - `federation_manager_ecp_port`: Port of the Edge Cloud Platform (adapter) to connect to.

### Harbor (Artefact Registry)

A private container registry used to store and serve artefacts.

- **Playbook**: `playbooks/tools/harbor/deploy.yml`
- **Default Web UI**: `30002` (NodePort)
- **Default Credentials**: `admin` / `Harbor12345` (Change in production!)

### Homer (Dashboard)

A static dashboard to visualize links to all deployed services.

- **Playbook**: `playbooks/tools/homer/deploy.yml`
- **Default Port**: `30088` (NodePort)
- **Configuration**: Automatically discovers enabled services defined in Ansible variables.

### Lite2Edge (EdgeCloud Adapter)

The Kubernetes adapter for the Operator Platform.

- **Playbook**: `playbooks/tools/lite2edge/deploy.yml`
- **Registry Auth**:
    If the image is in a private registry:

    ```bash
    ansible-playbook playbooks/tools/lite2edge/deploy.yml \
      -e "lite2edge_registry_username=user" \
      -e "lite2edge_registry_password=pass"
    ```

### i2Edge

Deployment of i2Edge components.

- **Playbook**: `playbooks/tools/i2edge/deploy.yml`
- **Note**: Requires `playbooks/02-install-i2edge-dependencies.yml` to be run first.
+4 −82
Original line number Diff line number Diff line
# Quick Start Guide

This guide covers deployment options for the Operator Platform.

## "Single OOP Deployment (Kind)"
# Quick Start

This is the fastest way to get a full-ish Operator Platform environment running. It deploys a lightweight Kubernetes cluster (using [Kind](https://kind.sigs.k8s.io/)) on a single machine and installs all components automatically. It is ideal for quickly testing the OOP.

### 1. Prepare The Inventory
### Prepare The Inventory

Add your target machine (e.g., a fresh Ubuntu VM) to `ansible/inventory/hosts.yml`, or even your laptop for a quick test.

@@ -24,7 +20,7 @@ Add your target machine (e.g., a fresh Ubuntu VM) to `ansible/inventory/hosts.ym
            your_vm_name:
```

### 2. Deploy Everything
### Deploy Everything

Run the "Single OOP" scenario playbook. This handles the needded python dependencies, installs docker if not installed already, creates a kubernetes cluster, and installs a minimal number of OOP components. Specifically, this playbook install the following modules:

@@ -46,84 +42,10 @@ Run the "Single OOP" scenario playbook. This handles the needded python dependen
        - **Infrastructure:** Kind Cluster, Prometheus, Node Feature Discovery.
        - **Services:** Harbor, Artefact Manager, Federation Manager (x2), Homer Dashboard, Lite2Edge.

### 3. Access the Platform
### Access the Platform

Once the playbook finishes, access the **Dashboard** to see all services:

* **URL:** `http://<VM_IP>:30088`

![dashboard](./images/dashboard_screenshot.png)

=== "Prod-ready / Custom Deployment"

    For production environments or custom setups, you should execute the deployment steps individually. This allows for greater control over each component and is suitable for multi-node clusters or integrating with existing infrastructure.

    ## 1. Prepare The Inventory

    Configure your `ansible/inventory/hosts.yml` as described in the [Getting Started](getting-started.md) guide.

    ## 2. Install Dependencies

    Ensure you are in the `ansible` directory with your virtual environment activated:

    ```bash
    source venv/bin/activate
    ```

    Install node dependencies:

    ```bash
    ansible-playbook playbooks/tools/prerequisites/install-python-deps.yml
    ansible-playbook playbooks/tools/prerequisites/setup-docker.yml
    ansible-playbook playbooks/tools/prerequisites/setup-kubectl.yml
    ansible-playbook playbooks/tools/prerequisites/setup-python-libs.yml
    ```

    ## 3. Deploy Infrastructure

    Deploy the Kubernetes cluster (Kind) or configure your existing cluster connection.

    ```bash
    # Deploys a Kind cluster (skip if using existing K8s)
    ansible-playbook playbooks/infrastructure/kind-cluster/deploy.yml
    ```

    Once the cluster is ready, you can export the kubeconfig:
    ```bash
    export KUBECONFIG=$(pwd)/automation/1-kind-cluster/operator-platform-external-kubeconfig.yaml
    kubectl get nodes
    ```

    ## 4. Deploy Components

    Install components individually as needed:

    **Harbor (Artefact Registry):**
    ```bash
    ansible-playbook playbooks/tools/harbor/deploy.yml
    # Access: http://VM_IP:30002 (admin/Harbor12345)
    ```

    **Artefact Manager:**
    ```bash
    ansible-playbook playbooks/tools/artefact-manager/deploy.yml
    # Access: http://VM_IP:30080
    ```

    **Federation Manager:**
    ```bash
    ansible-playbook playbooks/tools/federation-manager/deploy.yml
    ansible-playbook playbooks/tools/federation-manager/deploy-remote.yml # Optional second instance
    # Access: http://VM_IP:30989 and http://VM_IP:30990
    ```

    **Lite2Edge (K8s Adapter):**
    ```bash
    ansible-playbook playbooks/tools/lite2edge/deploy.yml
    ```

    **Dashboard:**
    ```bash
    ansible-playbook playbooks/tools/homer/deploy.yml
    # Access: http://VM_IP:30088
    ```