@@ -26,7 +26,7 @@ Install ElasticHQ
26
26
27
27
1. Download or clone the repository https://github.com/ElasticHQ/elasticsearch-HQ
28
28
2. Navigate to the root of the repository: ``pip install -r requirements.txt``
29
- 3. Start the server: ``python application.py``
29
+ 3. Start the server: ``python3 application.py``
30
30
4. Point your browser to: http://localhost:5000
31
31
32
32
.. note:: Alternatively, you can start the server with ``python manage.py runserver``
@@ -76,14 +76,16 @@ Command line Parameters
76
76
77
77
The ``application.py`` start script takes parameters passed in as arguments from the command line:
78
78
79
- =========== ========================= ====================================================================
80
- Arg Default Value Definition
81
- =========== ========================= ====================================================================
82
- ``--host`` 127.0.0.1 Host the HQ server should be reachable on.
83
- ``--port`` 5000 Port to reach HQ server.
84
- ``--debug`` False If True, exposes debug data to UI and causes reload on code changes.
85
- ``--url`` ``http://localhost:9200`` Default URL displayed on the initial connection screen.
86
- =========== ========================= ====================================================================
79
+ ================ ========================= ====================================================================
80
+ Arg Default Value Definition
81
+ ================ ========================= ====================================================================
82
+ ``--host`` 127.0.0.1 Host the HQ server should be reachable on.
83
+ ``--port`` 5000 Port to reach HQ server.
84
+ ``--debug`` False If True, exposes debug data to UI and causes reload on code changes.
85
+ ``--url`` ``http://localhost:9200`` Default URL displayed on the initial connection screen.
86
+ ``--enable-ssl`` False If flag is passed, assumes ssl cert will be used.
87
+ ``--ca-certs`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed.
88
+ ================ ========================= ====================================================================
87
89
88
90
.. _environment variables:
89
91
@@ -94,6 +96,8 @@ Environment Variables
94
96
Arg Default Value Definition
95
97
================== ========================= ====================================================================
96
98
``HQ_DEFAULT_URL`` ``http://localhost:9200`` Default URL displayed on the initial connection screen.
99
+ ``HQ_ENABLE_SSL`` False If flag is passed, assumes ssl cert will be used.
100
+ ``HQ_CA_CERTS`` /path/to/your/ca.crt Path to your CA Certificate. Required if enable-ssl is passed.
97
101
================== ========================= ====================================================================
98
102
99
103
@@ -106,13 +110,52 @@ Advanced users that want to have control over the logging output, can adjust it
106
110
107
111
Docker users will find the logfile location under ``/src/application.log``
108
112
113
+ Connecting with SSL
114
+ ^^^^^^^^^^^^^^^^^^^
115
+
116
+ Thanks to a community contribution, SSL Cert support has been added: `SSL Support <https://github.com/ElasticHQ/elasticsearch-HQ/issues/376>`_.
117
+
118
+ Enable SSL Cert support by starting HQ as so:
119
+
120
+ ``python -m application --enable-ssl --ca-certs /path/to/your/ca.crt``
121
+
122
+
109
123
Database
110
124
^^^^^^^^
111
125
112
126
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``.
113
127
114
128
.. note:: In the event you want to start with a clean slate, simply delete the ``elastichq.db`` file. ElasticHQ will recreate it at next startup.
115
129
130
+ External Configuration
131
+ ^^^^^^^^^^^^^^^^^^^^^^
132
+
133
+ External configuration files are supported for those wanting to preserve their user-specified settings between upgrades.
134
+
135
+ On startup, HQ checks the following locations for a file named ``settings.json``:
136
+
137
+ * `/etc/elastic-hq/settings.json`
138
+ * `~/settings.json`
139
+ * CURRENT WORKING DIRECTORY + ``/settings.json``
140
+ * CURRENT WORKING DIRECTORY + ``/elastichq/settings.json``
141
+ * CURRENT WORKING DIRECTORY + ``/config/settings.json``
142
+
143
+ Current supported parameters are:
144
+
145
+ =========================== ====================================================================
146
+ Key Definition
147
+ =========================== ====================================================================
148
+ ``SQLALCHEMY_DATABASE_URI`` Location and Name of ElasticHQ database file.
149
+ =========================== ====================================================================
150
+
151
+ The settings file should be in standard JSON:
152
+
153
+ .. code-block:: json
154
+
155
+ {
156
+ "SQLALCHEMY_DATABASE_URI" : "sqlite:////SOME/PATH/TO/DB_NAME.db"
157
+ }
158
+
116
159
Upgrading
117
160
---------
118
161
@@ -184,7 +227,7 @@ Failure in connecting initially to an Elasticsearch cluster, can happen for seve
184
227
.. _xpack integration:
185
228
186
229
X-Pack Integration
187
- ~~~~~~~~~~~~~~~~~~
230
+ ^^^^^^^^^^^^^^^^^^
188
231
189
232
X-Pack is configured with authentication. To connect, you must pass along the username and password in the connection URL
190
233
using the format ``http://USERNAME:PASSWORD@DOMAIN:PORT``
@@ -201,6 +244,32 @@ In the base installation, the logs are available under the ``/install/path/appli
201
244
202
245
For docker images, the application logging can be found under ``/src/application.log``.
203
246
247
+ .. _ssl_trouble:
248
+
249
+ SSL Cert not working
250
+ ^^^^^^^^^^^^^^^^^^^^
251
+
252
+ **NOTE: Your CA file must be the same signer of your Elasticsearch node, for HQ to connect as a trusted source.**
253
+
254
+ Verify that the certificate works by connecting directly from the HQ instance to the ES node in question, using the cert:
255
+
256
+ ``curl -u admin:password --ca-certs /path/to/ca.crt https://localhost:9200/_cluster/settings?pretty``
257
+
258
+ Preserving Database across Docker container restarts
259
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
260
+
261
+ 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.
262
+
263
+ .. code-block:: bash
264
+
265
+ docker run --detach
266
+ --restart=always
267
+ --net host
268
+ --volume elastichq:/src/db
269
+ --name elastichq
270
+ elastichq/elasticsearch-hq
271
+ sh -x -c 'sed -i -r -e "s/_sqlalchemy_database_uri =.*/_sqlalchemy_database_uri = "sqlite:///" + os.path.join(BASEPATH, "db" , "elastichq.db")/" /src/elastichq/config/settings.py && exec supervisord -c /etc/supervisor/supervisord.conf'
272
+
204
273
License
205
274
-------
206
275
0 commit comments