-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
influxdb set up info for quick integration tests
- Loading branch information
1 parent
496c709
commit 6d5d199
Showing
5 changed files
with
242 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Test Flows README | ||
|
||
To test this node, we use influxdb running in a docker container. Currently testing with influxdb 1.6.3 | ||
|
||
Set up influxdb using docker. See documentation at https://hub.docker.com/_/influxdb/ | ||
|
||
## Generating influxdb configuration | ||
|
||
We have a configuration file already set up for use with a self signed cert. To generate a new, fresh config file locally: | ||
|
||
docker run --rm influxdb:1.6.3 influxd config > influxdb.conf | ||
|
||
## Set up self signed certificate | ||
|
||
From the [influxdb admim documentation](https://docs.influxdata.com/influxdb/v1.6/administration/https_setup/) you can set up | ||
self signed SSL cert as follows: | ||
|
||
sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout ./keys/influxdb-selfsigned.key -out ./keys/influxdb-selfsigned.crt | ||
|
||
Answer the questions as you like. | ||
|
||
|
||
|
||
## Running influxdb for tests | ||
|
||
To run influxdb using the config file in the current directory: | ||
|
||
docker run --name=influxdb -p 8086:8086 \ | ||
-v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \ | ||
-v $PWD/ssl:/etc/ssl \ | ||
influxdb:1.6.3 -config /etc/influxdb/influxdb.conf | ||
|
||
To run the influxdb CLI against this container using a self-signed cert: | ||
|
||
docker run --rm --link=influxdb -it influxdb influx -ssl -unsafeSsl -host influxdb | ||
|
||
You can then execute CLI commands to create databases, make queries, etc.. | ||
|
||
First, create a `test database to use by the test flows. | ||
|
||
create database test | ||
|
||
Then import the test flows into Node-RED and ensure they work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
reporting-disabled = false | ||
bind-address = "127.0.0.1:8088" | ||
|
||
[meta] | ||
dir = "/var/lib/influxdb/meta" | ||
retention-autocreate = true | ||
logging-enabled = true | ||
|
||
[data] | ||
dir = "/var/lib/influxdb/data" | ||
index-version = "inmem" | ||
wal-dir = "/var/lib/influxdb/wal" | ||
wal-fsync-delay = "0s" | ||
query-log-enabled = true | ||
cache-max-memory-size = 1073741824 | ||
cache-snapshot-memory-size = 26214400 | ||
cache-snapshot-write-cold-duration = "10m0s" | ||
compact-full-write-cold-duration = "4h0m0s" | ||
max-series-per-database = 1000000 | ||
max-values-per-tag = 100000 | ||
max-concurrent-compactions = 0 | ||
max-index-log-file-size = 1048576 | ||
trace-logging-enabled = false | ||
tsm-use-madv-willneed = false | ||
|
||
[coordinator] | ||
write-timeout = "10s" | ||
max-concurrent-queries = 0 | ||
query-timeout = "0s" | ||
log-queries-after = "0s" | ||
max-select-point = 0 | ||
max-select-series = 0 | ||
max-select-buckets = 0 | ||
|
||
[retention] | ||
enabled = true | ||
check-interval = "30m0s" | ||
|
||
[shard-precreation] | ||
enabled = true | ||
check-interval = "10m0s" | ||
advance-period = "30m0s" | ||
|
||
[monitor] | ||
store-enabled = true | ||
store-database = "_internal" | ||
store-interval = "10s" | ||
|
||
[subscriber] | ||
enabled = true | ||
http-timeout = "30s" | ||
insecure-skip-verify = false | ||
ca-certs = "" | ||
write-concurrency = 40 | ||
write-buffer-size = 1000 | ||
|
||
[http] | ||
enabled = true | ||
bind-address = ":8086" | ||
auth-enabled = false | ||
log-enabled = true | ||
suppress-write-log = false | ||
write-tracing = false | ||
pprof-enabled = true | ||
debug-pprof-enabled = false | ||
https-enabled = true | ||
https-certificate = "/etc/ssl/influxdb-selfsigned.crt" | ||
https-private-key = "/etc/ssl/influxdb-selfsigned.key" | ||
max-row-limit = 0 | ||
max-connection-limit = 0 | ||
shared-secret = "" | ||
realm = "InfluxDB" | ||
unix-socket-enabled = false | ||
unix-socket-permissions = "0777" | ||
bind-socket = "/var/run/influxdb.sock" | ||
max-body-size = 25000000 | ||
access-log-path = "" | ||
max-concurrent-write-limit = 0 | ||
max-enqueued-write-limit = 0 | ||
enqueued-write-timeout = 30000000000 | ||
|
||
[logging] | ||
format = "auto" | ||
level = "info" | ||
suppress-logo = false | ||
|
||
[ifql] | ||
enabled = false | ||
log-enabled = true | ||
bind-address = ":8082" | ||
|
||
[[graphite]] | ||
enabled = false | ||
bind-address = ":2003" | ||
database = "graphite" | ||
retention-policy = "" | ||
protocol = "tcp" | ||
batch-size = 5000 | ||
batch-pending = 10 | ||
batch-timeout = "1s" | ||
consistency-level = "one" | ||
separator = "." | ||
udp-read-buffer = 0 | ||
|
||
[[collectd]] | ||
enabled = false | ||
bind-address = ":25826" | ||
database = "collectd" | ||
retention-policy = "" | ||
batch-size = 5000 | ||
batch-pending = 10 | ||
batch-timeout = "10s" | ||
read-buffer = 0 | ||
typesdb = "/usr/share/collectd/types.db" | ||
security-level = "none" | ||
auth-file = "/etc/collectd/auth_file" | ||
parse-multivalue-plugin = "split" | ||
|
||
[[opentsdb]] | ||
enabled = false | ||
bind-address = ":4242" | ||
database = "opentsdb" | ||
retention-policy = "" | ||
consistency-level = "one" | ||
tls-enabled = false | ||
certificate = "/etc/ssl/influxdb.pem" | ||
batch-size = 1000 | ||
batch-pending = 5 | ||
batch-timeout = "1s" | ||
log-point-errors = true | ||
|
||
[[udp]] | ||
enabled = false | ||
bind-address = ":8089" | ||
database = "udp" | ||
retention-policy = "" | ||
batch-size = 5000 | ||
batch-pending = 10 | ||
read-buffer = 0 | ||
batch-timeout = "1s" | ||
precision = "" | ||
|
||
[continuous_queries] | ||
log-enabled = true | ||
enabled = true | ||
query-stats-enabled = false | ||
run-interval = "1s" | ||
|
||
[tls] | ||
min-version = "" | ||
max-version = "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDBDCCAewCCQCDcrNep3/xPDANBgkqhkiG9w0BAQsFADBEMQswCQYDVQQGEwJD | ||
QTELMAkGA1UECAwCQkMxEjAQBgNVBAcMCVZhbmNvdXZlcjEUMBIGA1UECgwLU2Vu | ||
c2VUZWNuaWMwHhcNMTgwOTI5MjMyMDIwWhcNMTgxMDI5MjMyMDIwWjBEMQswCQYD | ||
VQQGEwJDQTELMAkGA1UECAwCQkMxEjAQBgNVBAcMCVZhbmNvdXZlcjEUMBIGA1UE | ||
CgwLU2Vuc2VUZWNuaWMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2 | ||
45td3PIAhNuzoPFKIhvxoWAAmLV4U1S9d2bby51J1/XfcHPLAQB7H8jRQyBV5z1b | ||
APhTWZKxrM9tseRbBrABzN9VlS+FfzQRW/RyOKUCa5clepgHoeP0I8RIX4cMAA4c | ||
63RxobqIdw6WgSoUSY8Z/t+DNhqJkWyK2UaMyTmS9k9L/kxVXTSi+5QeaEW7wAW+ | ||
aUHvsBiNqb1RzPKDNYfwvlrbYvUyC2ymI684yN0l7tq7XOgMDbyLbVE1+9k/L+9a | ||
QgsqM3462q13GyOZpURvsNYZhIT+BeArB17kDlYQvn0+/nFKGy6jGcLUawfg8RW5 | ||
sr2z4IuVKxUGBUs71oKLAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD58NMK5VDoN | ||
w6P4XDx/L6BDl9j6lPV9Qg3F8BqAfFeW080oy/DTaXaE0zZZPijREGoaxk6eI85d | ||
BtU4YWBkBC5jxAVITx/jE99GkklQOzU+Ppzjp51wX/zlsw3WCjusEhh4v2AKBH/8 | ||
y3z7Sdwo58/QNqGSOjH5YxbjndPbehJsUbHkVsi1y0jfaAGFP7rkkFKFs0xtuSiw | ||
v8/J2THuG7idWozddeWyDufrrLAsAHve+y9n/J7IoayDshmAhR6Noa2TyZS4rvpB | ||
zMs2Wq5tzY/EXhJIOaPMYb+b+ca7njfN7zH0DgCjklqHhWQyHe2MQdHMVWVl9u1e | ||
e80MdJjhlko= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC245td3PIAhNuz | ||
oPFKIhvxoWAAmLV4U1S9d2bby51J1/XfcHPLAQB7H8jRQyBV5z1bAPhTWZKxrM9t | ||
seRbBrABzN9VlS+FfzQRW/RyOKUCa5clepgHoeP0I8RIX4cMAA4c63RxobqIdw6W | ||
gSoUSY8Z/t+DNhqJkWyK2UaMyTmS9k9L/kxVXTSi+5QeaEW7wAW+aUHvsBiNqb1R | ||
zPKDNYfwvlrbYvUyC2ymI684yN0l7tq7XOgMDbyLbVE1+9k/L+9aQgsqM3462q13 | ||
GyOZpURvsNYZhIT+BeArB17kDlYQvn0+/nFKGy6jGcLUawfg8RW5sr2z4IuVKxUG | ||
BUs71oKLAgMBAAECggEABoQfgf2gRbJ2HXVLg4eplTdZs0u9k3bsmv+JE6WyifH+ | ||
2aIpDf+QI9LjFcmdelIN1pM3Rcj4OApfLZpb935KgRXqkyMImWoJ0eCD2hn4jxiE | ||
PxqaFhOHiqhHkwiMSDosRo2BDZdkjP4o7+XUOPrR9WwmTId99I7Q3jWVlOiKe5jp | ||
mO/6WpQNfUzQDeCw+dajb5V+CK7BdRg71oN0VYkh4TDRJu20mgdoful747HX46Tl | ||
dc+exFLIhohJrQUaRVDmb992hu3GJXQuDdQVFA5AIs5royLR4ZyVie+s/jF42cxM | ||
YBowtvcGxZ2X/q8/XQwfRRE3jlB1xpjVHj8jfOtioQKBgQDanchewW/QStHcprog | ||
7mQtEwV3BoGDljUtULxWi1IztpuYSdOE5p054LFIFsEhxoEVBaBOut3RG3B5w+rn | ||
kFggClUp8eg907BtdixZ2mBWhCEo6saMAm9tcQ7wmzXIIQs6IhAW94tGXwaIaPFe | ||
80oGzoogXC0QdBSP6o6A71CcuwKBgQDWKdEkAYTKtKmffbz17faDPRqZAd+E3dWZ | ||
BaM1kcQJh5JxBv79bN5MZBelYvbIseYIEl7L+aMp5TWAJD+6DTiJK4mBdvkEMBeO | ||
ZHefvc7UlohIQaiziS+z5x3vHwYMbTeS4lLMp+MmW++HkrLGY1kulSaSpk7vVk3q | ||
1z4HI/i8cQKBgBamXkoi9Hi6J8AarhIXYN2iqOBKFkUR3PSS9tBoot2kv74pd/a/ | ||
Be8nLnbvlJbxQBJzgMZnae/uTdrvx3iyZc78AxLTc2JkelT8919f1rdf/SeGG4gK | ||
AI1wN0IKcqoHcmhVeyFGCHIECmM7rDZQMo09/OWZZznbLP40KQuGv+1dAoGAYKwJ | ||
ovYoihPZCYyJkn2zK/SWIAEvc1trgqJ/1LuSwTZ4TRr6WU0eX19DKT2t5lQfYP9h | ||
2TM7irrTVp+GQKadIZYMgOtCZriKuZTyRqI4TdARfoRc8YX4iX3HDlxzr4JRdrVA | ||
6O7T40nWqtz2ZAUOia979PCravALRfmZH0IGkpECgYA0xvtg2jhDLQGPUEl/ft3W | ||
jenP1RkYAuOEpBK3traqed6Rb5IT75h8JKlqo9N6wX2xUuUZtdUrct1mvRgmanv1 | ||
29WS9a+dGx7NBycKrkMMDbaHVEshiP0kA8bpnOD0ssCoKrMOyOJRJw+ZVaXhFnt+ | ||
ulVCZQW6fWqtCHtRGZ4BMQ== | ||
-----END PRIVATE KEY----- |
Empty file.