From a33c5f9d0d24be6e569cb4b8ca69a986286b6ee0 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Tue, 17 Oct 2023 04:22:35 +0300 Subject: [PATCH] fix: split compose into 2 files clarifies what to run on Host and what on DPU Signed-off-by: Boris Glimcher --- .env | 2 + ...r-compose.yml => docker-compose.server.yml | 41 ---------------- docker-compose.test.yml | 47 +++++++++++++++++++ 3 files changed, 49 insertions(+), 41 deletions(-) create mode 100644 .env rename docker-compose.yml => docker-compose.server.yml (72%) create mode 100644 docker-compose.test.yml diff --git a/.env b/.env new file mode 100644 index 00000000..97e66856 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +COMPOSE_PATH_SEPARATOR=: +COMPOSE_FILE=docker-compose.server.yml:docker-compose.test.yml \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.server.yml similarity index 72% rename from docker-compose.yml rename to docker-compose.server.yml index c3472513..f78f5973 100644 --- a/docker-compose.yml +++ b/docker-compose.server.yml @@ -67,18 +67,6 @@ services: - opi command: sh -e -u -x -c 'touch /var/lib/dhcp/dhcpd.leases && eval "echo \"$$(cat /opt/dhcpd.conf.template)\"" > /etc/dhcp/dhcpd.conf && dhcpd -d' - nmap: - image: docker.io/instrumentisto/nmap:7.94 - networks: - - opi - command: --script broadcast-dhcp-discover - - nmapmdnsclient: - image: docker.io/instrumentisto/nmap:7.94 - networks: - - opi - command: --script=dns-service-discovery -p 5353 avahi - web: image: docker.io/library/httpd:2.4.57-alpine3.17 volumes: @@ -88,32 +76,6 @@ services: networks: - opi - client: - image: docker.io/modularitycontainers/dhcp-client:latest - cap_add: - - CAP_NET_RAW - volumes: - - dhcp-leases-folder:/var/lib/dhclient/ - - ./dhcp/dhclient.conf:/etc/dhcp/dhclient.conf - networks: - - opi - command: dhclient -d -v - - agent: - image: ghcr.io/opiproject/opi-sztp-client:main - build: - context: sztp-agent - depends_on: - bootstrap: - condition: service_healthy - redirecter: - condition: service_healthy - volumes_from: - - client - networks: - - opi - command: ['/opi-sztp-agent', 'daemon'] - avahi: image: docker.io/flungo/avahi:latest environment: @@ -121,9 +83,6 @@ services: networks: - opi -volumes: - dhcp-leases-folder: - networks: opi: ipam: diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 00000000..8e741d5c --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2022-2023 Dell Inc, or its subsidiaries. +--- +version: '3.7' + +services: + + nmap: + image: docker.io/instrumentisto/nmap:7.94 + networks: + - opi + command: --script broadcast-dhcp-discover + + nmapmdnsclient: + image: docker.io/instrumentisto/nmap:7.94 + networks: + - opi + command: --script=dns-service-discovery -p 5353 avahi + + client: + image: docker.io/modularitycontainers/dhcp-client:latest + cap_add: + - CAP_NET_RAW + volumes: + - dhcp-leases-folder:/var/lib/dhclient/ + - ./dhcp/dhclient.conf:/etc/dhcp/dhclient.conf + networks: + - opi + command: dhclient -d -v + + agent: + image: ghcr.io/opiproject/opi-sztp-client:main + build: + context: sztp-agent + depends_on: + bootstrap: + condition: service_healthy + redirecter: + condition: service_healthy + volumes_from: + - client + networks: + - opi + command: ['/opi-sztp-agent', 'daemon'] + +volumes: + dhcp-leases-folder: