Skip to content

Commit

Permalink
fix: split compose into 2 files
Browse files Browse the repository at this point in the history
clarifies what to run on Host and what on DPU

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 17, 2023
1 parent ff0906b commit a33c5f9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPOSE_PATH_SEPARATOR=:
COMPOSE_FILE=docker-compose.server.yml:docker-compose.test.yml
41 changes: 0 additions & 41 deletions docker-compose.yml → docker-compose.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -88,42 +76,13 @@ 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:
SERVER_HOST_NAME: "opi"
networks:
- opi

volumes:
dhcp-leases-folder:

networks:
opi:
ipam:
Expand Down
47 changes: 47 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit a33c5f9

Please sign in to comment.