diff --git a/doc/source/docker_install.rst b/doc/source/docker_install.rst index 13582a0ca..122383800 100644 --- a/doc/source/docker_install.rst +++ b/doc/source/docker_install.rst @@ -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 diff --git a/tools/run_dragonflow.sh b/tools/run_dragonflow.sh index a353e7aed..2d46e942d 100755 --- a/tools/run_dragonflow.sh +++ b/tools/run_dragonflow.sh @@ -54,5 +54,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