Commit 363a4aad authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

Add lite2edge deployment and undeployment playbooks, configurations, and related tasks

parent 09856f01
Loading
Loading
Loading
Loading
+6 −0
Changes for ansible/group_vars/all.yml: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ harbor_http_nodeport: 30002
harbor_https_nodeport: 30003
i2edge_nodeport: 30769
artefact_manager_nodeport: 30080
lite2edge_nodeport: 30081
federation_manager_nodeport: 30989
keycloak_nodeport: 30082
homer_nodeport: 30088
@@ -77,6 +78,11 @@ port_mappings:
    host_port: "{{ artefact_manager_nodeport }}"
    listen_address: "{{ api_server_address }}"
    protocol: TCP
  - name: "lite2edge"
    container_port: "{{ lite2edge_nodeport }}"
    host_port: "{{ lite2edge_nodeport }}"
    listen_address: "{{ api_server_address }}"
    protocol: TCP
  - name: "Federation Manager"
    container_port: "{{ federation_manager_nodeport }}"
    host_port: "{{ federation_manager_nodeport }}"
+32 −0
Changes for ansible/playbooks/tools/lite2edge/deploy.yml: 32 added lines, 0 removed lines.
Original line number Diff line number Diff line
---
# Playbook: Deploy lite2edge Application
# Description: Deploys lite2edge application to Kind cluster
# Usage: ansible-playbook playbooks/tools/lite2edge/deploy.yml

- name: Deploy lite2edge
  hosts: kind_cluster
  gather_facts: true
  
  pre_tasks:
    - name: Load group variables
      ansible.builtin.include_vars:
        file: "{{ playbook_dir }}/../../../group_vars/all.yml"

    - name: Update kubeconfig path for remote deployment
      ansible.builtin.set_fact:
        kubeconfig_output_dir: "/home/{{ ansible_user }}/kind-cluster-config"
      when: deployment_mode is defined and deployment_mode == 'remote'

    - name: Display playbook information
      ansible.builtin.debug:
        msg: |
          ==========================================
          Deploying lite2edge Application
          ==========================================
          Cluster: {{ kind_cluster_name | default('operator-platform') }}
          ==========================================

  roles:
    - role: lite2edge
      vars:
        lite2edge_state: present
+32 −0
Changes for ansible/playbooks/tools/lite2edge/undeploy.yml: 32 added lines, 0 removed lines.
Original line number Diff line number Diff line
---
# Playbook: Undeploy lite2edge Application
# Description: Undeploys lite2edge application from Kind cluster
# Usage: ansible-playbook playbooks/tools/lite2edge/undeploy.yml

- name: Undeploy lite2edge
  hosts: kind_cluster
  gather_facts: true
  
  pre_tasks:
    - name: Load group variables
      ansible.builtin.include_vars:
        file: "{{ playbook_dir }}/../../../group_vars/all.yml"

    - name: Update kubeconfig path for remote deployment
      ansible.builtin.set_fact:
        kubeconfig_output_dir: "/home/{{ ansible_user }}/kind-cluster-config"
      when: deployment_mode is defined and deployment_mode == 'remote'

    - name: Display playbook information
      ansible.builtin.debug:
        msg: |
          ==========================================
          Undeploying lite2edge Application
          ==========================================
          Cluster: {{ kind_cluster_name | default('operator-platform') }}
          ==========================================

  roles:
    - role: lite2edge
      vars:
        lite2edge_state: absent
+6 −0
Changes for ansible/roles/homer/templates/config.yml.j2: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -75,6 +75,12 @@ services:
        tag: "app"
        url: "http://{{ external_host_ip }}:{{ i2edge_nodeport }}/docs"
        target: "_blank"
      - name: "lite2edge"
        logo: "assets/tools/sample.png"
        subtitle: "Kubernetes Adapter"
        tag: "app"
        url: "http://{{ external_host_ip }}:{{ lite2edge_nodeport }}/docs"
        target: "_blank"

  - name: "Infrastructure"
    icon: "fas fa-server"
+12 −0
Changes for ansible/roles/lite2edge/defaults/main.yml: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
---
# lite2edge paths and configuration
lite2edge_image: gitlab.i2cat.net:5050/areas/software-networks/operator-platform/lite2edge:latest
lite2edge_namespace: lite2edge
lite2edge_target_namespace: "lite2edge_deployments"
lite2edge_cluster_name: "{{ kind_cluster_name }}"
lite2edge_kubeconfig: "{{ kubeconfig_output_dir }}/{{ kubeconfig_filename }}"

# Registry configuration (credentials should be passed via extra vars or vault)
lite2edge_registry: gitlab.i2cat.net:5050
lite2edge_image_pull_secret: gitlab-registry-secret
lite2edge_registry_email: ""
 No newline at end of file
Loading