npm / npme-installer

npm Enterprise installer
https://www.npmjs.com/enterprise
Other
35 stars 21 forks source link

Add no-docker CLI option to install command #148

Open nexdrew opened 8 years ago

nexdrew commented 8 years ago

Since the Docker install script can have unwanted side effects and since the Replicated install script supports an option to skip the Docker install, we should allow folks to run the installer without running the Docker script. I'm thinking this could be supported in the following ways:

Here are the supported args from the Replicated install script:

# override these values with command line flags
while [ "$1" != "" ]; do
    _param=`echo "$1" | awk -F= '{print $1}'`
    _value=`echo "$1" | awk -F= '{print $2}'`
    case $_param in
        http-proxy|http_proxy)
            PROXY_ADDRESS="$_value"
            ;;
        local-address|local_address)
            PRIVATE_ADDRESS="$_value"
            ;;
        no-operator|no_operator)
            SKIP_OPERATOR_INSTALL=1
            ;;
        is-migration|is_migration)
            IS_MIGRATION=1
            ;;
        no-docker|no_docker)
            SKIP_DOCKER_INSTALL=1
            ;;
        no-proxy|no_proxy)
            NO_PROXY=1
            ;;
        airgap)
            AIRGAP=1
            ;;
        no-auto|no_auto)
            READ_TIMEOUT=
            ;;
        daemon-token|daemon_token)
            DAEMON_TOKEN="$_value"
            ;;
        tags)
            OPERATOR_TAGS="$_value"
            ;;
        *)
            echo >&2 "Error: unknown parameter \"$_param\""
            exit 1
            ;;
    esac
    shift
done