Starting ADE with macvlan network configurationΒΆ
In situations where ADE needs to communicate with external resources (e.g., sensors), it is possible to use a Macvlan network to assign the ADE container a MAC address, such that the container appears to be physically connected to the network interface. Macvlan gives the advantage of allowing the container to be isolated from the host while appearing as a physical device on the network.
To use Macvlan, follow the offical Docker documentation to create a
docker network
(e.g. pub_net
), then run ade start
with an extra Docker arguments: e.g
On the host create a macvlan network:
$ docker network create -d macvlan --subnet 192.168.1.0/24 --gateway 192.168.1.1 -o parent=eno1 pub_net
- Note
The subnet and gatewar must match the local network settings
Start
ade
withpub_net
and an unused IP address:$ ade start -- --net=pub_net --ip=192.168.1.101
3. To avoid typing the arguments every time, add the option to ADE_DOCKER_RUN_ARGS
in
the .aderc
: e.g,
export ADE_DOCKER_RUN_ARGS="
--cap-add=SYS_PTRACE
--net=pub_net
--ip=192.168.1.101
"
export ADE_GITLAB=gitlab.com
export ADE_REGISRTY=registry.gitlab.com
export ADE_IMAGES="
registry.gitlab.com/autowareauto/autowareauto/ade:v0-1-0
registry.gitlab.com/autowareauto/autowareauto:v0-1-0
registry.gitlab.com/apexai/ade-atom:latest
"