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

ElasticHQ Documentation

+

Overview

diff --git a/docs/installation.html b/docs/installation.html index 1222060e..0d793105 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -130,56 +130,56 @@

Getting Started

Table of Contents

-

Quick-Start Guide

+

Quick-Start Guide

-

Installation

+

Installation

-

Requirements

+

Requirements

  • Python 3.4+
  • Elasticsearch. Supported versions: 2.x, 5.x, 6.x
-

Install ElasticHQ

+

Install ElasticHQ

  1. Download or clone the repository https://github.com/ElasticHQ/elasticsearch-HQ
  2. Navigate to the root of the repository: pip install -r requirements.txt
  3. @@ -192,7 +192,7 @@

    Install ElasticHQ -

    Docker Images

    +

    Docker Images

    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 @@

    Install ElasticHQhttp://localhost:5000

-

Pre-Releases

+

Pre-Releases

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:

-

OpenShift

+

OpenShift

Information for running on openshift, can be found here: ElasticHQ OpenShift

-

Initial Login

+

Initial Login

ElasticHQ is accessible, in default configuration under http://localhost:5000

_static/img/login.png @@ -229,16 +229,16 @@

Initial Login

-

Configuration

+

Configuration

-

Command line Parameters

+

Command line Parameters

The application.py start script takes parameters passed in as arguments from the command line:

--++ @@ -271,18 +271,22 @@

Command line Parameters

+ + +
Arg--verify_certsTrueWhether HQ should attempt to validate certs. Set to False for self-signed certs.
-

Environment Variables

+

Environment Variables

---+++ @@ -303,7 +307,11 @@

Command line Parameters

+ + + + + @@ -312,19 +320,23 @@

Command line Parameters -

Logging

+

Logging

ElasticHQ logs out to console AND file by default. The application log file is located at the root of the HQ path and is called application.log.

Advanced users that want to have control over the logging output, can adjust it by altering the configuration file kept under elastichq/config/logger.json.

Docker users will find the logfile location under /src/application.log

-

Connecting with SSL

+

Connecting with SSL

Thanks to a community contribution, SSL Cert support has been added: SSL Support.

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: Command line Parameters or Environment Variables

+
-

Database

+

Database

ElasticHQ ships with SQLLite integration to store clusters you have connected to and other meta information. This database is kept under the root directory as elastichq.db.

Note

@@ -332,7 +344,7 @@

Database -

External Configuration

+

External Configuration

External configuration files are supported for those wanting to preserve their user-specified settings between upgrades.

