-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 the packaging metadata to build the netdata snap #1991
Conversation
To test this in ubuntu 16.04:
Note that there is a big bug here because the path of the build machine gets hardcoded into the snap, so it can only be run in this machine and won't work if installed from the ubuntu store. I'm making this PR as suggested by @ktsaou to see if we can find a good solution. |
thanks! Regarding the bug: when a snap is installed from the ubuntu store, how it can find its path? At which point the path is known and how? |
Most projects use xdg, so the paths are not absolute, they are relative to $HOME, which will just work in the snap. When a project doesn't follow xdg, it usually has a flag to specify the data dir. When snaps are run they have a set of environment variables that point to the right location for them to store files. You will see in this PR that I'm trying to use the config from $SNAP_USER_DATA/etc/netdata/netdata.conf, but that doesn't work because of the There are many ways to fix it. One way would be to add one option to netdata-installer.sh so we can split installation dir from data dir, and call it something like:
This Another option would be for netdata to search for the files in 'm not really sure if this answers your question. |
ok. The $HOME idea is very nice. I also need some persistent storage. Something that will remain in the target system and will not be moved with the snap. I use this for 2 simple text files: a machine unique id and the alarms log. Does snap support this? |
If it's machine specific, you can put it in $SNAP_COMMON. If it's user specific, you can put it in $SNAP_USER_COMMON. Here you can find more details about the variables: https://snapcraft.io/docs/reference/env I think that fits your use case, but also remember that we are on active development. If you need something that snaps don't yet provide, we'll put it in our backlog. |
ok. I have 3 options:
Will option 3 be good for you? |
Yes, number 3 sounds like a viable option.
…--
Enviado con Dekko desde mi dispositivo Ubuntu
|
ok, this is what I did: You can use command line parameters to overwrite any of The
In detail: config directorythe directory where all user configuration files should be. The default is determined at compile time. log directorythe directory where netdata will save its log files. The default is determined at compile time. plugins directorythe directory where all netdata plugins are. The default is determined at compile time. web files directorythe directory where all static web files are. The default is determined at compile time. cache directorythe directory where all chart data will be saved to. This is only used when I don't know if this should be persistent. If we decide that only one netdata should be running at a host at any given time, these could be persistent. lib directorythe directory where a few key files about of the operation of netdata are kept. This should be persistent. The default is determined at compile time. home directorythe directory netdata will be while running. It is not used for anything currently. The default is determined at compile time. host access prefixThis is used when running in containers, to access the host's run as userThe user to run as. If netdata is started as root, it will try to switch to this user. web files owner and web files groupnetdata checks the ownership of the files it serves. If their ownership does match the above, it refuses to serve them. The default is to use the others I think are self-explanatory. how to set them on the command line
You can add this, any number of times. So, something like:
netdata also supports the option
Will these do? |
9134341
to
70de864
Compare
Any news on this? |
@paulkatsoulakis can you please review this? It's been around forever. |
Leo Arias seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
A first few basic comments:
- Please move all contents under
contrib/ubuntu
andcontrib/ubuntu/snap
respectively - Please sign the CLA
Closing due to CLA not signed and @paulkatsoulakis' request to move to a different directory not addressed. Please comment if you intend to do another commit and we'll reopen it. |
No description provided.