-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add InfluxDB as a package #5900
base: master
Are you sure you want to change the base?
Conversation
@brakenium thanks for this contribution. IMHO we should compile influxdb and influxdb-client from source, to not only support x64 and aarch64 CPU models. And I am not sure, whether prebuilt linux binaries will run on DSM 6 and DSM 7. |
@brakenium we already have #3709 for influxdb 1 And we have the request #5406.
So IMHO there is no benefit to have influxdb as package from synocommunity. |
Regarding your first message: From what I could see the Makefile from InfluxDB itself does a Regarding your second message: |
Yes, as noted in #5667, docker support for aarch64 is limitted to DSM 7.2 and x20 Series and newer. I have a DS218 too, that I keep currently on DSM 6.2.4. will give it a try. |
You can ignore the BTW, yesterday I updated the wiki page that documents Makefile variables to add such details to |
That leaves 'Check "View log"' then. How would one do this? I can't find anything relating to 3rd party packages in log center or support center |
@brakenium i have got it running 😄 There are some options that must be configured in a config file that must be installed with the package: Some paths are located under |
That's great! InfluxDB is configured either through the web UI (which is what I did) or through a command. I guess a wizard that runs the command afterwards could work, but it seems counterproductive to me since the web UI already offers this. The wizards did seem fairly daunting to me at first, so that may be out of scope for me to do. On DSM7.2 when updating the package I haven't lost any data or are you talking about DSM updates? I also don't see the path you are describing on my system. The EDIT: on further inspection the wizard does not seem to bad, I'll give it a go |
So far I do not see a requirement for a wizard, i.e. for the user to provide configuration parameters at installation time. The package home directory is not available on DSM < 7. So using the var folder is a solution that works on all DSM versions. We definitifly need a config file for the custom paths. what about this? bolt-path: /var/packages/influxdb/var/.influxdbv2/influxd.bolt
engine-path: /var/packages/influxdb/var/.influxdbv2/engine
sqlite-path: /var/packages/influxdb/var/.influxdbv2/influxd.sqlite and an appropriate service-setup.sh looks like this: INFLUXD_CONFIG_PATH=$(SYNOPKG_PKGVAR)/config.yml
INFLUXD=${SYNOPKG_PKGDEST}/bin/influxd
export INFLUXD_CONFIG_PATH=${INFLUXD_CONFIG_PATH}
SERVICE_COMMAND="${INFLUXD} run --http-bind-address :${SERVICE_PORT}"
SVC_BACKGROUND=yes
SVC_WRITE_PID=yes
SVC_CWD="${SYNOPKG_PKGVAR}" BTW I miss the influxd parameters --pid-file and --config-file of influxdb1. |
oops, my comment regarding the wizard was 5 min. too late... |
I prefer the web UI for influxdb configuration over an installation wizard. |
I thought I had to do a wizard to set the port, but I was mistaken. I just left it in my last commit since I made it anyway. Will probably end up taking it out since that is what I prefer as well |
The token will be saved locally, but you should be able to create a new one with the credentials you fill in? |
The port must be hard coded and cannot defined by the user at installation time I propose to use port 18086 or 8186. |
The port should now be corrected and hard coded. I grepped the makefiles for port 8085, but didn't find any that used it |
Hi, |
You can help testing. However I personally haven't had the time nor desire the last few weeks to work on this. Though it might be ready to be merged? Can't remember |
@hgy59 Do you have time to look at this package again? After my education sucked me in I finally found some time again. I think I've some final adjustments today. |
spk/influxdb/src/service-setup.sh
Outdated
service_postinst () | ||
{ | ||
cat << EOF > "${INFLUXD_CONFIG_PATH}" | ||
http-bind-address: ":${SERVICE_PORT}" | ||
reporting-disabled: true | ||
bolt-path: "${SYNOPKG_PKGVAR}/.influxdbv2/influxd.bolt" | ||
engine-path: "${SYNOPKG_PKGVAR}/.influxdbv2/engine" | ||
sqlite-path: "${SYNOPKG_PKGVAR}/.influxdbv2/influxd.sqlite" | ||
|
||
EOF | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This config is now static.
I highly recommend to add the config file to the package in the var folder.
This way it will automatically be installed.
Plus the config file in the package will not overwrite the config on package updates.
I know it is a bit off topic or too generalistic but... how do you test your packages ? |
I'm testing it on my NAS |
Co-authored-by: hgy59 <[email protected]>
The config should now be static |
You can use https://github.com/fbelavenuto/arpl to setup virtual dsm |
Description
This PR adds InfluxDB as a new package. This is not a critical application for me personally, so I doubt I'll stay on updating to new versions unless I somehow notice a new version is out. Currently this does not work for armv7 since I am using the pre-compiled binaries (amd64 and arm64 only). I have tried compiling from source (for a different reason), but couldn't get it to work.
I tried figuring out the two logging checks when testing package functionality, but couldn't exactly figure it out. So I'll need some pointers for that. Logs do exist at:
/var/packages/influxdb/var/influxdb.log
, but not at/var/packages/influxdb/target/var/
. The other tests were successful.Not sure if any documentation is necessary since InfluxDB's own documentation should apply, so I'll keep that open for now.
Checklist
all-supported
completed successfullyType of change