Loading Dockerfile +11 −4 Original line number Diff line number Diff line Loading @@ -34,10 +34,17 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Copy application code COPY . . # Install Python dependencies (use ETSI GitLab registry for TF SDK) RUN python -m pip install --no-cache-dir -r requirements.txt \ --extra-index-url https://labs.etsi.org/rep/api/v4/projects/396/packages/pypi/simple \ --trusted-host labs.etsi.org ARG PIP_INDEX_URL ARG PIP_EXTRA_INDEX_URL ARG PIP_TRUSTED_HOST # Create pip.conf for indexes RUN mkdir -p /root/.config/pip && \ echo "[global]" > /root/.config/pip/pip.conf && \ if [ -n "$PIP_INDEX_URL" ]; then echo "index-url = ${PIP_INDEX_URL}" >> /root/.config/pip/pip.conf; fi && \ if [ -n "$PIP_EXTRA_INDEX_URL" ]; then echo "extra-index-url = ${PIP_EXTRA_INDEX_URL}" >> /root/.config/pip/pip.conf; fi && \ if [ -n "$PIP_TRUSTED_HOST" ]; then echo "trusted-host = ${PIP_TRUSTED_HOST}" >> /root/.config/pip/pip.conf; fi # Install Python dependencies RUN python -m pip install --no-cache-dir -r requirements.txt WORKDIR /usr/app/src/ EXPOSE 8989 # Set Gunicorn as the entrypoint Loading src/test/local-deployment/docker-compose.yml +103 −11 Original line number Diff line number Diff line services: k3s: image: rancher/k3s:v1.28.2-k3s1 container_name: k3s privileged: true command: server --disable=traefik --tls-san k3s environment: K3S_TOKEN: secret-token K3S_KUBECONFIG_MODE: "644" tmpfs: - /run - /var/run volumes: - k3s-data:/var/lib/rancher/k3s - k3s-config:/etc/rancher/k3s networks: - local-net - remote-net k3s-kubeconfig: image: python:3.11-alpine container_name: k3s-kubeconfig depends_on: - k3s volumes: - k3s-config:/input:ro - k3s-kubeconfig:/output - ../../../../../OP_Automation/docker-local-deployment/prepare_kubeconfig.py:/prepare_kubeconfig.py:ro command: ["python", "/prepare_kubeconfig.py"] mongodb-local: image: mongo container_name: mongodb-local Loading Loading @@ -69,13 +98,13 @@ services: - "30990:8989" volumes: - ../../conf/config-fm-remote.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config depends_on: - mongodb-remote - keycloak-remote - srm-remote networks: - federation-net - remote-net federation-manager-local: Loading @@ -87,56 +116,119 @@ services: ports: - "8989:8989" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml volumes: - ../../conf/config-fm-local.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - mongodb-local - keycloak-local - srm-local networks: - federation-net - local-net srm-local: build: context: ../../../../../service-resource-manager/service-resource-manager-implementation dockerfile: Dockerfile container_name: srm-local restart: unless-stopped ports: - "8082:8080" environment: EDGE_CLOUD_ADAPTER_NAME: lite2edge ADAPTER_BASE_URL: http://lite2edge-local:8080 PLATFORM_PROVIDER: lite2edge ARTIFACT_MANAGER_ADDRESS: http://artefact-manager:8000 KUBECONFIG: /kubeconfig/kubeconfig.yaml PYTHONPATH: /workspace/tf-sdk/src:/workspace/lite2edge volumes: - ../../../../../tf-sdk/src:/workspace/tf-sdk/src - ../../../../../lite2edge:/workspace/lite2edge - k3s-kubeconfig:/kubeconfig:ro depends_on: - lite2edge-local - k3s-kubeconfig networks: - local-net srm-remote: build: context: ../../../../../service-resource-manager/service-resource-manager-implementation dockerfile: Dockerfile container_name: srm-remote restart: unless-stopped ports: - "8083:8080" environment: EDGE_CLOUD_ADAPTER_NAME: lite2edge ADAPTER_BASE_URL: http://lite2edge-remote:8080 PLATFORM_PROVIDER: lite2edge ARTIFACT_MANAGER_ADDRESS: http://artefact-manager:8000 KUBECONFIG: /kubeconfig/kubeconfig.yaml PYTHONPATH: /workspace/tf-sdk/src:/workspace/lite2edge volumes: - ../../../../../tf-sdk/src:/workspace/tf-sdk/src - ../../../../../lite2edge:/workspace/lite2edge - k3s-kubeconfig:/kubeconfig:ro depends_on: - lite2edge-remote - k3s-kubeconfig networks: - remote-net lite2edge-local: build: context: ../../../../lite2edge context: ../../../../../lite2edge dockerfile: Dockerfile container_name: lite2edge-local restart: unless-stopped ports: - "8752:8080" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml - LOG_LEVEL=INFO volumes: - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - k3s-kubeconfig networks: - local-net lite2edge-remote: build: context: ../../../../lite2edge context: ../../../../../lite2edge dockerfile: Dockerfile container_name: lite2edge-remote restart: unless-stopped ports: - "8751:8080" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml - LOG_LEVEL=INFO volumes: - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - k3s-kubeconfig networks: - remote-net volumes: k3s-data: driver: local k3s-config: driver: local k3s-kubeconfig: driver: local smdbdata-local: driver: local smdbdata-remote: driver: local networks: federation-net: driver: bridge local-net: driver: bridge remote-net: Loading Loading
Dockerfile +11 −4 Original line number Diff line number Diff line Loading @@ -34,10 +34,17 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Copy application code COPY . . # Install Python dependencies (use ETSI GitLab registry for TF SDK) RUN python -m pip install --no-cache-dir -r requirements.txt \ --extra-index-url https://labs.etsi.org/rep/api/v4/projects/396/packages/pypi/simple \ --trusted-host labs.etsi.org ARG PIP_INDEX_URL ARG PIP_EXTRA_INDEX_URL ARG PIP_TRUSTED_HOST # Create pip.conf for indexes RUN mkdir -p /root/.config/pip && \ echo "[global]" > /root/.config/pip/pip.conf && \ if [ -n "$PIP_INDEX_URL" ]; then echo "index-url = ${PIP_INDEX_URL}" >> /root/.config/pip/pip.conf; fi && \ if [ -n "$PIP_EXTRA_INDEX_URL" ]; then echo "extra-index-url = ${PIP_EXTRA_INDEX_URL}" >> /root/.config/pip/pip.conf; fi && \ if [ -n "$PIP_TRUSTED_HOST" ]; then echo "trusted-host = ${PIP_TRUSTED_HOST}" >> /root/.config/pip/pip.conf; fi # Install Python dependencies RUN python -m pip install --no-cache-dir -r requirements.txt WORKDIR /usr/app/src/ EXPOSE 8989 # Set Gunicorn as the entrypoint Loading
src/test/local-deployment/docker-compose.yml +103 −11 Original line number Diff line number Diff line services: k3s: image: rancher/k3s:v1.28.2-k3s1 container_name: k3s privileged: true command: server --disable=traefik --tls-san k3s environment: K3S_TOKEN: secret-token K3S_KUBECONFIG_MODE: "644" tmpfs: - /run - /var/run volumes: - k3s-data:/var/lib/rancher/k3s - k3s-config:/etc/rancher/k3s networks: - local-net - remote-net k3s-kubeconfig: image: python:3.11-alpine container_name: k3s-kubeconfig depends_on: - k3s volumes: - k3s-config:/input:ro - k3s-kubeconfig:/output - ../../../../../OP_Automation/docker-local-deployment/prepare_kubeconfig.py:/prepare_kubeconfig.py:ro command: ["python", "/prepare_kubeconfig.py"] mongodb-local: image: mongo container_name: mongodb-local Loading Loading @@ -69,13 +98,13 @@ services: - "30990:8989" volumes: - ../../conf/config-fm-remote.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config depends_on: - mongodb-remote - keycloak-remote - srm-remote networks: - federation-net - remote-net federation-manager-local: Loading @@ -87,56 +116,119 @@ services: ports: - "8989:8989" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml volumes: - ../../conf/config-fm-local.cfg:/usr/app/src/conf/config.cfg - ../../clients/tf_sdk.py:/usr/app/src/clients/tf_sdk.py - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - mongodb-local - keycloak-local - srm-local networks: - federation-net - local-net srm-local: build: context: ../../../../../service-resource-manager/service-resource-manager-implementation dockerfile: Dockerfile container_name: srm-local restart: unless-stopped ports: - "8082:8080" environment: EDGE_CLOUD_ADAPTER_NAME: lite2edge ADAPTER_BASE_URL: http://lite2edge-local:8080 PLATFORM_PROVIDER: lite2edge ARTIFACT_MANAGER_ADDRESS: http://artefact-manager:8000 KUBECONFIG: /kubeconfig/kubeconfig.yaml PYTHONPATH: /workspace/tf-sdk/src:/workspace/lite2edge volumes: - ../../../../../tf-sdk/src:/workspace/tf-sdk/src - ../../../../../lite2edge:/workspace/lite2edge - k3s-kubeconfig:/kubeconfig:ro depends_on: - lite2edge-local - k3s-kubeconfig networks: - local-net srm-remote: build: context: ../../../../../service-resource-manager/service-resource-manager-implementation dockerfile: Dockerfile container_name: srm-remote restart: unless-stopped ports: - "8083:8080" environment: EDGE_CLOUD_ADAPTER_NAME: lite2edge ADAPTER_BASE_URL: http://lite2edge-remote:8080 PLATFORM_PROVIDER: lite2edge ARTIFACT_MANAGER_ADDRESS: http://artefact-manager:8000 KUBECONFIG: /kubeconfig/kubeconfig.yaml PYTHONPATH: /workspace/tf-sdk/src:/workspace/lite2edge volumes: - ../../../../../tf-sdk/src:/workspace/tf-sdk/src - ../../../../../lite2edge:/workspace/lite2edge - k3s-kubeconfig:/kubeconfig:ro depends_on: - lite2edge-remote - k3s-kubeconfig networks: - remote-net lite2edge-local: build: context: ../../../../lite2edge context: ../../../../../lite2edge dockerfile: Dockerfile container_name: lite2edge-local restart: unless-stopped ports: - "8752:8080" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml - LOG_LEVEL=INFO volumes: - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - k3s-kubeconfig networks: - local-net lite2edge-remote: build: context: ../../../../lite2edge context: ../../../../../lite2edge dockerfile: Dockerfile container_name: lite2edge-remote restart: unless-stopped ports: - "8751:8080" environment: - KUBECONFIG=/root/.kube/config - KUBECONFIG=/kubeconfig/kubeconfig.yaml - LOG_LEVEL=INFO volumes: - /home/sergio/i2cat/OperatorPlatform/OP_Automation/automation/op1/op1-kubeconfig.yaml:/root/.kube/config - k3s-kubeconfig:/kubeconfig:ro depends_on: - k3s-kubeconfig networks: - remote-net volumes: k3s-data: driver: local k3s-config: driver: local k3s-kubeconfig: driver: local smdbdata-local: driver: local smdbdata-remote: driver: local networks: federation-net: driver: bridge local-net: driver: bridge remote-net: Loading