From b32c552fddcd7d96351dad4342f6b5c4742541ea Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 16 Jan 2019 12:12:17 -0500 Subject: [PATCH] Flag to disable creation of default node --- README.md | 10 ++++++++-- webodm.sh | 13 ++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e9a1e7b..e30ad513 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A free, user-friendly, extendable application and [API](http://docs.webodm.org) * [Getting Started](#getting-started) - * [Add More Processing Nodes](#add-more-processing-nodes) + * [Manage Processing Nodes](#manage-processing-nodes) * [Enable SSL](#enable-ssl) * [Where Are My Files Stored?](#where-are-my-files-stored) * [Common Troubleshooting](#common-troubleshooting) @@ -80,7 +80,7 @@ For Windows and macOS users an [installer](https://www.webodm.org/installer) is You can also run WebODM from a Live USB/DVD. See [LiveODM](https://www.opendronemap.org/liveodm/). -### Add More Processing Nodes +### Manage Processing Nodes WebODM can be linked to one or more processing nodes running [NodeODM](https://github.com/OpenDroneMap/NodeODM). The default configuration already includes a "node-odm-1" processing node which runs on the same machine as WebODM, just to help you get started. As you become more familiar with WebODM, you might want to install processing nodes on separate machines. @@ -88,6 +88,12 @@ Adding more processing nodes will allow you to run multiple jobs in parallel. You **will not be able to distribute a single job across multiple processing nodes**. We are actively working to bring this feature to reality, but we're not there yet. +If you don't need the default "node-odm-1" node, simply pass the `--no-default-node` flag when starting WebODM: + +`./webodm.sh restart --no-default-node`. + +Then from the web interface simply manually remove the "node-odm-1" node. + ### Enable SSL WebODM has the ability to automatically request and install a SSL certificate via [Let’s Encrypt](https://letsencrypt.org/), or you can manually specify your own key/certificate pair. diff --git a/webodm.sh b/webodm.sh index 6c02d70f..535f7ee3 100755 --- a/webodm.sh +++ b/webodm.sh @@ -28,6 +28,8 @@ elif [[ $platform = "MacOS / OSX" ]] && [[ $(pwd) == /Users* ]]; then plugins_volume=true fi +load_default_node=true + # Load default values source .env DEFAULT_PORT="$WO_PORT" @@ -91,6 +93,10 @@ case $key in plugins_volume=true shift # past argument ;; + --no-default-node) + load_default_node=false + shift # past argument + ;; *) # unknown option POSITIONAL+=("$1") # save it in an array for later shift # past argument @@ -125,6 +131,7 @@ usage(){ echo " --port Set the port that WebODM should bind to (default: $DEFAULT_PORT)" echo " --hostname Set the hostname that WebODM will be accessible from (default: $DEFAULT_HOST)" echo " --media-dir Path where processing results will be stored to (default: $DEFAULT_MEDIA_DIR (docker named volume))" + echo " --no-default-node Do not create a default NodeODM node attached to WebODM on startup (default: disabled)" echo " --ssl Enable SSL and automatically request and install a certificate from letsencrypt.org. (default: $DEFAULT_SSL)" echo " --ssl-key Manually specify a path to the private key file (.pem) to use with nginx to enable SSL (default: None)" echo " --ssl-cert Manually specify a path to the certificate file (.pem) to use with nginx to enable SSL (default: None)" @@ -193,7 +200,11 @@ start(){ echo "Make sure to issue a $0 down if you decide to change the environment." echo "" - command="docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml" + command="docker-compose -f docker-compose.yml" + + if [[ $load_default_node = true ]]; then + command+=" -f docker-compose.nodeodm.yml" + fi if [ "$WO_SSL" = "YES" ]; then if [ ! -z "$WO_SSL_KEY" ] && [ ! -e "$WO_SSL_KEY" ]; then