rhastie / easy-nmos

Easy NMOS setup an testing using Docker compose/available containers
Apache License 2.0
60 stars 9 forks source link

docker-compose up ERROR launching #32

Open BillClaghorn opened 4 months ago

BillClaghorn commented 4 months ago

OS Ubuntu 2204 Docker version 26.1.4, build 5650f9b docker-compose version 1.29.2, build unknown docker-compose.yml.txt NVIDIA-SMI 555.42.02 CUDA Version: 12.5 Cuda compilation tools, release 12.5, V12.5.40 Build cuda_12.5.r12.5/compiler.34177558_0 rivermax_ubuntu2204_1.50.7

docker-compose up ERROR: yaml.scanner.ScannerError: while scanning a simple key in "./docker-compose.yml", line 52, column 5 could not find expected ':' in "./docker-compose.yml", line 53, column 5

Docker-compose.yml is attached

garethsb commented 4 months ago

volumes:external facing interface looks like a mistake

BillClaghorn commented 4 months ago

The instructions are vague in that area. Please clarify.

Create AMWA NMOS Testing container instance

nmos-testing: image: amwa/nmos-testing:latest container_name: nmos-testing hostname: nmos-testing domainname: local entrypoint: | /bin/bash -c "/etc/init.d/dbus start; /etc/init.d/avahi-daemon start; python3 nmos-test.py" ports:

networks: external:

Create external macvlan subnet using host physical interface allowing containers to have their own IP addresses

    driver: macvlan
    driver_opts:
        parent: enp7s0.10
    ipam:
        config:
        - subnet: 10.0.0.0/24

UserConfig.py.txt

rhastie commented 4 months ago

You have a typo on line 52 of your docker-compose.yaml. This is failing the scanner check and isn't valid YAML.

Please use docker-compose.yaml in the repo as a template and check lines 52 and 53 in your config. Remove the words after the ":" i.e. external facing interface.

BillClaghorn commented 4 months ago

Thanks. Somehow that got in there when editing.

Now I get this: bill@H4Mibc3:~/Downloads/easy-nmos$ docker-compose up Creating network "easy-nmos_external" with driver "macvlan" ERROR: -o parent interface was not found on the host: enp7s0

I'm unclear how that all works.

BillClaghorn commented 4 months ago

Create external macvlan subnet using host physical interface allowing containers to have their own IP addresses

    driver: macvlan
    driver_opts:
        parent: enp7s0.10
    ipam:
        config:
        - subnet: 10.0.0.0/24

If I leave the parent at enp7s0 without ":10" I get an error

invalid subinterface vlan name enp7s0, example formatting is eth0.10

Do I need to setup a VLAN and if so how?

BillClaghorn commented 4 months ago

bill@H4Mibc3:~/Downloads/easy-nmos$ docker network create -d macvlan --subnet=10.0.0.0/24 --gateway=10.0.0.1 -o parent=enp7s0.10 pub_net

Error response from daemon: -o parent interface was not found on the host: enp7s0

rhastie commented 4 months ago

You do NOT need a VLAN. Do NOT create any bridges manually you will go wrong.

  1. Make sure you use docker-compose down to back out any partial configs before editing the YAML.
  2. As per docs, you must have a host interface available. You will struggle trying to do this in a VM if you don't understand how to route through the hypervisor layer.
  3. You must have IP addresses for the containers in the EXACT SAME subnet as you host IP address. Eg. If your host interface IP is 10.10.10.10 in a subnet of 255.255.255.0 then... You must assign IP addressing in the YAML in the range 10.10.10.1-255 and the same subnet ie /24.
  4. Parent in YAML must be the physical interface eg. Ens33 etc. DO NOT use any sub-interfacing eg. VLANs as you won't see the tagged traffic.
  5. Once your Compose is up you MUST access from an external IP. You can not do this from the host directly as the bridge will not allow it.
BillClaghorn commented 4 months ago

It looks like I work if I set parent to eth0:10 if I run "ip a" or "ifconfig" I don't see eth0

Oh well, it seems to be working with phantom eth0

BillClaghorn commented 4 months ago

Thanks. I'll ask one of our network guru's to explain.