Skip to content

Commit

Permalink
Merge branch 'release/v3.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
royrusso committed Sep 25, 2019
2 parents 4822a6b + b142c9a commit 1730251
Show file tree
Hide file tree
Showing 14 changed files with 258 additions and 109 deletions.
6 changes: 5 additions & 1 deletion application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")

Expand All @@ -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':
Expand All @@ -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:
Expand Down
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/installation.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ElasticHQ Documentation


.. toctree::
:hidden:
:includehidden:

installation
rest-api
Expand Down
45 changes: 25 additions & 20 deletions docs/_sources/installation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
^^^^^^^^
Expand Down Expand Up @@ -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:

Expand Down
116 changes: 116 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,122 @@ <h2>Table Of Contents</h2>
<div class="section" id="elastichq-documentation">
<h1>ElasticHQ Documentation<a class="headerlink" href="#elastichq-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#quick-start-guide">Quick-Start Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#installation">Installation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="installation.html#requirements">Requirements</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#install-elastichq">Install ElasticHQ</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#docker-images">Docker Images</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#pre-releases">Pre-Releases</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#openshift">OpenShift</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#initial-login">Initial Login</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#configuration">Configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="installation.html#command-line-parameters">Command line Parameters</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#logging">Logging</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#connecting-with-ssl">Connecting with SSL</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#database">Database</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#external-configuration">External Configuration</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#upgrading">Upgrading</a><ul>
<li class="toctree-l3"><a class="reference internal" href="installation.html#latest-version">Latest Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#upgrading-minor-and-patch-versions">Upgrading Minor and Patch versions</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#running-in-production">Running in Production</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#troubleshooting">Troubleshooting</a><ul>
<li class="toctree-l3"><a class="reference internal" href="installation.html#diagnosing-connection-errors">Diagnosing connection errors</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#x-pack-integration">X-Pack Integration</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#viewing-logs">Viewing Logs</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#ssl-cert-not-working">SSL Cert not working</a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#preserving-database-across-docker-container-restarts">Preserving Database across Docker container restarts</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#license">License</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="rest-api.html">REST API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#connection-apis">Connection APIs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#connections">Connections</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#cluster-apis">Cluster APIs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#cluster-list">Cluster List</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#cluster-health">Cluster Health</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#cluster-summary">Cluster Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#cluster-state">Cluster State</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#node-apis">Node APIs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#nodes-summary">Nodes Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#node-info">Node Info</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#nodes-stats">Nodes Stats</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#index-apis">Index APIs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#indices">Indices</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#indices-summary">Indices Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#index-stats">Index Stats</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#index-command">Index Command</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#index-shards">Index Shards</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#index-alias">Index Alias</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#index-mapping">Index Mapping</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#reindex">Reindex</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#diagnostics">Diagnostics</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#cluster-diagnostics">Cluster Diagnostics</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#snapshots-repositories">Snapshots &amp; Repositories</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#repositories">Repositories</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#snapshots">Snapshots</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest-api.html#hq-apis">HQ APIs</a><ul>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#hq-status">HQ Status</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#hq-routes">HQ Routes</a></li>
<li class="toctree-l3"><a class="reference internal" href="rest-api.html#es-rest">ES REST</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developer-guide.html">For Developers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#contributing">Contributing</a></li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#developer-environment">Developer Environment</a><ul>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#set-debug-to-true">Set Debug to True</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#building-pre-releases">Building Pre-Releases</a><ul>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#install-build-the-ui">Install/Build the UI</a></li>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#building-a-distribution">Building a Distribution</a></li>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#pulling-a-tag-from-dockerhub">Pulling a tag from DockerHub</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#running-tests">Running Tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#manual-testing">Manual Testing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#notes">Notes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#building-documentation">Building Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#http-responses">HTTP Responses</a><ul>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#http-status">HTTP Status</a></li>
<li class="toctree-l3"><a class="reference internal" href="developer-guide.html#response-headers">Response Headers</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="developer-guide.html#issues-bugs">Issues/Bugs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="faq.html#how-do-i">How do I...</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#using-elastichq-with">Using ElasticHQ with...</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
Expand Down
Loading

0 comments on commit 1730251

Please sign in to comment.