diff --git a/.gitignore b/.gitignore index 9f046ef..eddcb7f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ dist *.tgz .vscode/ + +end2end-setup/influx-config/influx-configs diff --git a/.npmignore b/.npmignore index 1d5dfde..c3ad667 100644 --- a/.npmignore +++ b/.npmignore @@ -9,4 +9,5 @@ data/* .github .dockerignore *rc.* -generate-schema \ No newline at end of file +generate-schema +end2end-setup \ No newline at end of file diff --git a/end2end-setup/docker-compose.yml b/end2end-setup/docker-compose.yml new file mode 100644 index 0000000..bb63efd --- /dev/null +++ b/end2end-setup/docker-compose.yml @@ -0,0 +1,30 @@ +version: '2' +services: + influxdb: + container_name: influx2 + image: influxdb:2.3 + ports: + - 8086:8086 + volumes: + - ./influx-data:/var/lib/influxdb2 + - ./influx-config:/etc/influxdb2 + environment: + - DOCKER_INFLUXDB_INIT_MODE=setup + - DOCKER_INFLUXDB_INIT_USERNAME=signalk + - DOCKER_INFLUXDB_INIT_PASSWORD=klangisklangis + - DOCKER_INFLUXDB_INIT_ORG=signalk_org + - DOCKER_INFLUXDB_INIT_BUCKET=signalk_bucket + # - DOCKER_INFLUXDB_INIT_RETENTION: The duration the system's initial bucket should retain data. If not set, the initial bucket will retain data forever. + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=signalk_token + signalk-server: + image: signalk/signalk-server:v1.45.0 + entrypoint: + - /home/node/signalk/bin/signalk-server + - --sample-n2k-data + - --override-timestamps + environment: + - DEBUG=signalk:interfaces:plugins + ports: + - 3002:3000 + volumes: + - ./dotsignalk:/home/node/.signalk diff --git a/end2end-setup/dotsignalk/plugin-config-data/signalk-to-influxdb2.json b/end2end-setup/dotsignalk/plugin-config-data/signalk-to-influxdb2.json new file mode 100644 index 0000000..45e0e74 --- /dev/null +++ b/end2end-setup/dotsignalk/plugin-config-data/signalk-to-influxdb2.json @@ -0,0 +1,17 @@ +{ + "configuration": { + "influxes": [ + { + "url": "http://influx2:8086", + "token": "signalk_token", + "org": "signalk_org", + "bucket": "signalk_bucket", + "writeOptions": { + "defaultTags": {}, + "headers": {} + } + } + ] + }, + "enabled": true +} \ No newline at end of file diff --git a/end2end-setup/influx-config/.dummy b/end2end-setup/influx-config/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/end2end-setup/influx-data/.dummy b/end2end-setup/influx-data/.dummy new file mode 100644 index 0000000..e69de29