* Replace existing kickstart scripts with kickstart-ng.
This change looks more complicated than it actually is due to git not
sanely recognizing the rename.
* Fix CI for new kickstart script.
* Initial revision of install documentation.
* Further documentation updates.
* Even more documentation updates.
* Fix telemetry event handling if neither curl nor wget are installed.
* Remove dependence on `pgrep` for claiming.
* Fix fatal error message handling.
* Formally outline our support policy.
* Updates to platform support doc.
* Platform support doc updates.
* Minor documentation updates.
* Remove accidentally commited file from rebase process.
* Apply suggestions from code review, part 1.
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
* Made one-line installer consistent.
* Apply suggestions from code review, part 2.
* Update architecture list for static builds.
* Restructure platform support doc so that things are clearer.
Especially for cases of linking directly to the section on a specific
support category.
* Apply suggestions from code review, part 3.
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
* Apply suggestions from code review, part 4
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
* Further updates to platform support document.
* Further documentation updates.
* Rework update documentation.
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
* Store info about the installation type for later retrieval.
* Properly handle install type on updates.
* Restructure install type values for easier parsing.
* Fix checksums.
* Fix .gitignore check.
* Added support for claiming nodes as part of installation.
This adds four new options to the `netdata-installer.sh` script:
* `--claim-token`
* `--claim-rooms`
* `--claim-uri`
* `--claim-proxy`
These directly correspond to the `-token`, `-rooms`, `-uri`, and `-proxy`
options for the `netdata-claim.sh` script. They have the following
associated logic:
* If any are specified and the `--disable-cloud` option is also
specified, we bail and tell the user to either enable the cloud or
remove the claiming options.
* If only some but not all of the token, rooms, and uri options are
specified, we bail and tell the user that they must pass all three.
* If all three of the token, rooms, and uri are specified, we invoke the
`netdata-claim.sh` script for the install itself as one of the last
steps in the installation process, using the values passed to these
options.
This allows users to directly claim the agent as part of the install,
which is useful for automated installation scenarios.
* Add missing space as suggested by @knatsakis
* Properly handle installs in /.
* Properly handle unprefixed installs.
* Fix another spelling error in an option name.
* Properly fix option naming.
* Move claiming into kickstart script instead of netdata-installer.
This makes us more future-proof.
The required changes also fix some buggy behavior in the option parsing
code in the kickstart scripts.
* Fix checksums.
* Sanely handle the daemon not running during the claiming process.
* Silence incorrect shellcheck warning.
* Simplify condition as suggested by @vkalintiris.
* Clean up old changes that should not be here anymore.
These are leftovers from an earlier revision, they are not actually
needed.
* Add ID generation logic to the claiming script.
This lets it reliably claim nodes which have not yet had the daemon run.
Also fixes a consistency issue in the claiming logic in the Docker
entrypoint.
* Updated messages about checksum validation failures on install.
They now explain the most common cause of the failures and suggest the
most direct way to fix the situation.
* Fix checksums.
* Clean up messages as suggested by @joelhans.
Update temporary directory checking in installer.
This updates the checks that our installer and updater make to choose
what to use for a temporary directory to be both more robust and more
portable.
The new checks use the following logic:
* For each directory to be checked, verify that it is both writable by
the current user, and that the current user can execute files they
write there.
* If `$TMPDIR` is set, preferentially use that.
* If that fials, try `/tmp`.
* If that also fails, fall back to `$PWD`.
* If all checks fail, bail early with an explanation instead of failing
when we first tryto do things with the directory.
It also adds the same checks to the `netdata-installer.sh` script, which
was previously completely missing them.
* Properly allow for offline installs.
If the user specifies a local trball to use instead of downloading the
code remotely, use the reinstall code path.
* Updated checksums.
* Added an option to explicitly allow a reinstall over an existing
install that would normally be updated.
* Fixed the duplicate install handling code to run after the option
parsing code. Previously it ran before it, and thus some cases did not
work at all.
* Added more robust handling of the case of attempting to do a duplicate
install with a different install type than the original install.
* Add proper handling for updater script in installers.
Our updater script has a built-in random delay of up to 1 hour when run
non-interactively to avoid a stampede effect for reconnections to
Netdata Cloud due to auto-updates. Due to an oversight in handling of
updates to existing installs in the installer scripts, this delay was
also occuring when the installer scripts were run non-interactively.
This commit fixes that so that non-interactive runs complete without a
delay.
* Update checksums in documentation.
* Added better checks for existing installs to the kickstart scripts.
This adds more robust checks to our Kickstart install scripts to prevent
users from accidentally installing Netdata over top of an existing
install (which can lead to all kinds of problematic situations).
The logic for these checks works as follows:
- See if `netdata` is located somewhere in `$PATH` (using `command -v`),
and if present assume there's an existing install.
- Otherwise, check if `/opt/netdata/bin/netdata` exists, if so assume
there's an existing install, otherwise continue under the assumption
there isn't.
- If there is an existing install, check if it's one done through our
install scripts, if not stop the installation process.
- If it is one of our installs, look for and attempt to use the updater
script to update the existing install (exiting with an error message
if that fails).
This also adds a switch called '--allow-duplicate-install' which will
cause the install to continue if it would normally refuse to continue
due to an existing install.
* Update checksums.
* Address feedback from @prologic.
* Add tool to build the dist and static x864_64 artifacts
* Add support for overriding the URL for installing/updating from nightlies
* Refactor curl/wget usage into less places. Use curl -q and --output and -O options instead of redirecting stdout
* Update md5sum(s) of kickstart/kickstart-static64
* Added support for opting out of telemtry via the DO_NOT_TRACK environment variable
* Added support for DO_NOT_TRACK=1 in anonymous-statistics.sh and minor cleanup in Dockerfile and run.sh entrypoint
* Allow DO_NOT_TRACK to be either non-zero or non-empty
* Update md5sum of kickstart-static64.sh in docs
* Fixed a bug in netdata-installer.sh
* Revert changes to daemon/main.c (testing onyl)
* Update docs/anonymous-statistics.md
Co-Authored-By: Mansour Behabadi <57921115+ncmans@users.noreply.github.com>
Co-authored-by: Mansour Behabadi <57921115+ncmans@users.noreply.github.com>
* Fix formatting of functions.sh and errors found by shellcheck
* Added support for other SystemD systems where /lib is read-only (e.g: CoreOS)
* Fix minor typo(s)/grammar with safe_256sum() function
* Fix shellcheck warnings in safe_256sum() function
* Update the md5sum of the kickstart-static64.sh script in our docs to match
* Store only the options for reinstall, not the full command.
This simplifies handling of updates with the static installer.
* Properly utilize the updater for static installs.
* Disable auto-updater when using local files.
If using local files, we can probably assume a system without a network
connection, so don't enable the auto-updater.
* Document support for auto-updates from kickstart-static64
* Fix infinite loop in auto-update option.
* Update kickstart-static64 checksum in docs.
* Remove unnecessary `sed` argument.
Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
* Show notice of anonymous data collection
* Add DO_NOT_TRACK env var to docker run script
* Add disable-telemetry option to kickstart-static64
* Check if DO_NOT_TRACK is set
* Second part of fix for #7040
kickstart-static64.sh passes --stable-channel option to
install-or-update.sh
* kickstart-static64.sh: Improve option parsing
* netdata/installer: Introduce parameter, for offiline installs
1) introduce parameter --local-tarball-override that takes two files as input
2) make kickstart and kickstart-static64 handle this parameter by overriding the download process and use the given tarballs
* netdata/installer: update checksums
* netdata/installer: attempt to update readme.md
* netdata/installer: [ci skip] add documentation for static64
* netdata/installer: Offline installation -- expect go.d plugin binaries also for the intall to proceed
1) Introduce two more artifacts on the tarball override parameter (go.d plugin tarball and go.d plugin config tarball)
2) Adjust the installer to expect the offline install, when the path is set use that file instead of downloading anything
* Update packaging/installer/README.md
Co-Authored-By: Joel Hans <joel.g.hans@gmail.com>
* Update packaging/installer/README.md
Co-Authored-By: Joel Hans <joel.g.hans@gmail.com>
* netdata/installer: add offline installer section
* netdata/installer: don't shift there, we shift by one when needed
* netdata/installer: Update md5sum
* netdata/installer: adjust proposed commands to fetch proper binary based on OS and ARCH
* netdata/packaging: first round of feedback
* netdata/packaging: dont remove the files provided by the users
* netdata/packaging: local-tarball-override -> local-files
1) rename parameter name
2) update md5sums in readme
* netdata/packaging: fixes and nits
1) checksumi -> checksum
2) we are using sh, so conditionals are with single equal sign (fixed it)
3) unfortunately add one more option to the --local-files parameter, to define the required packages script.
Might make sense in the end to just pass a directory structure there and inform the user of the files we expect to see there
* netdata/packaging: update md5sum
* netdata/packaging: do not move, copy
* netdata/packaging: heres a few more missed mv->cp fixes
* netdata/packaging: [ci skip] Refine error message on kickstart-static64.sh, to help cases when user confuses kickstart.sh with kickstart-static64.sh
* netdata/packaging: update documentation to properly instruct on offline install how t orun the kickstart itself
* netdata/packaging: fix documentation - missing one more script call
* netdata/packaging: fix kickstart clean up process and others
1) when TMPDIR fails to be created (cd wont work), fail over to /tmp otherwise its going to write on / which is, well, wrong (we had rm based on TMPDIR)
2) make sure we remove the directories too when clean up and always include sudo variable, to handle situations of non-root executions
3) When deleting the dir, be extra sure it's not / or the /tmp itself
* netdata/packaging: sh friendly conditionals
* netdata/packaging: fix md5sum on documentation
* netdata/installer: enter the tmpdir in the failover case too
* netdata/installer: simplify - we dont expect mktemp to fail, if it does then something is wrong so dont make cd a soft error. simplify conditionals also
* netdata/installer: update md5sum
* netdata: fix attempt for labels
* Revert "netdata: fix attempt for labels"
This reverts commit b61525925f.
* netdata: fix attempt for labels (2)
* netdata/packaging/installer: Improvements over netdata installer process around go.d plugin
1) Align retries and timeouts between curl and wget scenarios, should take same time with either tool
2) Add more information when reaching the two error cases, to instruct the user on how to handle the errors
3) Make the download failure a soft error, just warn about skipping install
4) Rename download to download_go, we only run it for go so make this crystal clear
* netdata/packaging/installer: when download has not succeeded, warn the user abort the go.d install and continue
* netdata/packaging: Enforce usage of predefined start/stop commands for netdata. Add some verbosity too for visibility
* netdata/packaging/installer: FreeBSD install - add a note for rc setup, then during first start up use onestart to avoid confusing warnings
* netdata/packaging: Add newer debian supported versions, also a info print nit
* netdata/packaging: Attend first feedback - use separate variable for the command needed by installer
* netdata/packaging: make POSIX compliant equalities. The double equal sign is not working on all shells (dash for example)
* netdata/packaging: fix missed md5sum update in README.md
* netdata/packaging: revert debian selection - got misguided
I obviously didnt test correctly and i misread the release notes, i didnt check the introduction
of systemd during jessie release, i only looked for mentions in stretch.
So revert this change and retest both on droplet and container installations
* netdata/packaging: MacOS - silence a few unimportant errors, make initial detection friendlier
1) Silence failure of commands that are expected to fail on mac
2) add alternatives to uname, to match mac syntax for friendlier output
* netdata/packaging: Update README.md
* netdata/packaging: Adjustments from PR feedback
1) inform about disable-go when bailing out on download failure
2) Make sure you fail the download if the file is empty
3) Make sure you bail out if checksum fails
* netdata/packaging/ci: revert download timeout logic for wget -- seems that there was an exceptional case on wget requiring this differentiation as per cakrits comments -- will revise later, as this is not critical to change
* netdata/packaging/installer: Introduce safe_sha256sum - a more flexible checsum function
Due to #5747 we discovered that our installer wasnt working properly on FreeBSD.
We created within our functions lib a safe_sha256sum that picks between sha256sum and shasum, with priority to the first method
* netdata/packaging/installer: Update checksums in README
* Make curl silent and show errors only if it fails
* Make curl silent and show errors only if it fails
* Make curl silent and show errors only if it fails
* Make curl silent and show errors only if it fails