tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

Use docker-compose to manage services

Open hwchiu opened this issue 6 years ago • 1 comments

#1 and #2 issues are the same problems, we used the magic DNS name host.docker.internal in configuration files and it only works in docker in MAC environment, not Linux.

Mininet/P4Runtime Shell/ONOS

  • To fix this problem, I replace all previous scripts with docker-compose and makefile. By the docker-compose, we using simple Linux bridge to connect all containers together and then can access them its name. like mininet:50001.
  • P4Runtime shell should wait for the mininet to be ready, not container status, but the application status. and it's not supported by docker compose. I use another container to wait for it by testing the connection mininiet:50001
  • Already tested in MAC and Ubuntu.

netcfg

  1. Fix the wrong config file name in netfcg.json, it was netcfg-3switch but it should be netcfg.json.
  2. Use the makefile command to push netcfg to ONOS controller.
$ make netcfg

gnmi

  1. We need to attach the gnmi container to the same network running by docker-compose, and we can get it by adding the --network arguments in its docker run command.
  2. Add the command into Makefile and then wrap the arguments in a variable ARGS so that we can execute the gnmi command in the following way.
$ make ARGS="get xxxxxxx" gnmi

hwchiu avatar Sep 20 '19 22:09 hwchiu

close when #5 be merged

hwchiu avatar Oct 10 '19 18:10 hwchiu