Run Docker container without the controller service

This adds the option to run the Docker container without the controller
service running on the container.
This is useful in order to create separation between the Dragonflow
API (df-db) and the controller service.

Related-Bug: #1778007

Change-Id: I4fb77ae03e47942a75d34bfb4f8c80db21a3aec6
This commit is contained in:
Lihi Wishnitzer 2018-07-16 11:52:29 +03:00
parent a85d2ec86b
commit b033bc42c1
2 changed files with 19 additions and 2 deletions

View File

@ -78,3 +78,17 @@ automatically if they do not exist:
If these files exist, they are used as-is, and are not overwritten. You can add
these files using e.g.
`-v local-dragonflow-conf.ini:/etc/dragonflow/dragonflow.ini`.
Running the container without the controller service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This enables you to run the container without running the container service.
This is useful in order to create a standalone node for Dragonflow API,
separated from the controller node.
* Run the following commands:
.. code-block:: bash
docker run --name dragonflow --net $DRAGONFLOW_NET_NAME --ip ${DRAGONFLOW_ADDRESS} -e DF_NO_CONTROLLER=1 -i -t dragonflow:latest --dragonflow_address ${DRAGONFLOW_ADDRESS} --db_address ${NODE1}:2379

View File

@ -46,5 +46,8 @@ if [ -n "$DB_INIT" ]; then
df-db init
fi
/usr/local/bin/df-local-controller --config-file /etc/dragonflow/dragonflow.ini
if [ -z "$DF_NO_CONTROLLER" ]; then
/usr/local/bin/df-local-controller --config-file /etc/dragonflow/dragonflow.ini
else
/bin/bash
fi