diff --git a/application.py b/application.py index 23b5b339..90d9aaae 100644 --- a/application.py +++ b/application.py @@ -12,6 +12,7 @@ default_debug = False default_enable_ssl = False default_ca_certs = None +default_verify_certs = True default_url = 'http://localhost:9200' is_gunicorn = "gunicorn" in os.environ.get("SERVER_SOFTWARE", "") @@ -21,6 +22,7 @@ application.config['DEFAULT_URL'] = os.environ.get('HQ_DEFAULT_URL', default_url) application.config['ENABLE_SSL'] = os.environ.get('HQ_ENABLE_SSL', default_enable_ssl) application.config['CA_CERTS'] = os.environ.get('HQ_CA_CERTS', default_ca_certs) +application.config['HQ_VERIFY_CERTS'] = os.environ.get('HQ_VERIFY_CERTS', default_verify_certs) application.config['DEBUG'] = os.environ.get('HQ_DEBUG', default_debug) if os.environ.get('HQ_DEBUG') == 'True': @@ -47,13 +49,15 @@ parser.add_option("-c", "--ca-certs", default=default_ca_certs, help='Required when --use-ssl is set. ' + \ 'Path to CA file or directory [default %s]' % default_ca_certs) + parser.add_option("-v", "--verify_certs", default=default_verify_certs, + help='Set to False when using self-signed certs.') options, _ = parser.parse_args() - # set default url, override with env for docker application.config['DEFAULT_URL'] = os.environ.get('HQ_DEFAULT_URL', options.url) application.config['ENABLE_SSL'] = os.environ.get('HQ_ENABLE_SSL', options.enable_ssl) application.config['CA_CERTS'] = os.environ.get('HQ_CA_CERTS', options.ca_certs) + application.config['VERIFY_CERTS'] = os.environ.get('HQ_VERIFY_CERTS', options.verify_certs) if is_gunicorn: if options.debug: diff --git a/docs/.doctrees/environment.pickle b/docs/.doctrees/environment.pickle index 115c8f12..b554b675 100644 Binary files a/docs/.doctrees/environment.pickle and b/docs/.doctrees/environment.pickle differ diff --git a/docs/.doctrees/index.doctree b/docs/.doctrees/index.doctree index 95839178..e2af0196 100644 Binary files a/docs/.doctrees/index.doctree and b/docs/.doctrees/index.doctree differ diff --git a/docs/.doctrees/installation.doctree b/docs/.doctrees/installation.doctree index d1250b89..e4ea9531 100644 Binary files a/docs/.doctrees/installation.doctree and b/docs/.doctrees/installation.doctree differ diff --git a/docs/_sources/index.txt b/docs/_sources/index.txt index 24605632..9cd1a7c9 100644 --- a/docs/_sources/index.txt +++ b/docs/_sources/index.txt @@ -4,7 +4,7 @@ ElasticHQ Documentation .. toctree:: - :hidden: + :includehidden: installation rest-api diff --git a/docs/_sources/installation.txt b/docs/_sources/installation.txt index 460e9171..833b57b5 100644 --- a/docs/_sources/installation.txt +++ b/docs/_sources/installation.txt @@ -84,35 +84,39 @@ The input field takes a url in the form of: ``http://DOMAIN:PORT`` Configuration ------------- +.. _command line parameters: + Command line Parameters ^^^^^^^^^^^^^^^^^^^^^^^ The ``application.py`` start script takes parameters passed in as arguments from the command line: - ================ ========================= ==================================================================== - Arg Default Value Definition - ================ ========================= ==================================================================== - ``--host`` 127.0.0.1 Host the HQ server should be reachable on. - ``--port`` 5000 Port to reach HQ server. - ``--debug`` False If True, exposes debug data to UI and causes reload on code changes. - ``--url`` ``http://localhost:9200`` Default URL displayed on the initial connection screen. - ``--enable-ssl`` False If flag is passed, assumes ssl cert will be used. - ``--ca-certs`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed. - ================ ========================= ==================================================================== + ================== ========================= ================================================================================ + Arg Default Value Definition + ================== ========================= ================================================================================ + ``--host`` 127.0.0.1 Host the HQ server should be reachable on. + ``--port`` 5000 Port to reach HQ server. + ``--debug`` False If True, exposes debug data to UI and causes reload on code changes. + ``--url`` ``http://localhost:9200`` Default URL displayed on the initial connection screen. + ``--enable-ssl`` False If flag is passed, assumes ssl cert will be used. + ``--ca-certs`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed. + ``--verify_certs`` True Whether HQ should attempt to validate certs. Set to False for self-signed certs. + ================== ========================= ================================================================================ .. _environment variables: Environment Variables ^^^^^^^^^^^^^^^^^^^^^ - ================== ========================= ==================================================================== - Arg Default Value Definition - ================== ========================= ==================================================================== - ``HQ_DEFAULT_URL`` ``http://localhost:9200`` Default URL displayed on the initial connection screen. - ``HQ_ENABLE_SSL`` False If flag is passed, assumes ssl cert will be used. - ``HQ_CA_CERTS`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed. - ``HQ_DEBUG`` False If True, enables debug level on logging. - ================== ========================= ==================================================================== + =================== ========================= ================================================================================ + Arg Default Value Definition + =================== ========================= ================================================================================ + ``HQ_DEFAULT_URL`` ``http://localhost:9200`` Default URL displayed on the initial connection screen. + ``HQ_ENABLE_SSL`` False If flag is passed, assumes ssl cert will be used. + ``HQ_CA_CERTS`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed. + ``HQ_VERIFY_CERTS`` True Whether HQ should attempt to validate certs. Set to False for self-signed certs. + ``HQ_DEBUG`` False If True, enables debug level on logging. + =================== ========================= ================================================================================ Logging @@ -132,7 +136,8 @@ Thanks to a community contribution, SSL Cert support has been added: `SSL Suppor Enable SSL Cert support by starting HQ as so: ``python -m application --enable-ssl --ca-certs /path/to/your/ca.crt`` - + +.. note:: When using self-signed certs, you must disable certificate verification. See: :any:`command line parameters` or :any:`environment variables` Database ^^^^^^^^ @@ -236,7 +241,7 @@ Failure in connecting initially to an Elasticsearch cluster, can happen for seve * **Basic Authentication:** If you did not enter in the security credentials in the connection URL, HQ will fail to connect. The proper format is ``http://USERNAME:PASSWORD@DOMAIN:PORT`` * **X-Pack License Expiration:** X-Pack comes with a #-day license that will silently expire. Expiration of the license may cause connectivity issues, so it is advised to either purchase an X-Pack license or uninstall X-Pack. * **No Route to ES cluster:** Confirm that the server running HQ has access to ES via network. You can do this by calling ES from within a terminal window on the HQ server, with a ``curl -XGET http://DOMAIN:PORT``. - +* **CERTIFICATE_VERIFY_FAILED:** If you see this error in the log, you are most likely using a self-signed cert and did not set validate_certs variable to false. See: :any:`command line parameters` or :any:`environment variables` .. _xpack integration: diff --git a/docs/index.html b/docs/index.html index b8d1acf5..5ddce2d7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -114,6 +114,122 @@
Table of Contents
pip install -r requirements.txt
Docker images are offered on the ElasticHQ Dockerhub.
The latest
tag deploys the latest stable release. Where develop
is the latest unstable working branch.
When starting with Docker, see Environment Variables for passing startup args. Environment variables are passed to docker using the -e flag.
@@ -202,7 +202,7 @@Pre-release versions are made available as branches in the github repository. We use GitFlow methodology and adhere to semantic versioning.
Our branching organization is as follows:
Information for running on openshift, can be found here: ElasticHQ OpenShift
ElasticHQ is accessible, in default configuration under http://localhost:5000
The application.py
start script takes parameters passed in as arguments from the command line:
- - + + Arg @@ -271,18 +271,22 @@Command line Parameters
+ --verify_certs
True +Whether HQ should attempt to validate certs. Set to False for self-signed certs. +