On startup, HQ checks the following locations for a file named settings.json:

    @@ -370,10 +382,10 @@

    External Configuration -

    Upgrading

    +

    Upgrading

    We adhere to semantic versioning, so as long as the Major version hasn’t changed, you can expect everything to work well enough. ;-)

    -

    Latest Version

    +

    Latest Version

    ElasticHQ checks against the Elastichq.org website, to retrieve the latest stable version number. You can see the check in the footer:

    Versions Match:

    @@ -385,7 +397,7 @@

    Latest Version

    -

    Upgrading Minor and Patch versions

    +

    Upgrading Minor and Patch versions

    1. To upgrade, simply download or clone the repository master branch.
    2. Upgrade the database: python manage.py db upgrade
    3. @@ -395,7 +407,7 @@

      Upgrading Minor and Patch versions

    -

    Running in Production

    +

    Running in Production

    We advise that under any considerable usage/load, this application should be run with a multithreaded server. The current flask implementation by itself should not be run in production without this, as it is a single-threaded process.

    We recommend running this WSGI application with gunicorn. The Docker container available on DockerHub is pre-configured to run with gunicorn, and is preferred. See the Docker Images

    If you wish to run without a container, install gunicorn by either commenting out the line in the requirements.txt file or simply running pip install gunicorn

    @@ -409,18 +421,19 @@

    Running in Production -

    Troubleshooting

    +

    Troubleshooting

    -

    Diagnosing connection errors

    +

    Diagnosing connection errors

    Failure in connecting initially to an Elasticsearch cluster, can happen for several reason:

    • 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: Command line Parameters or Environment Variables
    -

    X-Pack Integration

    +

    X-Pack Integration

    X-Pack is configured with authentication. To connect, you must pass along the username and password in the connection URL using the format http://USERNAME:PASSWORD@DOMAIN:PORT

    ElasticHQ will store the username and password in the database, so future connectivity is not an issue.

    @@ -430,18 +443,18 @@

    Diagnosing connection errors

    -

    Viewing Logs

    +

    Viewing Logs

    In the base installation, the logs are available under the /install/path/application.log.

    For docker images, the application logging can be found under /src/application.log.

    -

    SSL Cert not working

    +

    SSL Cert not working

    NOTE: Your CA file must be the same signer of your Elasticsearch node, for HQ to connect as a trusted source.

    Verify that the certificate works by connecting directly from the HQ instance to the ES node in question, using the cert:

    curl -u admin:password --ca-certs /path/to/ca.crt https://localhost:9200/_cluster/settings?pretty

    -

    Preserving Database across Docker container restarts

    +

    Preserving Database across Docker container restarts

    The following code block originated as an issue (https://github.com/ElasticHQ/elasticsearch-HQ/issues/409) for those wanting to preserve the HQ SQLLite DB between container restarts.

    docker run --detach
     --restart=always
    @@ -455,7 +468,7 @@ 

    Preserving Database across Docker contai

    -

    License

    +

    License

    Copyright 2013-2018 Roy Russo and Authors

    Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. diff --git a/docs/objects.inv b/docs/objects.inv index 18d6c4f5..b4384e39 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/searchindex.js b/docs/searchindex.js index 9623acf7..c8a9abb2 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:50,filenames:["developer-guide","faq","index","installation","rest-api"],objects:{"":{"/api/clusters":[4,0,1,"get--api-clusters"],"/api/clusters/(string:cluster_name)/_connect":[4,2,1,"post--api-clusters-(string-cluster_name)-_connect"],"/api/clusters/(string:cluster_name)/_health":[4,0,1,"get--api-clusters-(string-cluster_name)-_health"],"/api/clusters/(string:cluster_name)/_state":[4,0,1,"get--api-clusters-(string-cluster_name)-_state"],"/api/clusters/(string:cluster_name)/_summary":[4,0,1,"get--api-clusters-(string-cluster_name)-_summary"],"/api/clusters/(string:cluster_name)/diagnostics/_summary":[4,0,1,"get--api-clusters-(string-cluster_name)-diagnostics-_summary"],"/api/clusters/_connect":[4,2,1,"post--api-clusters-_connect"],"/api/indices/(string:cluster_name)":[4,2,1,"post--api-indices-(string-cluster_name)"],"/api/indices/(string:cluster_name)/(string:index_name)":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)"],"/api/indices/(string:cluster_name)/(string:index_name)/(string:alias_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)-(string-alias_name)-_aliases"],"/api/indices/(string:cluster_name)/(string:index_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)-_aliases"],"/api/indices/(string:cluster_name)/(string:index_name)/_mapping":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_name)-_mapping"],"/api/indices/(string:cluster_name)/(string:index_name)/_mapping/(string:mapping_name)":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_name)-_mapping-(string-mapping_name)"],"/api/indices/(string:cluster_name)/(string:index_name)/action/(string:action)":[4,3,1,"put--api-indices-(string-cluster_name)-(string-index_name)-action-(string-action)"],"/api/indices/(string:cluster_name)/(string:index_names)/_shards":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_shards"],"/api/indices/(string:cluster_name)/(string:index_names)/_stats":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_stats"],"/api/indices/(string:cluster_name)/(string:index_names)/_summary":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_summary"],"/api/indices/(string:cluster_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-_aliases"],"/api/indices/(string:cluster_name)/_reindex":[4,2,1,"post--api-indices-(string-cluster_name)-_reindex"],"/api/indices/(string:cluster_name)/_shards":[4,0,1,"get--api-indices-(string-cluster_name)-_shards"],"/api/indices/(string:cluster_name)/_stats":[4,0,1,"get--api-indices-(string-cluster_name)-_stats"],"/api/indices/(string:cluster_name)/_summary":[4,0,1,"get--api-indices-(string-cluster_name)-_summary"],"/api/indices/(string:cluster_name)/action/(string:action)":[4,3,1,"put--api-indices-(string-cluster_name)-action-(string-action)"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_info":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_info"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_stats":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_stats"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_summary":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_summary"],"/api/nodes/(string:cluster_name)/_info":[4,0,1,"get--api-nodes-(string-cluster_name)-_info"],"/api/nodes/(string:cluster_name)/_stats":[4,0,1,"get--api-nodes-(string-cluster_name)-_stats"],"/api/nodes/(string:cluster_name)/_summary":[4,0,1,"get--api-nodes-(string-cluster_name)-_summary"],"/api/repositories/(string:cluster_name)":[4,0,1,"get--api-repositories-(string-cluster_name)"],"/api/rest/(string:cluster_name)/(string:command)":[4,0,1,"get--api-rest-(string-cluster_name)-(string-command)"],"/api/routes":[4,0,1,"get--api-routes"],"/api/snapshots/(string:cluster_name)/repository/(string:repository_name)":[4,0,1,"get--api-snapshots-(string-cluster_name)-repository-(string-repository_name)"],"/api/status":[4,0,1,"get--api-status"]}},objnames:{"0":["http","get","HTTP get"],"1":["http","delete","HTTP delete"],"2":["http","post","HTTP post"],"3":["http","put","HTTP put"]},objtypes:{"0":"http:get","1":"http:delete","2":"http:post","3":"http:put"},terms:{"boolean":4,"byte":[],"case":0,"class":3,"default":[0,3],"delete":[0,4],"final":0,"long":3,"new":[0,1,4],"null":4,"return":[0,4],"static":0,"true":[],"while":0,_alias:4,_cach:4,_close:4,_cluster:3,_connect:4,_expunge_delet:4,_flush:4,_force_merg:4,_health:4,_info:4,_map:4,_open:4,_optim:4,_refresh:4,_reindex:4,_shard:4,_sqlalchemy_database_uri:3,_stat:4,_state:4,_summari:4,about:[1,4],accept:[3,4],access:[0,1,2,3],accomplish:0,across:[],action:4,activ:4,active_primary_shard:4,active_shard:4,active_shards_percent_as_numb:4,actual:4,add:4,address:4,adher:3,adjust:3,admin:3,advanc:3,advis:3,again:0,against:[0,3],age:0,agre:3,alias:[2,4],alias_nam:4,all:[0,4],allow:[0,3],along:3,alreadi:4,also:4,alter:3,altern:3,alwai:3,ani:[0,2,3],any:3,apach:[2,3],api:[],appear:0,applic:[0,2,3,4],applicaiton:0,arg:3,argument:3,around:4,asked:1,assum:3,attent:0,auth:3,authent:[1,3],author:3,automat:0,avail:[2,3,4],awsaccesskeyid:[],bad:4,base:3,basepath:3,basic:3,basis:3,been:3,befor:0,below:0,between:3,bin:[],binari:[],blob:[],block:3,body:4,both:4,branch:[0,3],bring:0,broadcast:3,browser:3,bucket:[],built:0,bundl:0,bundleid:[],bundletask:[],bundletaskerror:[],cacert:[],cach:4,call:[3,4],can:[0,1,2,3,4],candid:3,caus:[0,3],ccelastichq:[],cert:[],certif:3,chang:[0,3],check:3,clean:3,click:2,clone:3,close:4,cluster:[],cluster_connect:4,cluster_health:4,cluster_host:4,cluster_ip:4,cluster_nam:4,cluster_name:4,cluster_port:4,cluster_schem:4,cluster_vers:4,code:[0,3,4],collect:4,com:3,come:3,comma:4,command:[],comment:3,commonli:2,commun:[3,4],complet:4,complianc:3,compos:0,condens:4,conditions:3,conf:3,config:3,confirm:3,connect:[],consider:3,consol:3,contain:[],control:[0,3],copi:[3,4],copyright:3,cover:[],coverag:0,creat:[0,4],credenti:[0,3],crt:3,curl:3,current:[3,4],current_stable_vers:4,custom:0,cycl:0,dai:3,data:[3,4],date:0,datetim:[],db_name:3,debug:[],definit:3,delayed_unassigned_shard:4,delet:[3,4],delimit:4,deploi:3,depth:[],destin:4,destination_index:4,destination_index_nam:4,detach:3,detail:4,dev:[],dict:4,did:3,differ:0,direct:2,directli:[1,3,4],directori:[],directory:3,disk:4,displai:3,doc:[0,3,4],dockerhub:[],doe:4,doesn:4,domain:3,down:0,download:3,easi:3,easier:0,edit:[],effect:0,either:[3,4],elast:[3,4],elastichq:[],elasticsearch:[0,2,3,4],enabl:3,end:0,endpoint:[2,4],enough:3,enter:3,entir:0,entri:1,environ:[],error:[],es_v2:4,esv:0,etc:3,even:4,event:[0,3],eventlet:3,everyth:3,evil:3,exampl:4,except:3,exec:3,execut:4,exist:4,expect:3,expir:3,expirat:3,expos:3,express:3,fail:3,failur:3,fals:[3,4],featur:[],feel:1,field:3,file:[0,3],find:3,first:0,fix:0,flag:3,flask:[0,3,4],flush:4,follow:3,foo:[],footer:3,forc:4,form:[0,3],format:[0,3],formerli:4,forum:[1,2],found:[3,4],free:1,freeli:2,frequent:1,from:4,further:3,futur:3,gener:[0,4],get:[],gitflow:3,github:[0,1,3,4],given:4,gmt:0,govern:3,guarante:0,guidelin:0,gunicorn:3,handler:[],happen:3,hasn:3,have:[0,1,3],help:1,here:3,homepag:2,host:[3,4],hq_ca_certs:3,hq_debug:3,hq_default_url:3,hq_enable_ssl:3,html:[0,4],htmlcov:0,htmlout11:[],htmlout:0,https:4,imag:3,immedi:0,implemen:[],implement:3,impli:3,includ:[0,2],index:[],index_nam:4,indic:[2,4],individu:0,info:[],inform:[3,4],informat:3,initi:3,initializing_shard:4,input:3,instal:[0,3],installed_vers:4,instanc:3,instanceid:[],instruct:1,integr:[0,3],integrat:[],interfac:4,internal:4,issu:3,itself:3,jan:0,join:3,json:[0,3,4],just:4,kept:3,kill_es_vers:0,kind:3,known:4,languag:3,larg:4,law:3,left:[],length:0,level:3,librari:0,licens:[],license:3,limit:3,line:[],list:[],load:3,local:0,localhost:[0,1,3,4],locat:3,logfil:3,logger:3,made:3,mai:[3,4],major:[0,3],major_version:0,manag:[0,2,3],mani:[2,4],manual:[],mapping_nam:4,mapping_onli:4,master:[3,4],match:3,max:0,merg:4,messag:4,meta:3,method:[0,4],methodolog:3,metric:3,millisecond:0,modifi:[],monitor:2,multithread:3,must:3,name:[0,3,4],navig:[0,3],necessari:3,need:0,net:3,network:3,next:3,node:[],node_id:4,normal:0,npm:0,number:3,number_of_data_nod:4,number_of_in_flight_fetch:4,number_of_nod:4,number_of_pending_task:4,number_of_replica:4,number_of_shard:4,obtain:3,offer:3,onc:0,once:0,one:[2,4],onli:4,open:4,option:[3,4],options:0,org:[3,4],organ:3,origin:[0,3],other:[],otherwis:4,our:3,out:[3,4],output:[0,3],over:3,pack:[],param:[],pass:[3,4],password:3,patch:[],path:[0,3],payload:4,pend:[],perform:0,permiss:3,ping:4,pip:[0,3],plain:3,platform:2,pleas:0,pocoo:4,point:3,pool:4,port:[0,3,4],possibl:4,post:[0,4],prefer:[0,3],prefix:[],preserv:[],pretti:3,prioriti:0,process:3,progress:[],project:[],proper:3,prune:0,pull:4,purchas:3,put:[0,4],pytest:0,python3:3,python:[0,3],question:[1,3],reach:3,reachabl:3,read:[0,3],readme:[],realiz:3,reason:[0,3],receiv:0,recommend:3,reconnect:3,recreat:3,refer:[],refresh:[0,4],reindex_opt:4,reload:3,relocating_shard:4,remov:[],repo:0,report:0,repositori:[],repository_nam:4,request:[0,4],requir:[],respect:[],response_tim:4,rest:[],retriev:3,right:[],roadmap:2,roi:3,root:[0,3],royrusso:[],rule:4,run_es_vers:0,run_test:[],runserv:3,russo:3,same:[2,3],save:[2,4],scheme:3,screen:3,script:[0,3],sdsd:[],searchabl:4,section:3,secur:3,sed:3,see:[1,3],segment:4,semant:3,separ:0,serv:[0,2],server:[0,3,4],set:[],sever:[3,4],shard:[],ship:3,should:[0,3],shutdown:[],signer:3,silent:3,simpli:[3,4],sinc:2,singl:3,site:0,slate:3,snippet:4,softwar:[2,3],some:3,sourc:[0,3,4],source_index:4,source_index_nam:4,specif:[0,3],specifi:3,sphinx:0,sqlalchemy_database_uri:3,sqlite:3,sqllite:3,src:3,ssl:[],stabl:3,standard:[0,3],standard_handl:[],start:[],start_clust:[],starttim:[],status_cod:4,still:0,stop:0,storag:[],store:3,string:4,success:4,suggest:1,suit:0,supervisor:3,supervisord:3,support:3,tag:[],take:[0,3],taken:4,task_max_waiting_in_queue_milli:4,templat:0,termin:3,text:3,thank:3,thei:[],them:0,thi:[0,1,3,4],those:3,thread:3,through:0,thru:4,time:[0,2,3,4],timed_out:4,todo:[],took:0,trigger:4,trust:3,txt:[0,3],type:[0,4],typic:0,unassigned_shard:4,under:[0,1,2,3],uninstal:3,unless:3,unstabl:[0,3],until:0,updatetim:[],upgrad:3,uploadpolici:[],uploadpolicysignatur:[],url:[3,4],usag:3,use_ssl:4,user:[],usernam:3,username:3,v5_docker:[],valu:3,vari:4,veri:0,verifi:3,version:[],via:[3,4],view:[],virtual:[],volum:3,wait:[],want:3,warn:[],warning:4,warranties:3,websit:3,websocket:3,wed:0,welcom:0,well:3,werkzeug:0,when:[3,4],where:3,whether:4,which:0,window:3,wish:[0,3],within:3,without:3,work:[],worker:3,working:3,wrapper:4,write:[3,4],wsgi:3,www:[3,4],xget:3,yellow:4,yml:[],you:[0,1,3,4],your:[3,4]},titles:["For Developers","FAQ","ElasticHQ Documentation","Getting Started","REST API"],titleterms:{"true":0,across:3,alia:4,api:4,bug:0,build:0,cert:3,cluster:4,command:[3,4],configur:3,connect:[3,4],contain:3,content:[0,1,3,4],contribut:0,dashboard:[],databas:3,debug:0,develop:0,diagnos:3,diagnost:4,directori:[],distribut:0,docker:3,dockerhub:0,document:[0,2],elastichq:[1,2,3],environ:[0,3],error:3,external:3,faq:1,featur:2,from:0,get:3,guid:3,header:0,health:4,how:1,http:0,image:3,index:4,indice:4,info:4,initial:3,install:[0,3],installat:3,integrat:3,issue:0,kei:2,latest:3,licens:3,line:3,list:4,log:3,login:3,main:[],manual:0,map:4,minor:3,node:4,note:0,openshift:3,other:[],overview:2,pack:3,paramet:3,patch:3,pre:[0,3],preserv:3,product:3,project:2,pull:0,quick:3,refer:[],reindex:4,releas:[0,3],remov:[],repositori:4,requir:3,resourc:[],respons:0,rest:4,restart:3,rout:4,run:[0,3],set:0,shard:4,snapshot:4,ssl:3,start:3,startup:[],stat:4,state:4,statu:[0,4],structur:[],summari:4,tabl:[0,1,3,4],tag:0,test:0,troubleshoot:3,upgrade:3,user:[],using:1,variabl:3,version:3,view:3,work:3}}) \ No newline at end of file +Search.setIndex({envversion:50,filenames:["developer-guide","faq","index","installation","rest-api"],objects:{"":{"/api/clusters":[4,0,1,"get--api-clusters"],"/api/clusters/(string:cluster_name)/_connect":[4,2,1,"post--api-clusters-(string-cluster_name)-_connect"],"/api/clusters/(string:cluster_name)/_health":[4,0,1,"get--api-clusters-(string-cluster_name)-_health"],"/api/clusters/(string:cluster_name)/_state":[4,0,1,"get--api-clusters-(string-cluster_name)-_state"],"/api/clusters/(string:cluster_name)/_summary":[4,0,1,"get--api-clusters-(string-cluster_name)-_summary"],"/api/clusters/(string:cluster_name)/diagnostics/_summary":[4,0,1,"get--api-clusters-(string-cluster_name)-diagnostics-_summary"],"/api/clusters/_connect":[4,2,1,"post--api-clusters-_connect"],"/api/indices/(string:cluster_name)":[4,2,1,"post--api-indices-(string-cluster_name)"],"/api/indices/(string:cluster_name)/(string:index_name)":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)"],"/api/indices/(string:cluster_name)/(string:index_name)/(string:alias_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)-(string-alias_name)-_aliases"],"/api/indices/(string:cluster_name)/(string:index_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-(string-index_name)-_aliases"],"/api/indices/(string:cluster_name)/(string:index_name)/_mapping":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_name)-_mapping"],"/api/indices/(string:cluster_name)/(string:index_name)/_mapping/(string:mapping_name)":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_name)-_mapping-(string-mapping_name)"],"/api/indices/(string:cluster_name)/(string:index_name)/action/(string:action)":[4,3,1,"put--api-indices-(string-cluster_name)-(string-index_name)-action-(string-action)"],"/api/indices/(string:cluster_name)/(string:index_names)/_shards":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_shards"],"/api/indices/(string:cluster_name)/(string:index_names)/_stats":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_stats"],"/api/indices/(string:cluster_name)/(string:index_names)/_summary":[4,0,1,"get--api-indices-(string-cluster_name)-(string-index_names)-_summary"],"/api/indices/(string:cluster_name)/_aliases":[4,2,1,"post--api-indices-(string-cluster_name)-_aliases"],"/api/indices/(string:cluster_name)/_reindex":[4,2,1,"post--api-indices-(string-cluster_name)-_reindex"],"/api/indices/(string:cluster_name)/_shards":[4,0,1,"get--api-indices-(string-cluster_name)-_shards"],"/api/indices/(string:cluster_name)/_stats":[4,0,1,"get--api-indices-(string-cluster_name)-_stats"],"/api/indices/(string:cluster_name)/_summary":[4,0,1,"get--api-indices-(string-cluster_name)-_summary"],"/api/indices/(string:cluster_name)/action/(string:action)":[4,3,1,"put--api-indices-(string-cluster_name)-action-(string-action)"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_info":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_info"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_stats":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_stats"],"/api/nodes/(string:cluster_name)/(string:node_ids)/_summary":[4,0,1,"get--api-nodes-(string-cluster_name)-(string-node_ids)-_summary"],"/api/nodes/(string:cluster_name)/_info":[4,0,1,"get--api-nodes-(string-cluster_name)-_info"],"/api/nodes/(string:cluster_name)/_stats":[4,0,1,"get--api-nodes-(string-cluster_name)-_stats"],"/api/nodes/(string:cluster_name)/_summary":[4,0,1,"get--api-nodes-(string-cluster_name)-_summary"],"/api/repositories/(string:cluster_name)":[4,0,1,"get--api-repositories-(string-cluster_name)"],"/api/rest/(string:cluster_name)/(string:command)":[4,0,1,"get--api-rest-(string-cluster_name)-(string-command)"],"/api/routes":[4,0,1,"get--api-routes"],"/api/snapshots/(string:cluster_name)/repository/(string:repository_name)":[4,0,1,"get--api-snapshots-(string-cluster_name)-repository-(string-repository_name)"],"/api/status":[4,0,1,"get--api-status"]}},objnames:{"0":["http","get","HTTP get"],"1":["http","delete","HTTP delete"],"2":["http","post","HTTP post"],"3":["http","put","HTTP put"]},objtypes:{"0":"http:get","1":"http:delete","2":"http:post","3":"http:put"},terms:{"boolean":4,"byte":[],"case":0,"class":3,"default":[0,3],"delete":[0,4],"final":0,"long":3,"new":[0,1,4],"null":4,"return":[0,4],"static":0,"true":[],"while":0,_alias:4,_cach:4,_close:4,_cluster:3,_connect:4,_expunge_delet:4,_flush:4,_force_merg:4,_health:4,_info:4,_map:4,_open:4,_optim:4,_refresh:4,_reindex:4,_shard:4,_sqlalchemy_database_uri:3,_stat:4,_state:4,_summari:4,about:[1,4],accept:[3,4],access:[0,1,2,3],accomplish:0,across:[],action:4,activ:4,active_primary_shard:4,active_shard:4,active_shards_percent_as_numb:4,actual:4,add:4,address:4,adher:3,adjust:3,admin:3,advanc:3,advis:3,again:0,against:[0,3],age:0,agre:3,alias:[2,4],alias_nam:4,all:[0,4],allow:[0,3],along:3,alreadi:4,also:4,alter:3,altern:3,alwai:3,ani:[0,2,3],any:3,apach:[2,3],api:[],appear:0,applic:[0,2,3,4],applicaiton:0,arg:3,argument:3,around:4,asked:1,assum:3,attempt:3,attent:0,auth:3,authent:[1,3],author:3,automat:0,avail:[2,3,4],awsaccesskeyid:[],bad:4,base:3,basepath:3,basic:3,basis:3,been:3,befor:0,below:0,between:3,bin:[],binari:[],blob:[],block:3,body:4,both:4,branch:[0,3],bring:0,broadcast:3,browser:3,bucket:[],built:0,bundl:0,bundleid:[],bundletask:[],bundletaskerror:[],cacert:[],cach:4,call:[3,4],can:[0,1,2,3,4],candid:3,caus:[0,3],ccelastichq:[],cert:[],certif:3,certificate_verify_failed:3,chang:[0,3],check:3,clean:3,click:2,clone:3,close:4,cluster:[],cluster_connect:4,cluster_health:4,cluster_host:4,cluster_ip:4,cluster_nam:4,cluster_name:4,cluster_port:4,cluster_schem:4,cluster_vers:4,code:[0,3,4],collect:4,com:3,come:3,comma:4,command:[],comment:3,commonli:2,commun:[3,4],complet:4,complianc:3,compos:0,condens:4,conditions:3,conf:3,config:3,confirm:3,connect:[],consider:3,consol:3,contain:[],control:[0,3],copi:[3,4],copyright:3,cover:[],coverag:0,creat:[0,4],credenti:[0,3],crt:3,curl:3,current:[3,4],current_stable_vers:4,custom:0,cycl:0,dai:3,data:[3,4],date:0,datetim:[],db_name:3,debug:[],definit:3,delayed_unassigned_shard:4,delet:[3,4],delimit:4,deploi:3,depth:[],destin:4,destination_index:4,destination_index_nam:4,detach:3,detail:4,dev:[],dict:4,did:3,differ:0,direct:2,directli:[1,3,4],directori:[],directory:3,disabl:3,disk:4,displai:3,doc:[0,3,4],dockerhub:[],doe:4,doesn:4,domain:3,down:0,download:3,easi:3,easier:0,edit:[],effect:0,either:[3,4],elast:[3,4],elastichq:[],elasticsearch:[0,2,3,4],enabl:3,end:0,endpoint:[2,4],enough:3,enter:3,entir:0,entri:1,environ:[],error:[],es_v2:4,esv:0,etc:3,even:4,event:[0,3],eventlet:3,everyth:3,evil:3,exampl:4,except:3,exec:3,execut:4,exist:4,expect:3,expir:3,expirat:3,expos:3,express:3,fail:3,failur:3,fals:[3,4],featur:[],feel:1,field:3,file:[0,3],find:3,first:0,fix:0,flag:3,flask:[0,3,4],flush:4,follow:3,foo:[],footer:3,forc:4,form:[0,3],format:[0,3],formerli:4,forum:[1,2],found:[3,4],free:1,freeli:2,frequent:1,from:4,further:3,futur:3,gener:[0,4],get:[],gitflow:3,github:[0,1,3,4],given:4,gmt:0,govern:3,guarante:0,guidelin:0,gunicorn:3,handler:[],happen:3,hasn:3,have:[0,1,3],help:1,here:3,homepag:2,host:[3,4],hq_ca_certs:3,hq_debug:3,hq_default_url:3,hq_enable_ssl:3,hq_verify_certs:3,html:[0,4],htmlcov:0,htmlout11:[],htmlout:0,https:4,imag:3,immedi:0,implemen:[],implement:3,impli:3,includ:[0,2],index:[],index_nam:4,indic:[2,4],individu:0,info:[],inform:[3,4],informat:3,initi:3,initializing_shard:4,input:3,instal:[0,3],installed_vers:4,instanc:3,instanceid:[],instruct:1,integr:[0,3],integrat:[],interfac:4,internal:4,issu:3,itself:3,jan:0,join:3,json:[0,3,4],just:4,kept:3,kill_es_vers:0,kind:3,known:4,languag:3,larg:4,law:3,left:[],length:0,level:3,librari:0,licens:[],license:3,like:3,limit:3,line:[],list:[],load:3,local:0,localhost:[0,1,3,4],locat:3,logfil:3,logger:3,made:3,mai:[3,4],major:[0,3],major_version:0,manag:[0,2,3],mani:[2,4],manual:[],mapping_nam:4,mapping_onli:4,master:[3,4],match:3,max:0,merg:4,messag:4,meta:3,method:[0,4],methodolog:3,metric:3,millisecond:0,modifi:[],monitor:2,most:3,multithread:3,must:3,name:[0,3,4],navig:[0,3],necessari:3,need:0,net:3,network:3,next:3,node:[],node_id:4,normal:0,npm:0,number:3,number_of_data_nod:4,number_of_in_flight_fetch:4,number_of_nod:4,number_of_pending_task:4,number_of_replica:4,number_of_shard:4,obtain:3,offer:3,onc:0,once:0,one:[2,4],onli:4,open:4,option:[3,4],options:0,org:[3,4],organ:3,origin:[0,3],other:[],otherwis:4,our:3,out:[3,4],output:[0,3],over:3,pack:[],param:[],pass:[3,4],password:3,patch:[],path:[0,3],payload:4,pend:[],perform:0,permiss:3,ping:4,pip:[0,3],plain:3,platform:2,pleas:0,pocoo:4,point:3,pool:4,port:[0,3,4],possibl:4,post:[0,4],prefer:[0,3],prefix:[],preserv:[],pretti:3,prioriti:0,process:3,progress:[],project:[],proper:3,prune:0,pull:4,purchas:3,put:[0,4],pytest:0,python3:3,python:[0,3],question:[1,3],reach:3,reachabl:3,read:[0,3],readme:[],realiz:3,reason:[0,3],receiv:0,recommend:3,reconnect:3,recreat:3,refer:[],refresh:[0,4],reindex_opt:4,reload:3,relocating_shard:4,rememb:[],remov:[],repo:0,report:0,repositori:[],repository_nam:4,request:[0,4],requir:[],respect:[],response_tim:4,rest:[],retriev:3,right:[],roadmap:2,roi:3,root:[0,3],royrusso:[],rule:4,run_es_vers:0,run_test:[],runserv:3,russo:3,same:[2,3],save:[2,4],scheme:3,screen:3,script:[0,3],sdsd:[],searchabl:4,section:3,secur:3,sed:3,see:[1,3],segment:4,self:3,semant:3,separ:0,serv:[0,2],server:[0,3,4],set:[],sever:[3,4],shard:[],ship:3,should:[0,3],shutdown:[],sign:3,signer:3,silent:3,simpli:[3,4],sinc:2,singl:3,site:0,slate:3,snippet:4,softwar:[2,3],some:3,sourc:[0,3,4],source_index:4,source_index_nam:4,specif:[0,3],specifi:3,sphinx:0,sqlalchemy_database_uri:3,sqlite:3,sqllite:3,src:3,ssl:[],stabl:3,standard:[0,3],standard_handl:[],start:[],start_clust:[],starttim:[],status_cod:4,still:0,stop:0,storag:[],store:3,string:4,success:4,suggest:1,suit:0,supervisor:3,supervisord:3,support:3,tag:[],take:[0,3],taken:4,task_max_waiting_in_queue_milli:4,templat:0,termin:3,text:3,thank:3,thei:[],them:0,thi:[0,1,3,4],those:3,thread:3,through:0,thru:4,time:[0,2,3,4],timed_out:4,todo:[],took:0,trigger:4,trust:3,txt:[0,3],type:[0,4],typic:0,unassigned_shard:4,under:[0,1,2,3],uninstal:3,unless:3,unstabl:[0,3],until:0,updatetim:[],upgrad:3,uploadpolici:[],uploadpolicysignatur:[],url:[3,4],usag:3,use_ssl:4,user:[],usernam:3,username:3,v5_docker:[],valid:3,validate_cert:3,valu:3,vari:4,veri:0,verif:3,verifi:3,verify_cert:3,version:[],via:[3,4],view:[],virtual:[],volum:3,wait:[],want:3,warn:[],warning:4,warranties:3,websit:3,websocket:3,wed:0,welcom:0,well:3,werkzeug:0,when:[3,4],where:3,whether:[3,4],which:0,window:3,wish:[0,3],within:3,without:3,work:[],worker:3,working:3,wrapper:4,write:[3,4],wsgi:3,www:[3,4],xget:3,yellow:4,yml:[],you:[0,1,3,4],your:[3,4]},titles:["For Developers","FAQ","ElasticHQ Documentation","Getting Started","REST API"],titleterms:{"true":0,across:3,alia:4,api:4,bug:0,build:0,cert:3,cluster:4,command:[3,4],configur:3,connect:[3,4],contain:3,content:[0,1,3,4],contribut:0,dashboard:[],databas:3,debug:0,develop:0,diagnos:3,diagnost:4,directori:[],distribut:0,docker:3,dockerhub:0,document:[0,2],elastichq:[1,2,3],environ:[0,3],error:3,external:3,faq:1,featur:2,from:0,get:3,guid:3,header:0,health:4,how:1,http:0,image:3,index:4,indice:4,info:4,initial:3,install:[0,3],installat:3,integrat:3,issue:0,kei:2,latest:3,licens:3,line:3,list:4,log:3,login:3,main:[],manual:0,map:4,minor:3,node:4,note:0,openshift:3,other:[],overview:2,pack:3,paramet:3,patch:3,pre:[0,3],preserv:3,product:3,project:2,pull:0,quick:3,refer:[],reindex:4,releas:[0,3],remov:[],repositori:4,requir:3,resourc:[],respons:0,rest:4,restart:3,rout:4,run:[0,3],set:0,shard:4,snapshot:4,ssl:3,start:3,startup:[],stat:4,state:4,statu:[0,4],structur:[],summari:4,tabl:[0,1,3,4],tag:0,test:0,troubleshoot:3,upgrade:3,user:[],using:1,variabl:3,version:3,view:3,work:3}}) \ No newline at end of file diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 460e9171..833b57b5 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -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/elastichq/api/clusters.py b/elastichq/api/clusters.py index e203b2eb..aeb97ac9 100644 --- a/elastichq/api/clusters.py +++ b/elastichq/api/clusters.py @@ -113,12 +113,14 @@ def post(self): try: enable_ssl = current_app.config.get('ENABLE_SSL', False) ca_certs = current_app.config.get('CA_CERTS', None) + verify_certs = current_app.config.get('VERIFY_CERTS', None) response = ConnectionService().create_connection(ip=params['ip'], port=params.get('port', "9200"), scheme=scheme, username=params.get('username', None), password=params.get('password', None), fail_on_exception=True, - enable_ssl=enable_ssl, ca_certs=ca_certs) + enable_ssl=enable_ssl, ca_certs=ca_certs, + verify_certs=verify_certs) schema = ClusterDTO(many=False) result = schema.dump(response) diff --git a/elastichq/config/settings.py b/elastichq/config/settings.py index 5d4a8456..1f5c2775 100644 --- a/elastichq/config/settings.py +++ b/elastichq/config/settings.py @@ -62,7 +62,7 @@ class TestSettings(BaseSettings): # static HQ_SITE_URL = 'http://elastichq.org' HQ_GH_URL = 'https://github.com/ElasticHQ/elasticsearch-HQ' - API_VERSION = 'v3.5.1' + API_VERSION = 'v3.5.2' ES_TEST_INDEX_NAME = 'cars' @@ -105,7 +105,7 @@ class ProdSettings(BaseSettings): # static HQ_SITE_URL = 'http://elastichq.org' HQ_GH_URL = 'https://github.com/ElasticHQ/elasticsearch-HQ' - API_VERSION = '3.5.1' + API_VERSION = '3.5.2' SERVER_NAME = None # cluster settings: specific settings for each cluster and how HQ should handle it. diff --git a/elastichq/service/ConnectionService.py b/elastichq/service/ConnectionService.py index a83968e9..525f83e1 100644 --- a/elastichq/service/ConnectionService.py +++ b/elastichq/service/ConnectionService.py @@ -35,14 +35,18 @@ def ping(self, ip, port, scheme='http'): except Exception as e: return False - def create_connection(self, ip, port, scheme='http', username=None, password=None, - fail_on_exception=False, enable_ssl=False, ca_certs=None): + def create_connection(self, ip, port, scheme='http', username=None, password=None, fail_on_exception=False, + enable_ssl=False, ca_certs=None, verify_certs=True): """ Creates a connection with a cluster and place the connection inside of a connection pool, using the cluster_name as an alias. - :param ip: + :param verify_certs: + :param ip: :param port: :param scheme: :param fail_on_exception: If we should raise an exception on a failed connection + :param ca_certs: Frome the requests docs: "verify: (optional) Either a boolean, in which case it controls whether we verify + the server's TLS certificate, or a string, in which case it must be a path + to a CA bundle to use. Defaults to ``True``." :return: """ try: @@ -80,7 +84,7 @@ def create_connection(self, ip, port, scheme='http', username=None, password=Non if is_basic_auth is True: if enable_ssl: conn = Elasticsearch(hosts=[scheme + "://" + ip + ":" + port], maxsize=5, - use_ssl=True, verify_certs=True, ca_certs=ca_certs, + use_ssl=True, verify_certs=verify_certs, ca_certs=ca_certs, version=content.get('version').get('number'), http_auth=(username, password)) else: conn = Elasticsearch(hosts=[scheme + "://" + ip + ":" + port], maxsize=5, @@ -89,7 +93,7 @@ def create_connection(self, ip, port, scheme='http', username=None, password=Non else: if enable_ssl: conn = Elasticsearch(hosts=[scheme + "://" + ip + ":" + port], maxsize=5, - use_ssl=True, verify_certs=True, ca_certs=ca_certs, + use_ssl=True, verify_certs=verify_certs, ca_certs=ca_certs, version=content.get('version').get('number')) else: conn = Elasticsearch(hosts=[scheme + "://" + ip + ":" + port], maxsize=5,

ArgHQ_DEBUG
HQ_VERIFY_CERTSTrueWhether HQ should attempt to validate certs. Set to False for self-signed certs.
HQ_DEBUG False If True, enables debug level on logging.