diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
commit | d079b656b4719739b2247dcd9d46e9bec793095a (patch) | |
tree | d2c950c70a776bcf697c963151c5bd959f8a9f03 /packaging | |
parent | Releasing debian version 1.37.1-2. (diff) | |
download | netdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip |
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
52 files changed, 555 insertions, 496 deletions
diff --git a/packaging/PLATFORM_SUPPORT.md b/packaging/PLATFORM_SUPPORT.md index 106c80892..62e208c73 100644 --- a/packaging/PLATFORM_SUPPORT.md +++ b/packaging/PLATFORM_SUPPORT.md @@ -1,6 +1,12 @@ <!-- title: "Netdata platform support policy" -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/PLATFORM_SUPPORT.md +sidebar_label: "Supported platforms" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/PLATFORM_SUPPORT.md" +learn_status: "Published" +sidebar_position: "30" +learn_topic_type: "Getting started" +learn_rel_path: "Getting started" +learn_docs_purpose: "Present all the supported platform in the Netdata solution" --> # Netdata platform support policy @@ -33,7 +39,8 @@ The following table shows a general outline of the various support tiers and cat | Previously Supported | Users asked to upgrade | None | None | Yes, but only already published versions | Best Effort | - ‘Bug Support’: How we handle of platform-specific bugs. -- ‘Guaranteed Configurations’: Which runtime configurations for the agent we try to guarantee will work with minimal effort from users. +- ‘Guaranteed Configurations’: Which runtime configurations for the agent we try to guarantee will work with minimal + effort from users. - ‘CI Coverage’: What level of coverage we provide for the platform in CI. - ‘Native Packages’: Whether we provide native packages for the system package manager for the platform. - ‘Static Build Support’: How well our static builds are expected to work on the platform. @@ -44,33 +51,32 @@ The following table shows a general outline of the various support tiers and cat Platforms in the core support tier are our top priority. They are covered rigorously in our CI, usually include official binary packages, and any platform-specific bugs receive a high priority. From the perspective -of our developers, platforms in the core support tier _must_ work, with almost no exceptions. Our [static -builds](#static-builds) are expected to work on these platforms if available. Source-based installs are expected +of our developers, platforms in the core support tier _must_ work, with almost no exceptions. +Our [static builds](#static-builds) are expected to work on these platforms if available. Source-based installs are +expected to work on these platforms with minimal user effort. -| Platform | Version | Official Native Packages | Notes | -| -------- | ------- | ------------------------ | ----- | -| Alpine Linux | 3.17 | No | The latest release of Alpine Linux is guaranteed to remain at **Core** tier due to usage for our Docker images | -| Alma Linux | 9.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | -| Alma Linux | 8.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | -| CentOS | 7.x | x86\_64 | | -| Docker | 19.03 or newer | x86\_64, i386, ARMv7, AArch64, POWER8+ | See our [Docker documentation](/packaging/docker/README.md) for more info on using Netdata on Docker | -| Debian | 11.x | x86\_64, i386, ARMv7, AArch64 | | -| Debian | 10.x | x86\_64, i386, ARMv7, AArch64 | | -| Fedora | 37 | x86\_64, AArch64 | | -| Fedora | 36 | x86\_64, ARMv7, AArch64 | | -| Fedora | 35 | x86\_64, ARMv7, AArch64 | | -| openSUSE | Leap 15.4 | x86\_64, AArch64 | | -| openSUSE | Leap 15.3 | x86\_64, AArch64 | | -| Oracle Linux | 9.x | x86\_64, AArch64 | | -| Oracle Linux | 8.x | x86\_64, AArch64 | | -| Red Hat Enterprise Linux | 9.x | x86\_64, AArch64 | | -| Red Hat Enterprise Linux | 8.x | x86\_64, AArch64 | | -| Red Hat Enterprise Linux | 7.x | x86\_64 | | -| Ubuntu | 22.10 | x86\_64, ARMv7, AArch64 | | -| Ubuntu | 22.04 | x86\_64, ARMv7, AArch64 | | -| Ubuntu | 20.04 | x86\_64, ARMv7, AArch64 | | -| Ubuntu | 18.04 | x86\_64, i386, ARMv7, AArch64 | | +| Platform | Version | Official Native Packages | Notes | +|--------------------------|----------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Alpine Linux | 3.17 | No | The latest release of Alpine Linux is guaranteed to remain at **Core** tier due to usage for our Docker images | +| Alma Linux | 9.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | +| Alma Linux | 8.x | x86\_64, AArch64 | Also includes support for Rocky Linux and other ABI compatible RHEL derivatives | +| CentOS | 7.x | x86\_64 | | +| Docker | 19.03 or newer | x86\_64, i386, ARMv7, AArch64, POWER8+ | See our [Docker documentation](https://github.com/netdata/netdata/blob/master/packaging/docker/README.md) for more info on using Netdata on Docker | +| Debian | 11.x | x86\_64, i386, ARMv7, AArch64 | | +| Debian | 10.x | x86\_64, i386, ARMv7, AArch64 | | +| Fedora | 37 | x86\_64, AArch64 | | +| Fedora | 36 | x86\_64, AArch64 | | +| openSUSE | Leap 15.4 | x86\_64, AArch64 | | +| Oracle Linux | 9.x | x86\_64, AArch64 | | +| Oracle Linux | 8.x | x86\_64, AArch64 | | +| Red Hat Enterprise Linux | 9.x | x86\_64, AArch64 | | +| Red Hat Enterprise Linux | 8.x | x86\_64, AArch64 | | +| Red Hat Enterprise Linux | 7.x | x86\_64 | | +| Ubuntu | 22.10 | x86\_64, ARMv7, AArch64 | | +| Ubuntu | 22.04 | x86\_64, ARMv7, AArch64 | | +| Ubuntu | 20.04 | x86\_64, ARMv7, AArch64 | | +| Ubuntu | 18.04 | x86\_64, i386, ARMv7, AArch64 | | ### Intermediate @@ -81,13 +87,13 @@ platforms that we officially support ourselves to the intermediate tier. Our [st expected to work on these platforms if available. Source-based installs are expected to work on these platforms with minimal user effort. -| Platform | Version | Official Native Packages | Notes | -| -------- | ------- | ------------------------ | ----- | -| Alpine Linux | 3.16 | No | | -| Alpine Linux | 3.15 | No | | -| Alpine Linux | 3.14 | No | | -| Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux | -| Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux | +| Platform | Version | Official Native Packages | Notes | +|---------------|---------|--------------------------|-------------------------------------------------------------------------| +| Alpine Linux | 3.16 | No | | +| Alpine Linux | 3.15 | No | | +| Alpine Linux | 3.14 | No | | +| Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux | +| Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux | ### Community @@ -97,19 +103,19 @@ to add support for a new platform, that platform generally will start in this ti are expected to work on these platforms if available. Source-based installs are usually expected to work on these platforms, but may require some extra effort from users. -| Platform | Version | Official Native Packages | Notes | -| -------- | ------- | ------------------------ | ----- | -| Alpine Linux | Edge | No | | -| Clear Linux | Latest | No | | -| Debian | Sid | No | | -| Fedora | Rawhide | No | | -| FreeBSD | 13-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | -| FreeBSD | 12-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | -| Gentoo | Latest | No | | -| macOS | 12 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies | -| macOS | 11 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies. | -| macOS | 10.15 | No | Requires Homebrew for dependencies. | -| openSUSE | Tumbleweed | No | | +| Platform | Version | Official Native Packages | Notes | +|--------------|------------|--------------------------|-----------------------------------------------------------------------------------------------------------| +| Alpine Linux | Edge | No | | +| Clear Linux | Latest | No | | +| Debian | Sid | No | | +| Fedora | Rawhide | No | | +| FreeBSD | 13-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | +| FreeBSD | 12-STABLE | No | Netdata is included in the FreeBSD Ports Tree, and this is the recommended installation method on FreeBSD | +| Gentoo | Latest | No | | +| macOS | 12 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies | +| macOS | 11 | No | Currently only works for Intel-based hardware. Requires Homebrew for dependencies. | +| macOS | 10.15 | No | Requires Homebrew for dependencies. | +| openSUSE | Tumbleweed | No | | ## Third-party supported platforms @@ -138,23 +144,22 @@ Platforms that meet these criteria will be immediately transitioned to the **Pre with no prior warning from Netdata and no deprecation notice, unlike those being dropped for technical reasons, as our end of support should already coincide with the end of the normal support lifecycle for that platform. -On occasion, we may also drop support for a platform due to technical limitations. In such cases, this will be +On occasion, we may also drop support for a platform due to technical limitations. In such cases, this will be announced in the release notes of the next stable release with a deprecation notice. The platform will be supported for _that release_, and will be removed from nightlies some time before the next release after that one. This is a list of platforms that we have supported in the recent past but no longer officially support: -| Platform | Version | Notes | -| -------- | ------- | ----- | -| Alpine Linux | 3.13 | EOL as of 2022-11-01 | -| Alpine Linux | 3.12 | EOL as of 2022-05-01 | -| Debian | 9.x | EOL as of 2022-06-30 | -| Fedora | 34 | EOL as of 2022-06-07 | -| Fedora | 33 | EOL as of 2021-11-30 | -| FreeBSD | 11-STABLE | EOL as of 2021-10-30 | -| openSUSE | Leap 15.2 | EOL as of 2021-12-01 | -| Ubuntu | 21.10 | EOL as of 2022-07-31 | -| Ubuntu | 21.04 | EOL as of 2022-01-01 | +| Platform | Version | Notes | +|--------------|-----------|----------------------| +| Alpine Linux | 3.13 | EOL as of 2022-11-01 | +| Alpine Linux | 3.12 | EOL as of 2022-05-01 | +| Debian | 9.x | EOL as of 2022-06-30 | +| Fedora | 35 | EOL as of 2022-12-13 | +| Fedora | 34 | EOL as of 2022-06-07 | +| openSUSE | Leap 15.3 | EOL as of 2022-12-01 | +| Ubuntu | 21.10 | EOL as of 2022-07-31 | +| Ubuntu | 21.04 | EOL as of 2022-01-01 | ## Static builds diff --git a/packaging/building-native-packages-locally.md b/packaging/building-native-packages-locally.md index d4949cf52..84a0fb4db 100644 --- a/packaging/building-native-packages-locally.md +++ b/packaging/building-native-packages-locally.md @@ -2,7 +2,6 @@ title: How to build native (DEB/RPM) packages locally for testing description: Instructions for developers who need to build native packages locally for testing. custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/building-native-packages-locally.md -keywords: [Netdata native package, Netdata RPM, Netdata DEB, Testing native packages Netdata] --> # How to build native (DEB/RPM) packages locally for testing diff --git a/packaging/current_libbpf.checksums b/packaging/current_libbpf.checksums index 9a8b8f8cf..e0b91c0c6 100644 --- a/packaging/current_libbpf.checksums +++ b/packaging/current_libbpf.checksums @@ -1 +1 @@ -63fe4ac3f6807e8ff4cd3af2ffae0091eb177fb7f6aca2f03d3f201a609b988c v1.0.1_netdata.tar.gz +f2a8214c967153fcbb7a8f2af59c23a38f6e175384878dd37648649c5d8182c4 v1.1_netdata.tar.gz diff --git a/packaging/current_libbpf.version b/packaging/current_libbpf.version index bb58ffc40..b0797d5a8 100644 --- a/packaging/current_libbpf.version +++ b/packaging/current_libbpf.version @@ -1 +1 @@ -1.0.1_netdata +1.1_netdata diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index 287c592bb..ce5a0b932 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -76,16 +76,13 @@ RUN mkdir -p /opt/src /var/log/netdata && \ ln -sf /dev/stdout /var/log/netdata/access.log && \ ln -sf /dev/stdout /var/log/netdata/debug.log && \ ln -sf /dev/stderr /var/log/netdata/error.log && \ - # fping from alpine apk is on a different location. Moving it. - ln -snf /usr/sbin/fping /usr/local/bin/fping && \ - chmod 4755 /usr/local/bin/fping && \ + ln -sf /dev/stdout /var/log/netdata/collector.log && \ # Add netdata user addgroup -g ${NETDATA_GID} -S "${DOCKER_GRP}" && \ adduser -S -H -s /usr/sbin/nologin -u ${NETDATA_GID} -h /etc/netdata -G "${DOCKER_GRP}" "${DOCKER_USR}" # Fix handling of config directory # Long-term this should leverage BuildKit’s mount option. -COPY --from=builder /wheels /wheels COPY --from=builder /app / # Apply the permissions as described in @@ -112,8 +109,6 @@ RUN chown -R root:root \ # Group write permissions due to: https://github.com/netdata/netdata/pull/6543 find /var/lib/netdata /var/cache/netdata -type d -exec chmod 0770 {} \; && \ find /var/lib/netdata /var/cache/netdata -type f -exec chmod 0660 {} \; && \ - pip --no-cache-dir install /wheels/* && \ - rm -rf /wheels && \ cp -va /etc/netdata /etc/netdata.stock ENV NETDATA_LISTENER_PORT 19999 @@ -124,3 +119,11 @@ ENTRYPOINT ["/usr/sbin/run.sh"] HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false + +LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>" +LABEL org.opencontainers.image.url="https://netdata.cloud" +LABEL org.opencontainers.image.documentation="https://learn.netdata.cloud" +LABEL org.opencontainers.image.source="https://github.com/netdata/netdata" +LABEL org.opencontainers.image.title="Netdata Agent" +LABEL org.opencontainers.image.description="Official Netdata Agent Docker Image" +LABEL org.opencontainers.image.vendor="Netdata Inc." diff --git a/packaging/docker/README.md b/packaging/docker/README.md index d00262a1b..aec5723e3 100644 --- a/packaging/docker/README.md +++ b/packaging/docker/README.md @@ -1,7 +1,11 @@ <!-- title: "Install Netdata with Docker" -date: 2020-04-23 -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/docker/README.md +date: "2020-04-23" +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/docker/README.md" +sidebar_label: "Install Netdata with Docker" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Install the Netdata Agent with Docker @@ -12,7 +16,7 @@ you get set up quickly, and doesn't install anything permanent on the system, wh See our full list of Docker images at [Docker Hub](https://hub.docker.com/r/netdata/netdata). Starting with v1.30, Netdata collects anonymous usage information by default and sends it to a self-hosted PostHog instance within the Netdata infrastructure. Read -about the information collected, and learn how to-opt, on our [anonymous statistics](/docs/anonymous-statistics.md) +about the information collected, and learn how to-opt, on our [anonymous statistics](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md) page. The usage statistics are _vital_ for us, as we use them to discover bugs and prioritize new features. We thank you for @@ -37,6 +41,21 @@ and unfortunately not something we can realistically work around. ## Create a new Netdata Agent container +> **Notice**: all `docker run` commands and `docker-compose` configurations explicitly set the `nofile` limit. This is +> required on some distros until [14177](https://github.com/netdata/netdata/issues/14177) is resolved. Failure to do so +> may cause a task running in a container to hang and consume 100% of the CPU core. + +<details> +<summary>What are these "some distros"?</summary> + +If `LimitNOFILE=infinity` results in an open file limit of 1073741816: + +```bash +[fedora37 ~]$ docker run --rm busybox grep open /proc/self/limits +Max open files 1073741816 1073741816 files +``` +</details> + You can create a new Agent container using either `docker run` or Docker Compose. After using either method, you can visit the Agent dashboard `http://NODE:19999`. @@ -61,6 +80,7 @@ docker run -d --name=netdata \ --restart unless-stopped \ --cap-add SYS_PTRACE \ --security-opt apparmor=unconfined \ + --ulimit nofile=4096 \ netdata/netdata ``` @@ -81,6 +101,9 @@ services: - SYS_PTRACE security_opt: - apparmor:unconfined + ulimits: + nofile: + soft: 4096 volumes: - netdataconfig:/etc/netdata - netdatalib:/var/lib/netdata @@ -153,7 +176,7 @@ to restart the container: `docker restart netdata`. ### Host-editable configuration -> **Warning**: [edit-config](/docs/configure/nodes.md#the-netdata-config-directory) script doesn't work when executed on +> **Warning**: [edit-config](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory) script doesn't work when executed on > the host system. If you want to make your container's configuration directory accessible from the host system, you need to use a @@ -169,12 +192,12 @@ docker rm -f netdata_tmp ``` **`docker run`**: Use the `docker run` command, along with the following options, to start a new container. Note the -changed `-v $(pwd)/netdataconfig/netdata:/etc/netdata:ro \` line from the recommended example above. +changed `-v $(pwd)/netdataconfig/netdata:/etc/netdata \` line from the recommended example above. ```bash docker run -d --name=netdata \ -p 19999:19999 \ - -v $(pwd)/netdataconfig/netdata:/etc/netdata:ro \ + -v $(pwd)/netdataconfig/netdata:/etc/netdata \ -v netdatalib:/var/lib/netdata \ -v netdatacache:/var/cache/netdata \ -v /etc/passwd:/host/etc/passwd:ro \ @@ -185,6 +208,7 @@ docker run -d --name=netdata \ --restart unless-stopped \ --cap-add SYS_PTRACE \ --security-opt apparmor=unconfined \ + --ulimit nofile=4096 \ netdata/netdata ``` @@ -206,6 +230,9 @@ services: - SYS_PTRACE security_opt: - apparmor:unconfined + ulimits: + nofile: + soft: 4096 volumes: - ./netdataconfig/netdata:/etc/netdata:ro - netdatalib:/var/lib/netdata @@ -295,7 +322,7 @@ your machine from within the container. Please read the following carefully. #### Docker socket proxy (safest option) Deploy a Docker socket proxy that accepts and filters out requests using something like -[HAProxy](/docs/Running-behind-haproxy.md) so that it restricts connections to read-only access to the CONTAINERS +[HAProxy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-haproxy.md) so that it restricts connections to read-only access to the CONTAINERS endpoint. The reason it's safer to expose the socket to the proxy is because Netdata has a TCP port exposed outside the Docker @@ -414,13 +441,13 @@ services: ### Pass command line options to Netdata Since we use an [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) directive, you can provide -[Netdata daemon command line options](/daemon/README.md#command-line-options) such as the IP address Netdata will be +[Netdata daemon command line options](https://github.com/netdata/netdata/blob/master/daemon/README.md#command-line-options) such as the IP address Netdata will be running on, using the [command instruction](https://docs.docker.com/engine/reference/builder/#cmd). ## Install the Agent using Docker Compose with SSL/TLS enabled HTTP Proxy For a permanent installation on a public server, you should [secure the Netdata -instance](/docs/netdata-security.md). This section contains an example of how to install Netdata with an SSL +instance](https://github.com/netdata/netdata/blob/master/docs/netdata-security.md). This section contains an example of how to install Netdata with an SSL reverse proxy and basic authentication. You can use the following `docker-compose.yml` and Caddyfile files to run Netdata with Docker. Replace the domains and @@ -468,6 +495,9 @@ services: - SYS_PTRACE security_opt: - apparmor:unconfined + ulimits: + nofile: + soft: 4096 volumes: - netdatalib:/var/lib/netdata - netdatacache:/var/cache/netdata @@ -490,47 +520,4 @@ Caddyfile. ## Publish a test image to your own repository At Netdata, we provide multiple ways of testing your Docker images using your own repositories. -You may either use the command line tools available or take advantage of our Travis CI infrastructure. - -### Inside Netdata organization, using Travis CI - -To enable Travis CI integration on your own repositories (Docker and GitHub), you need to be part of the Netdata -organization. - -Once you have contacted the Netdata owners to setup you up on GitHub and Travis, execute the following steps - -- Preparation - - Have Netdata forked on your personal GitHub account - - Get a GitHub token: Go to **GitHub settings** -> **Developer Settings** -> **Personal access tokens**, and - generate a new token with full access to `repo_hook`, read-only access to `admin:org`, `public_repo`, - `repo_deployment`, `repo:status`, and `user:email` settings enabled. This will be your `GITHUB_TOKEN` that is - described later in the instructions, so keep it somewhere safe. - - Contact the Netdata team and seek for permissions on `https://scan.coverity.com` should you require Travis to be - able to push your forked code to coverity for analysis and report. Once you are setup, you should have your - email you used in coverity and a token from them. These will be your `COVERITY_SCAN_SUBMIT_EMAIL` and - `COVERITY_SCAN_TOKEN` that we will refer to later. - - Have a valid Docker hub account, the credentials from this account will be your `DOCKER_USERNAME` and - `DOCKER_PWD` mentioned later. - -- Setting up Travis CI for your own fork (Detailed instructions provided by Travis team [here](https://docs.travis-ci.com/user/tutorial/)) - - Login to travis with your own GITHUB credentials (There is Open Auth access) - - Go to your profile settings, under [repositories](https://travis-ci.com/account/repositories) section and setup - your Netdata fork to be built by Travis CI. - - Once the repository has been setup, go to repository settings within Travis CI (usually under - `https://travis-ci.com/NETDATA_DEVELOPER/netdata/settings`, where `NETDATA_DEVELOPER` is your GitHub handle), - and select your desired settings. - -- While in Travis settings, under Netdata repository settings in the Environment Variables section, you need to add - the following: - - `DOCKER_USERNAME` and `DOCKER_PWD` variables so that Travis can log in to your Docker Hub account and publish - Docker images there. - - `REPOSITORY` variable to `NETDATA_DEVELOPER/netdata`, where `NETDATA_DEVELOPER` is your GitHub handle again. - - `GITHUB_TOKEN` variable with the token generated on the preparation step, for Travis workflows to function - properly. - - `COVERITY_SCAN_SUBMIT_EMAIL` and `COVERITY_SCAN_TOKEN` variables to enable Travis to submit your code for - analysis to Coverity. - -Having followed these instructions, your forked repository should be all set up for integration with Travis CI. Happy -testing! - - +You may either use the command line tools available or take advantage of our GitHub Acions infrastructure. diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index 1e001256c..9029e22b6 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -49,6 +49,14 @@ if mountpoint -q /etc/netdata && [ -z "$(ls -A /etc/netdata)" ]; then cp -a /etc/netdata.stock/. /etc/netdata fi +if [ -w "/etc/netdata" ]; then + if mountpoint -q /etc/netdata; then + hostname >/etc/netdata/.container-hostname + else + rm -f /etc/netdata/.container-hostname + fi +fi + if [ -n "${NETDATA_CLAIM_URL}" ] && [ -n "${NETDATA_CLAIM_TOKEN}" ] && [ ! -f /var/lib/netdata/cloud.d/claimed_id ]; then # shellcheck disable=SC2086 /usr/sbin/netdata-claim.sh -token="${NETDATA_CLAIM_TOKEN}" \ diff --git a/packaging/ebpf-co-re.checksums b/packaging/ebpf-co-re.checksums index da7cb0510..7f08d7327 100644 --- a/packaging/ebpf-co-re.checksums +++ b/packaging/ebpf-co-re.checksums @@ -1 +1 @@ -9fe4fccc160ca9e0fd0ffd8894dbf6e5fddcf9ca3a4ee04cb645bb7703e8cef2 netdata-ebpf-co-re-glibc-v1.0.1.tar.xz +d1864cd736d236aa3738152d86096529830822a26405a62fe164779949bb3658 netdata-ebpf-co-re-glibc-v1.1.0.tar.xz diff --git a/packaging/ebpf-co-re.version b/packaging/ebpf-co-re.version index b18d46540..795460fce 100644 --- a/packaging/ebpf-co-re.version +++ b/packaging/ebpf-co-re.version @@ -1 +1 @@ -v1.0.1 +v1.1.0 diff --git a/packaging/ebpf.checksums b/packaging/ebpf.checksums index e5afcb860..e74349115 100644 --- a/packaging/ebpf.checksums +++ b/packaging/ebpf.checksums @@ -1,3 +1,3 @@ -e3836908a5cfd5a1b6c71463645ed7040be1a4890767844b744fe1054910b51f ./netdata-kernel-collector-glibc-v1.0.1.tar.xz -091382fece7a470e505df4c655d834a8a49e50aa2a2fec4a52a324ab0ccd9870 ./netdata-kernel-collector-musl-v1.0.1.tar.xz -11497ccb4f2cdac0d80b00bf97d2f1633c972e8720abdda2a63bd0de95859840 ./netdata-kernel-collector-static-v1.0.1.tar.xz +7f28bb61b1e9fdac59e5f8f041502c54f319048c1cf4adaa96ace3360f55a80e ./netdata-kernel-collector-glibc-v1.1.0.tar.xz +5d927deadac9a4a5bc8a5be386aec2ea4f9b8335e60eadf375b11e7656404270 ./netdata-kernel-collector-musl-v1.1.0.tar.xz +0d8825b77b8ba20e10b6e24f15c1d65a43f1c47dced93798839adc789f1427d3 ./netdata-kernel-collector-static-v1.1.0.tar.xz diff --git a/packaging/ebpf.version b/packaging/ebpf.version index b18d46540..795460fce 100644 --- a/packaging/ebpf.version +++ b/packaging/ebpf.version @@ -1 +1 @@ -v1.0.1 +v1.1.0 diff --git a/packaging/go.d.checksums b/packaging/go.d.checksums index 806a45f40..3e70b04f1 100644 --- a/packaging/go.d.checksums +++ b/packaging/go.d.checksums @@ -1,17 +1,17 @@ -67335df67f1629d9dc6dc559f91d26499f023b43a3fb2cece22d7c2919653dae *config.tar.gz -cae0acc8c19112c35927ccd4ef53f594c8d805467f204db84305ca8ddfccfcfa *go.d.plugin-v0.45.0.darwin-amd64.tar.gz -dcaddcea32a26392db7f13867226c62ba87aeb00c93931d1fc10d0641eb04e3a *go.d.plugin-v0.45.0.darwin-arm64.tar.gz -e89153033d2b8d6b59f163f1419ebaaae8414054f1a33bca52f76651848b528d *go.d.plugin-v0.45.0.freebsd-386.tar.gz -da3ba485995a60879cb51819ac2f9ecf81d23f64a0afb584bdc134a1fe4a2251 *go.d.plugin-v0.45.0.freebsd-amd64.tar.gz -ca1e153ac90714c0956a7ed4bcf14bf263f2c65a1876e9c8c24dd1b2bcd5b74a *go.d.plugin-v0.45.0.freebsd-arm.tar.gz -e25fcd7c3fa8aed01efff8ea25c3276de65d2efacff70fa4670a970272ffbba3 *go.d.plugin-v0.45.0.freebsd-arm64.tar.gz -7bfd345bdc30292a9145e4397b15a9004d78049006702727cd5a52900531dfa1 *go.d.plugin-v0.45.0.linux-386.tar.gz -7a6dd92ab6892aedd0a257ffbded54a0efa7cf95fb7f738387c8d7394e57eb09 *go.d.plugin-v0.45.0.linux-amd64.tar.gz -834a26c486a579991d76dc07625e135bf13fe4387627076bdbbb14bcb55ff978 *go.d.plugin-v0.45.0.linux-arm.tar.gz -1dda73a062ba20d2996334d878fd74207ad49b9f164530a5ad2144c70947d5a8 *go.d.plugin-v0.45.0.linux-arm64.tar.gz -8b52e67cf1e4d11776d5c5c8a4e246412caa1cffd36bafa5a8cb38a8e1867dee *go.d.plugin-v0.45.0.linux-mips.tar.gz -9a95f9df3527693a0a92c7b8ef1bec537e84014c75f32604adce4540e924576e *go.d.plugin-v0.45.0.linux-mips64.tar.gz -4ce0ec6068edf8218f68785f6ce258ed76ffea50a5953f7f75b9a48e1d912a81 *go.d.plugin-v0.45.0.linux-mips64le.tar.gz -360812ea936768926b38031c9dff2ecda2c80733e875f1c317371dee9d56a76c *go.d.plugin-v0.45.0.linux-mipsle.tar.gz -d7b594d84d47a0d2c6265c8fa9317285a53821f3e9aac5d31bcce0c8706fb369 *go.d.plugin-v0.45.0.linux-ppc64.tar.gz -dc29665076eecfb05d63ac243f97bd4d09f8dedae8c5285b349bd227e34ce249 *go.d.plugin-v0.45.0.linux-ppc64le.tar.gz +dee3c1e54cad22796489abd1924462cfcbd2cf8ff7329f9a595966291e18714d *config.tar.gz +4188350b0c7f0f3dcfabf01e0281b41baa085327655a32215a0863ec651c0186 *go.d.plugin-v0.50.0.darwin-amd64.tar.gz +6068657f08c21eeb57508c47dab544f7493ac14f63261c8bdfeb2b326f5e980c *go.d.plugin-v0.50.0.darwin-arm64.tar.gz +cdee540016daa37b84ac8c66feb141f83d328371e7bd464e99de99584d0813ca *go.d.plugin-v0.50.0.freebsd-386.tar.gz +4196b233aff75747749df9894d15f078a40945709b0b2d6d9c6387d992cf4933 *go.d.plugin-v0.50.0.freebsd-amd64.tar.gz +188c29003f1394a7136b1f69a659fff46b3ea9cbfd994fd9e315834745eac63a *go.d.plugin-v0.50.0.freebsd-arm.tar.gz +80ce0196693d735d578c19a3561ea5bda0b54101c22d129c999807942d076f2a *go.d.plugin-v0.50.0.freebsd-arm64.tar.gz +a75ba3cdebd1b428dacd4a14759c7e22d50432b49a9c8d5c846f8aa4e23aa9e2 *go.d.plugin-v0.50.0.linux-386.tar.gz +7eb762de4103a8930a7962b6b1202ce188340ae1cd6ea04757e40e7482bfaed0 *go.d.plugin-v0.50.0.linux-amd64.tar.gz +cfa3b1a28664fbd76a338f574c2e37d41b58552ace98f86cbe4dc3ac48785371 *go.d.plugin-v0.50.0.linux-arm.tar.gz +2b77f8a3d33290a7cb9fa95f8635cb1cd3ce4331a7543312cfdac3902a2489e0 *go.d.plugin-v0.50.0.linux-arm64.tar.gz +56205b61eb4c1a6798a0d6852b3c734e7c764861ae6baa490e2db55ba593c52a *go.d.plugin-v0.50.0.linux-mips.tar.gz +384af1658f02f9b295a2c2aa021dd64c46c03c52b9a573dbbd7f9fe0ffd841e0 *go.d.plugin-v0.50.0.linux-mips64.tar.gz +d93711f93e9da7f2b8f9162c0af80b3443687b1e01494c42b9ccd099534f2fae *go.d.plugin-v0.50.0.linux-mips64le.tar.gz +9462186774633294b46f04fbd78dc930bdff54bb1e8d5fa634f1d9b99d8d4e4b *go.d.plugin-v0.50.0.linux-mipsle.tar.gz +bdcfdc75dc5073556fdece5865cd9b19fc5306d68fe653afc3e97594f185386e *go.d.plugin-v0.50.0.linux-ppc64.tar.gz +e13c9c1ad13e664b477762b7be9b17877945e1337ee1832b11dd7be2c6cfb1c9 *go.d.plugin-v0.50.0.linux-ppc64le.tar.gz diff --git a/packaging/go.d.version b/packaging/go.d.version index 67d3cf473..f6460f6bb 100644 --- a/packaging/go.d.version +++ b/packaging/go.d.version @@ -1 +1 @@ -v0.45.0 +v0.50.0 diff --git a/packaging/installer/README.md b/packaging/installer/README.md index 3a4237d52..90d3b8de2 100644 --- a/packaging/installer/README.md +++ b/packaging/installer/README.md @@ -24,7 +24,7 @@ packages. We recommend you install Netdata using one of the methods listed below checksum-verified packages. Netdata collects anonymous usage information by default and sends it to our self hosted [PostHog](https://github.com/PostHog/posthog) installation. PostHog is an open source product analytics platform, you can read -about the information collected, and learn how to-opt, on our [anonymous statistics](/docs/anonymous-statistics.md) +about the information collected, and learn how to-opt, on our [anonymous statistics](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md) page. The usage statistics are _vital_ for us, as we use them to discover bugs and prioritize new features. We thank you for @@ -32,7 +32,7 @@ _actively_ contributing to Netdata's future. ## Automatic one-line installation script -![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=installations&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=installations&precision=0) +![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=installations&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=installations&precision=0) This method is fully automatic on all Linux distributions, including Ubuntu, Debian, Fedora, CentOS, and others, as well as on mac OS environments. @@ -49,17 +49,17 @@ This script will preferentially use native DEB/RPM packages if we provide them f To see more information about this installation script, including how to disable automatic updates, get nightly vs. stable releases, or disable anonymous statistics, see the [`kickstart.sh` method -page](/packaging/installer/methods/kickstart.md). +page](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md). Scroll down for details about [automatic updates](#automatic-updates) or [nightly vs. stable releases](#nightly-vs-stable-releases). ### Post-installation -When you're finished with installation, check out our [single-node](/docs/quickstart/single-node.md) or -[infrastructure](/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. +When you're finished with installation, check out our [single-node](https://github.com/netdata/netdata/blob/master/docs/quickstart/single-node.md) or +[infrastructure](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. -Or, skip straight to [configuring the Netdata Agent](/docs/configure/nodes.md). +Or, skip straight to [configuring the Netdata Agent](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). Read through Netdata's [documentation](https://learn.netdata.cloud/docs), which is structured based on actions and solutions, to enable features like health monitoring, alarm notifications, long-term metrics storage, exporting to @@ -68,7 +68,7 @@ external databases, and more. ## Have a different operating system, or want to try another method? Netdata works on many different platforms. To see all supported platforms, check out our [platform support -policy](/packaging/PLATFORM_SUPPORT.md). +policy](https://github.com/netdata/netdata/blob/master/packaging/PLATFORM_SUPPORT.md). Below, you can find a few additional installation methods, followed by separate instructions for a variety of unique operating systems. @@ -81,6 +81,10 @@ operating systems. os="General Linux with one-line installer (recommended)" svg="linux" /> <InstallBox + to="/docs/agent/packaging/installer/methods/packages" + os="Native DEB/RPM packages for Linux" + svg="linux" /> + <InstallBox to="/docs/agent/packaging/docker" os="Run with Docker" svg="docker" /> @@ -119,7 +123,7 @@ wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/ ``` With automatic updates disabled, you can choose exactly when and how you [update -Netdata](/packaging/installer/UPDATE.md). +Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/UPDATE.md). ### Network usage of Netdata’s automatic updater @@ -178,8 +182,8 @@ man-in-the-middle attacks. ### CentOS 6 and CentOS 8 To install the Agent on certain CentOS and RHEL systems, you must enable non-default repositories, such as EPEL or -PowerTools, to gather hard dependencies. See the [CentOS 6](/packaging/installer/methods/manual.md#centos--rhel-6x) and -[CentOS 8](/packaging/installer/methods/manual.md#centos--rhel-8x) sections for more information. +PowerTools, to gather hard dependencies. See the [CentOS 6](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#centos--rhel-6x) and +[CentOS 8](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#centos--rhel-8x) sections for more information. ### Access to file is not permitted @@ -213,6 +217,6 @@ both. Our current build process has some issues when using certain configurations of the `clang` C compiler on Linux. See [the section on `nonrepresentable section on output` -errors](/packaging/installer/methods/manual.md#nonrepresentable-section-on-output-errors) for a workaround. +errors](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#nonrepresentable-section-on-output-errors) for a workaround. diff --git a/packaging/installer/REINSTALL.md b/packaging/installer/REINSTALL.md index 1356c70dc..c24fdee8c 100644 --- a/packaging/installer/REINSTALL.md +++ b/packaging/installer/REINSTALL.md @@ -1,7 +1,11 @@ <!-- title: "Reinstall the Netdata Agent" description: "Troubleshooting installation issues or force an update of the Netdata Agent by reinstalling it using the same method you used during installation." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/REINSTALL.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/REINSTALL.md" +sidebar_label: "Reinstall the Netdata Agent" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Reinstall the Netdata Agent @@ -14,11 +18,11 @@ Netdata Agent on your node. ### Reinstalling with the same install type Run the one-line installer script with the `--reinstall` parameter to reinstall the Netdata Agent. This will preserve -any [user configuration](/docs/configure/nodes.md) in `netdata.conf` or other files, and will keep the same install +any [user configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) in `netdata.conf` or other files, and will keep the same install type that was used for the original install. If you used any [optional -parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial +parameters](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of optional parameters. @@ -35,7 +39,7 @@ getting a badly broken installation working again. Unlike the regular `--reinsta different install type than the original install used. If you used any [optional -parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial +parameters](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of optional parameters. @@ -65,8 +69,8 @@ When copying these directories back after the reinstall, you may need to update ## Troubleshooting If you still experience problems with your Netdata Agent installation after following one of these processes, the next -best route is to [uninstall](/packaging/installer/UNINSTALL.md) and then try a fresh installation using the [one-line -installer](/packaging/installer/methods/kickstart.md). +best route is to [uninstall](https://github.com/netdata/netdata/blob/master/packaging/installer/UNINSTALL.md) and then try a fresh installation using the [one-line +installer](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md). You can also post to our [community forums](https://community.netdata.cloud/c/support/13) or create a new [bug report](https://github.com/netdata/netdata/issues/new?assignees=&labels=bug%2Cneeds+triage&template=BUG_REPORT.yml). diff --git a/packaging/installer/UNINSTALL.md b/packaging/installer/UNINSTALL.md index af2314f65..2ff22f5c6 100644 --- a/packaging/installer/UNINSTALL.md +++ b/packaging/installer/UNINSTALL.md @@ -1,14 +1,18 @@ <!-- title: "Uninstall Netdata" description: "If you are no longer interested in using the Netdata Agent, use the self-contained uninstaller to remove all traces of binaries and configuration files." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/UNINSTALL.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/UNINSTALL.md" +sidebar_label: "Uninstall Netdata" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Uninstall Netdata > ⚠️ If you're having trouble updating Netdata, moving from one installation method to another, or generally having > issues with your Netdata Agent installation, consider our [**reinstall Netdata** -> doc](/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely. +> doc](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely. The recommended method to uninstall Netdata on a system is to use our kickstart installer script with the `--uninstall` option like so: @@ -51,7 +55,7 @@ A workflow for uninstallation looks like this: 2. If you cannot find that file and would like to uninstall Netdata, then create a new file with the following content: ```sh -NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install` flag. Otherwise it should be empty +NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install-prefix` flag. Otherwise it should be empty NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running the Netdata process ``` diff --git a/packaging/installer/UPDATE.md b/packaging/installer/UPDATE.md index 009e970f2..9d4289f85 100644 --- a/packaging/installer/UPDATE.md +++ b/packaging/installer/UPDATE.md @@ -1,7 +1,11 @@ <!-- title: "Update the Netdata Agent" description: "If you opted out of automatic updates, you need to update your Netdata Agent to the latest nightly or stable version." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/UPDATE.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/UPDATE.md" +sidebar_label: "Update the Netdata Agent" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Update the Netdata Agent @@ -11,7 +15,7 @@ you installed. If you opted out of automatic updates, you need to update your Ne or stable version. You can also [enable or disable automatic updates on an existing install](#control-automatic-updates). > 💡 Looking to reinstall the Netdata Agent to enable a feature, update an Agent that cannot update automatically, or -> troubleshoot an error during the installation process? See our [reinstallation doc](/packaging/installer/REINSTALL.md) +> troubleshoot an error during the installation process? See our [reinstallation doc](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md) > for reinstallation steps. Before you update the Netdata Agent, check to see if your Netdata Agent is already up-to-date by clicking on the update @@ -45,14 +49,14 @@ command: wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --dry-run ``` -Note that if you installed Netdata using an installation prefix, you will need to add an `--install` option +Note that if you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying that prefix to make sure it finds the existing install. If you see a line starting with `--- Would attempt to update existing installation by running the updater script located at:`, then our [regular update method](#updates-for-most-systems) will work for you. Otherwise, it should either indicate that the installation type is not supported (which probably means you either -have a `custom` instal or built Netdata manually) or indicate that it would create a new install (which means that +have a `custom` install or built Netdata manually) or indicate that it would create a new install (which means that you either used a non-standard install path, or that you don’t actually have Netdata installed). ## Updates for most systems @@ -61,7 +65,7 @@ In most cases, you can update netdata using our one-line installation script. T run the update script that was installed as part of the initial install (even if you disabled automatic updates) and preserve the existing install options you specified. -If you installed Netdata using an installation prefix, you will need to add an `--install` option specifying +If you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying that prefix to this command to make sure it finds Netdata. ```bash @@ -80,8 +84,8 @@ On such installs, you can update Netdata using your distribution package manager ### If the kickstart script does not work If the above command fails, you can [reinstall -Netdata](/packaging/installer/REINSTALL.md#one-line-installer-script-kickstartsh) to get the latest version. This -also preserves your [configuration](/docs/configure/nodes.md) in `netdata.conf` or other files just like updating +Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md#one-line-installer-script-kickstartsh) to get the latest version. This +also preserves your [configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) in `netdata.conf` or other files just like updating normally would, though you will need to specify any installation options you used originally again. ## Docker @@ -105,7 +109,7 @@ docker rm netdata ``` You can now re-create your Netdata container using the `docker` command or a `docker-compose.yml` file. See our [Docker -installation instructions](/packaging/docker/README.md#create-a-new-netdata-agent-container) for details. +installation instructions](https://github.com/netdata/netdata/blob/master/packaging/docker/README.md#create-a-new-netdata-agent-container) for details. ## macOS @@ -124,7 +128,7 @@ instructions](#updates-for-most-systems) to update Netdata. ## Manual installation from Git -If you installed [Netdata manually from Git](/packaging/installer/methods/manual.md), you can run that installer again +If you installed [Netdata manually from Git](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md), you can run that installer again to update your agent. First, run our automatic requirements installer, which works on many Linux distributions, to ensure your system has the dependencies necessary for new features. diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh index e354ac651..ebb4aab75 100644 --- a/packaging/installer/functions.sh +++ b/packaging/installer/functions.sh @@ -396,6 +396,14 @@ get_os_key() { fi } +get_group(){ + if command -v getent > /dev/null 2>&1; then + getent group "${1:-""}" + else + cat /etc/group | grep "^${1}:" + fi +} + issystemd() { pids='' p='' @@ -933,7 +941,7 @@ portable_add_group() { groupname="${1}" # Check if group exist - if cut -d ':' -f 1 < /etc/group | grep "^${groupname}$" 1> /dev/null 2>&1; then + if get_group "${groupname}" > /dev/null 2>&1; then echo >&2 "Group '${groupname}' already exists." return 0 fi @@ -969,14 +977,14 @@ portable_add_user_to_group() { username="${2}" # Check if group exist - if ! cut -d ':' -f 1 < /etc/group | grep "^${groupname}$" > /dev/null 2>&1; then + if ! get_group "${groupname}" > /dev/null 2>&1; then echo >&2 "Group '${groupname}' does not exist." # Don’t treat this as a failure, if the group does not exist we should not be trying to add the user to it. return 0 fi # Check if user is in group - if expr ",$(grep "^${groupname}:" < /etc/group | cut -d ':' -f 4)," : ",""${username}"","; then + if get_group "${groupname}" | cut -d ':' -f 4 | grep -wq "${username}"; then # username is already there echo >&2 "User '${username}' is already in group '${groupname}'." return 0 diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh index 6547dd82e..c906cce34 100755 --- a/packaging/installer/install-required-packages.sh +++ b/packaging/installer/install-required-packages.sh @@ -20,7 +20,6 @@ fi PACKAGES_NETDATA=${PACKAGES_NETDATA-1} PACKAGES_NETDATA_PYTHON=${PACKAGES_NETDATA_PYTHON-0} PACKAGES_NETDATA_PYTHON3=${PACKAGES_NETDATA_PYTHON3-1} -PACKAGES_NETDATA_PYTHON_MONGO=${PACKAGES_NETDATA_PYTHON_MONGO-0} PACKAGES_DEBUG=${PACKAGES_DEBUG-0} PACKAGES_IPRANGE=${PACKAGES_IPRANGE-0} PACKAGES_FIREHOL=${PACKAGES_FIREHOL-0} @@ -105,8 +104,6 @@ Supported packages (you can append many of them): - python3 install python3 - - python-pymongo install python-pymongo (or python3-pymongo for python3) - - sensors install lm_sensors for monitoring h/w sensors - firehol-all packages required for FireHOL, FireQOS, update-ipsets @@ -715,6 +712,7 @@ declare -A pkg_tar=( ['gentoo']="app-arch/tar" ['clearlinux']="os-core-update" ['macos']="NOTREQUIRED" + ['freebsd']="NOTREQUIRED" ['default']="tar" ) @@ -934,41 +932,6 @@ declare -A pkg_python3_pip=( ['default']="python3-pip" ) -declare -A pkg_python_pymongo=( - ['alpine']="WARNING|" - ['arch']="python2-pymongo" - ['centos']="WARNING|" - ['debian']="python-pymongo" - ['gentoo']="dev-python/pymongo" - ['suse']="python-pymongo" - ['clearlinux']="WARNING|" - ['rhel']="WARNING|" - ['ol']="WARNING|" - ['macos']="WARNING|" - ['default']="python-pymongo" -) - -declare -A pkg_python3_pymongo=( - ['alpine']="WARNING|" - ['arch']="python-pymongo" - ['centos']="WARNING|" - ['debian']="python3-pymongo" - ['gentoo']="dev-python/pymongo" - ['suse']="python3-pymongo" - ['clearlinux']="WARNING|" - ['rhel']="WARNING|" - ['ol']="WARNING|" - ['freebsd']="py37-pymongo" - ['macos']="WARNING|" - ['default']="python3-pymongo" - - ['centos-7']="python36-pymongo" - ['centos-8']="python3-pymongo" - ['rhel-7']="python36-pymongo" - ['rhel-8']="python3-pymongo" - ['ol-8']="python3-pymongo" -) - declare -A pkg_python_requests=( ['alpine']="py-requests" ['arch']="python2-requests" @@ -1293,7 +1256,6 @@ packages() { if [ "${PACKAGES_NETDATA_PYTHON}" -ne 0 ]; then require_cmd python || suitable_package python - [ "${PACKAGES_NETDATA_PYTHON_MONGO}" -ne 0 ] && suitable_package python-pymongo # suitable_package python-requests # suitable_package python-pip fi @@ -1304,7 +1266,6 @@ packages() { if [ "${PACKAGES_NETDATA_PYTHON3}" -ne 0 ]; then require_cmd python3 || suitable_package python3 - [ "${PACKAGES_NETDATA_PYTHON_MONGO}" -ne 0 ] && suitable_package python3-pymongo # suitable_package python3-requests # suitable_package python3-pip fi @@ -1846,7 +1807,7 @@ EOF remote_log() { # log success or failure on our system # to help us solve installation issues - curl > /dev/null 2>&1 -Ss --max-time 3 "https://registry.my-netdata.io/log/installer?status=${1}&error=${2}&distribution=${distribution}&version=${version}&installer=${package_installer}&tree=${tree}&detection=${detection}&netdata=${PACKAGES_NETDATA}&python=${PACKAGES_NETDATA_PYTHON}&python3=${PACKAGES_NETDATA_PYTHON3}&pymongo=${PACKAGES_NETDATA_PYTHON_MONGO}&sensors=${PACKAGES_NETDATA_SENSORS}&database=${PACKAGES_NETDATA_DATABASE}&ebpf=${PACKAGES_NETDATA_EBPF}&firehol=${PACKAGES_FIREHOL}&fireqos=${PACKAGES_FIREQOS}&iprange=${PACKAGES_IPRANGE}&update_ipsets=${PACKAGES_UPDATE_IPSETS}&demo=${PACKAGES_NETDATA_DEMO_SITE}" + curl > /dev/null 2>&1 -Ss --max-time 3 "https://registry.my-netdata.io/log/installer?status=${1}&error=${2}&distribution=${distribution}&version=${version}&installer=${package_installer}&tree=${tree}&detection=${detection}&netdata=${PACKAGES_NETDATA}&python=${PACKAGES_NETDATA_PYTHON}&python3=${PACKAGES_NETDATA_PYTHON3}&sensors=${PACKAGES_NETDATA_SENSORS}&database=${PACKAGES_NETDATA_DATABASE}&ebpf=${PACKAGES_NETDATA_EBPF}&firehol=${PACKAGES_FIREHOL}&fireqos=${PACKAGES_FIREQOS}&iprange=${PACKAGES_IPRANGE}&update_ipsets=${PACKAGES_UPDATE_IPSETS}&demo=${PACKAGES_NETDATA_DEMO_SITE}" } if [ -z "${1}" ]; then @@ -1909,10 +1870,8 @@ while [ -n "${1}" ]; do PACKAGES_NETDATA=1 if [ "${pv}" -eq 2 ]; then PACKAGES_NETDATA_PYTHON=1 - PACKAGES_NETDATA_PYTHON_MONGO=1 else PACKAGES_NETDATA_PYTHON3=1 - PACKAGES_NETDATA_PYTHON3_MONGO=1 fi PACKAGES_NETDATA_SENSORS=1 PACKAGES_NETDATA_DATABASE=1 @@ -1934,16 +1893,6 @@ while [ -n "${1}" ]; do PACKAGES_NETDATA_PYTHON3=1 ;; - python-pymongo) - if [ "${pv}" -eq 2 ]; then - PACKAGES_NETDATA_PYTHON=1 - PACKAGES_NETDATA_PYTHON_MONGO=1 - else - PACKAGES_NETDATA_PYTHON3=1 - PACKAGES_NETDATA_PYTHON3_MONGO=1 - fi - ;; - sensors | netdata-sensors) PACKAGES_NETDATA=1 PACKAGES_NETDATA_PYTHON3=1 @@ -1963,10 +1912,8 @@ while [ -n "${1}" ]; do PACKAGES_NETDATA=1 if [ "${pv}" -eq 2 ]; then PACKAGES_NETDATA_PYTHON=1 - PACKAGES_NETDATA_PYTHON_MONGO=1 else PACKAGES_NETDATA_PYTHON3=1 - PACKAGES_NETDATA_PYTHON3_MONGO=1 fi PACKAGES_DEBUG=1 PACKAGES_IPRANGE=1 diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index 295fcdca0..30c7b4cab 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later # -# Next unused error code: F050D +# Next unused error code: F050F # ====================================================================== # Constants @@ -28,8 +28,10 @@ KICKSTART_SOURCE="$( PACKAGES_SCRIPT="https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh" PATH="${PATH}:/usr/local/bin:/usr/local/sbin" PUBLIC_CLOUD_URL="https://app.netdata.cloud" -REPOCONFIG_URL_PREFIX="https://packagecloud.io/netdata/netdata-repoconfig/packages" -REPOCONFIG_VERSION="1-2" +REPOCONFIG_DEB_URL_PREFIX="https://repo.netdata.cloud/repos/repoconfig" +REPOCONFIG_DEB_VERSION="2-1" +REPOCONFIG_RPM_URL_PREFIX="https://repo.netdata.cloud/repos/repoconfig" +REPOCONFIG_RPM_VERSION="2-1" START_TIME="$(date +%s)" STATIC_INSTALL_ARCHES="x86_64 armv7l aarch64 ppc64le" TELEMETRY_URL="https://posthog.netdata.cloud/capture/" @@ -43,9 +45,10 @@ INSTALL_TYPE="unknown" INSTALL_PREFIX="" NETDATA_AUTO_UPDATES="default" NETDATA_CLAIM_ONLY=0 -NETDATA_CLAIM_URL="api.netdata.cloud" +NETDATA_CLAIM_URL="https://api.netdata.cloud" NETDATA_COMMAND="default" NETDATA_DISABLE_CLOUD=0 +NETDATA_INSTALLER_OPTIONS="" NETDATA_ONLY_BUILD=0 NETDATA_ONLY_NATIVE=0 NETDATA_ONLY_STATIC=0 @@ -62,8 +65,7 @@ else NETDATA_DISABLE_TELEMETRY=0 fi -NETDATA_TARBALL_BASEURL="${NETDATA_TARBALL_BASEURL:-https://storage.googleapis.com/netdata-nightlies}" -NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:-""}" +NETDATA_TARBALL_BASEURL="${NETDATA_TARBALL_BASEURL:-https://github.com/netdata/netdata-nightlies/releases}" TELEMETRY_API_KEY="${NETDATA_POSTHOG_API_KEY:-mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y}" if echo "${0}" | grep -q 'kickstart-static64'; then @@ -181,7 +183,6 @@ USAGE: kickstart.sh [options] --reinstall-even-if-unsafe Even try to reinstall if we don't think we can do so safely (implies --reinstall). --disable-cloud Disable support for Netdata Cloud (default: detect) --require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud. - --install <path> This option is deprecated and will be removed in a future version, use --install-prefix instead. --install-prefix <path> Specify an installation prefix for local builds (default: autodetect based on system type). --old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default). --install-version <version> Specify the version of Netdata to install. @@ -301,12 +302,21 @@ EOF if command -v curl > /dev/null 2>&1; then curl --silent -o /dev/null -X POST --max-time 2 --header "Content-Type: application/json" -d "${REQ_BODY}" "${TELEMETRY_URL}" > /dev/null elif command -v wget > /dev/null 2>&1; then - wget -q -O - --no-check-certificate \ - --method POST \ - --timeout=1 \ - --header 'Content-Type: application/json' \ - --body-data "${REQ_BODY}" \ - "${TELEMETRY_URL}" > /dev/null + if wget --help 2>&1 | grep BusyBox > /dev/null 2>&1; then + # BusyBox-compatible version of wget, there is no --no-check-certificate option + wget -q -O - \ + -T 1 \ + --header 'Content-Type: application/json' \ + --post-data "${REQ_BODY}" \ + "${TELEMETRY_URL}" > /dev/null + else + wget -q -O - --no-check-certificate \ + --method POST \ + --timeout=1 \ + --header 'Content-Type: application/json' \ + --body-data "${REQ_BODY}" \ + "${TELEMETRY_URL}" > /dev/null + fi fi } @@ -591,7 +601,7 @@ get_redirect() { if command -v curl > /dev/null 2>&1; then run sh -c "curl ${url} -s -L -I -o /dev/null -w '%{url_effective}' | grep -o '[^/]*$'" || return 1 elif command -v wget > /dev/null 2>&1; then - run sh -c "wget --max-redirect=0 ${url} 2>&1 | grep Location | cut -d ' ' -f2 | grep -o '[^/]*$'" || return 1 + run sh -c "wget -S -O /dev/null ${url} 2>&1 | grep -m 1 Location | grep -o '[^/]*$'" || return 1 else fatal "${ERROR_F0003}" F0003 fi @@ -1044,7 +1054,7 @@ EOF confirm_install_prefix() { if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then - fatal "The --install-prefix and --install options are only supported together with the --build-only option." F0204 + fatal "The --install-prefix option is only supported together with the --build-only option." F0204 fi if [ -n "${INSTALL_PREFIX}" ]; then @@ -1282,7 +1292,7 @@ pkg_installed() { netdata_avail_check() { case "${DISTRO_COMPAT_NAME}" in debian|ubuntu) - env DEBIAN_FRONTEND=noninteractive apt-cache policy netdata | grep -q packagecloud.io/netdata/netdata; + env DEBIAN_FRONTEND=noninteractive apt-cache policy netdata | grep -q repo.netdata.cloud/repos/; return $? ;; centos|fedora|ol) @@ -1361,7 +1371,7 @@ try_package_install() { repo_subcmd="update" repo_prefix="debian/${SYSCODENAME}" pkg_type="deb" - pkg_suffix="_all" + pkg_suffix="+debian${SYSVERSION}_all" pkg_vsep="_" pkg_install_opts="${interactive_opts}" repo_update_opts="${interactive_opts}" @@ -1375,7 +1385,7 @@ try_package_install() { repo_subcmd="update" repo_prefix="ubuntu/${SYSCODENAME}" pkg_type="deb" - pkg_suffix="_all" + pkg_suffix="+ubuntu${SYSVERSION}_all" pkg_vsep="_" pkg_install_opts="${interactive_opts}" repo_update_opts="${interactive_opts}" @@ -1468,8 +1478,17 @@ try_package_install() { fi repoconfig_name="netdata-repo${release}" - repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_VERSION}${pkg_suffix}.${pkg_type}" - repoconfig_url="${REPOCONFIG_URL_PREFIX}/${repo_prefix}/${repoconfig_file}/download.${pkg_type}" + + case "${pkg_type}" in + deb) + repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_DEB_VERSION}${pkg_suffix}.${pkg_type}" + repoconfig_url="${REPOCONFIG_DEB_URL_PREFIX}/${repo_prefix}/${repoconfig_file}" + ;; + rpm) + repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_RPM_VERSION}${pkg_suffix}.${pkg_type}" + repoconfig_url="${REPOCONFIG_RPM_URL_PREFIX}/${repo_prefix}/${SYSARCH}/${repoconfig_file}" + ;; + esac if ! pkg_installed "${repoconfig_name}"; then progress "Checking for availability of repository configuration package." @@ -1507,7 +1526,7 @@ try_package_install() { fi if [ "${REPO_ACTION}" = "repositories-only" ]; then - progress "Successfully installed repository configuraion package." + progress "Successfully installed repository configuration package." deferred_warnings cleanup trap - EXIT @@ -1564,25 +1583,33 @@ set_static_archive_urls() { if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then path="$(cd "${NETDATA_OFFLINE_INSTALL_SOURCE}" || exit 1; pwd)" export NETDATA_STATIC_ARCHIVE_URL="file://${path}/netdata-${arch}-latest.gz.run" + export NETDATA_STATIC_ARCHIVE_NAME="netdata-${arch}-latest.gz.run" export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="file://${path}/sha256sums.txt" elif [ "${1}" = "stable" ]; then if [ -n "${INSTALL_VERSION}" ]; then - export NETDATA_STATIC_ARCHIVE_OLD_URL="https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/netdata-v${INSTALL_VERSION}.gz.run" export NETDATA_STATIC_ARCHIVE_URL="https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/netdata-${arch}-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_OLD_URL="https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/netdata-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_NAME="netdata-${arch}-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_OLD_NAME="netdata-v${INSTALL_VERSION}.gz.run" export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/sha256sums.txt" else latest="$(get_redirect "https://github.com/netdata/netdata/releases/latest")" export NETDATA_STATIC_ARCHIVE_URL="https://github.com/netdata/netdata/releases/download/${latest}/netdata-${arch}-latest.gz.run" + export NETDATA_STATIC_ARCHIVE_NAME="netdata-${arch}-latest.gz.run" export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/${latest}/sha256sums.txt" fi else if [ -n "${INSTALL_VERSION}" ]; then - export NETDATA_STATIC_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/netdata-${arch}-v${INSTALL_VERSION}.gz.run" - export NETDATA_STATIC_ARCHIVE_OLD_URL="${NETDATA_TARBALL_BASEURL}/netdata-v${INSTALL_VERSION}.gz.run" - export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/sha256sums.txt" + export NETDATA_STATIC_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/download/v${INSTALL_VERSION}/netdata-${arch}-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_OLD_URL="${NETDATA_TARBALL_BASEURL}/download/v${INSTALL_VERSION}/netdata-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_NAME="netdata-${arch}-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_OLD_NAME="netdata-v${INSTALL_VERSION}.gz.run" + export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/download/v${INSTALL_VERSION}/sha256sums.txt" else - export NETDATA_STATIC_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/netdata-${arch}-latest.gz.run" - export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/sha256sums.txt" + tag="$(get_redirect "${NETDATA_TARBALL_BASEURL}/latest")" + export NETDATA_STATIC_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/download/${tag}/netdata-${arch}-latest.gz.run" + export NETDATA_STATIC_ARCHIVE_NAME="netdata-${arch}-latest.gz.run" + export NETDATA_STATIC_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/download/${tag}/sha256sums.txt" fi fi } @@ -1597,23 +1624,9 @@ try_static_install() { # Check status code first, so that we can provide nicer fallback for dry runs. if check_for_remote_file "${NETDATA_STATIC_ARCHIVE_URL}"; then - if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then - netdata_agent="$(basename "${NETDATA_STATIC_ARCHIVE_URL#"file://"}")" - elif [ -n "${INSTALL_VERSION}" ]; then - if [ "${SELECTED_RELEASE_CHANNEL}" = "stable" ]; then - netdata_agent="${NETDATA_STATIC_ARCHIVE_URL#"https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/"}" - else - netdata_agent="${NETDATA_STATIC_ARCHIVE_URL#"${NETDATA_TARBALL_BASEURL}/"}" - fi - else - if [ "${SELECTED_RELEASE_CHANNEL}" = "stable" ]; then - netdata_agent="${NETDATA_STATIC_ARCHIVE_URL#"https://github.com/netdata/netdata/releases/download/${latest}/"}" - else - netdata_agent="${NETDATA_STATIC_ARCHIVE_URL#"${NETDATA_TARBALL_BASEURL}/"}" - fi - fi + netdata_agent="${NETDATA_STATIC_ARCHIVE_NAME}" elif [ "${SYSARCH}" = "x86_64" ] && check_for_remote_file "${NETDATA_STATIC_ARCHIVE_OLD_URL}"; then - netdata_agent="${NETDATA_STATIC_ARCHIVE_OLD_URL#"https://github.com/netdata/netdata/releases/download/v${INSTALL_VERSION}/"}" + netdata_agent="${NETDATA_STATIC_ARCHIVE_OLD_NAME}" export NETDATA_STATIC_ARCHIVE_URL="${NETDATA_STATIC_ARCHIVE_OLD_URL}" else warning "There is no static build available for ${SYSARCH} CPUs. This usually means we simply do not currently provide static builds for ${SYSARCH} CPUs." @@ -1682,11 +1695,12 @@ set_source_archive_urls() { fi else if [ -n "${INSTALL_VERSION}" ]; then - export NETDATA_SOURCE_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/netdata-v${INSTALL_VERSION}.tar.gz" - export NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/sha256sums.txt" + export NETDATA_SOURCE_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/download/v${INSTALL_VERSION}/netdata-latest.tar.gz" + export NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/download/v${INSTALL_VERSION}/sha256sums.txt" else - export NETDATA_SOURCE_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/netdata-latest.tar.gz" - export NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/sha256sums.txt" + tag="$(get_redirect "${NETDATA_TARBALL_BASEURL}/latest")" + export NETDATA_SOURCE_ARCHIVE_URL="${NETDATA_TARBALL_BASEURL}/download/${tag}/netdata-latest.tar.gz" + export NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL="${NETDATA_TARBALL_BASEURL}/download/${tag}/sha256sums.txt" fi fi } @@ -1842,7 +1856,7 @@ prepare_offline_install_source() { run mkdir -p "${1}" || fatal "Unable to create target directory for offline install preparation." F0504 fi - run cd "${1}" || fatal "Failed to swtich to target directory for offline install preparation." F0505 + run cd "${1}" || fatal "Failed to switch to target directory for offline install preparation." F0505 if [ "${NETDATA_ONLY_NATIVE}" -ne 1 ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then set_static_archive_urls "${SELECTED_RELEASE_CHANNEL}" "x86_64" @@ -2088,10 +2102,6 @@ validate_args() { } parse_args() { - if [ -n "${NETDATA_INSTALLER_OPTIONS}" ]; then - warning "Explicitly specifying additional installer options with NETDATA_INSTALLER_OPTIONS is deprecated. Please instead pass the options to the script using either --local-build-options or --static-install-options as appropriate." - fi - while [ -n "${1}" ]; do case "${1}" in "--help") @@ -2147,11 +2157,6 @@ parse_args() { NETDATA_DISABLE_TELEMETRY="1" NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --disable-telemetry" ;; - "--install") - warning "--install flag is deprecated and will be removed in a future version. Please use --install-prefix instead." - INSTALL_PREFIX="${2}" - shift 1 - ;; "--install-prefix") INSTALL_PREFIX="${2}" shift 1 @@ -2223,11 +2228,11 @@ parse_args() { esac ;; "--local-build-options") - LOCAL_BUILD_OPTIONS="${2}" + LOCAL_BUILD_OPTIONS="${LOCAL_BUILD_OPTIONS} ${2}" shift 1 ;; "--static-install-options") - STATIC_INSTALL_OPTIONS="${2}" + STATIC_INSTALL_OPTIONS="${STATIC_INSTALL_OPTIONS} ${2}" shift 1 ;; "--prepare-offline-install-source") @@ -2249,8 +2254,7 @@ parse_args() { fi ;; *) - warning "Passing unrecognized option '${1}' to installer script. This behavior is deprecated and will be removed in the near future. If you intended to pass this option to the installer code, please use either --local-build-options or --static-install-options to specify it instead." - NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} ${1}" + fatal "Unrecognized option '${1}'. If you intended to pass this option to the installer code, please use either --local-build-options or --static-install-options to specify it instead." F050E ;; esac shift 1 diff --git a/packaging/installer/methods/cloud-providers.md b/packaging/installer/methods/cloud-providers.md index bc5c9aae2..6b8fa6de1 100644 --- a/packaging/installer/methods/cloud-providers.md +++ b/packaging/installer/methods/cloud-providers.md @@ -8,7 +8,7 @@ custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/instal Netdata is fully compatible with popular cloud providers like Google Cloud Platform (GCP), Amazon Web Services (AWS), Azure, and others. You can install Netdata on cloud instances to monitor the apps/services running there, or use -multiple instances in a [parent-child streaming](/streaming/README.md) configuration. +multiple instances in a [parent-child streaming](https://github.com/netdata/netdata/blob/master/streaming/README.md) configuration. In some cases, using Netdata on these cloud providers requires unique installation or configuration steps. This page aims to document some of those steps for popular cloud providers. @@ -53,11 +53,11 @@ command from a remote system, and it fails, it's likely that a firewall is block Another option is to put Netdata behind web server, which will proxy requests through standard HTTP/HTTPS ports (80/443), which are likely already open on your instance. We have a number of guides available: -- [Apache](/docs/Running-behind-apache.md) -- [Nginx](/docs/Running-behind-nginx.md) -- [Caddy](/docs/Running-behind-caddy.md) -- [HAProxy](/docs/Running-behind-haproxy.md) -- [lighttpd](/docs/Running-behind-lighttpd.md) +- [Apache](https://github.com/netdata/netdata/blob/master/docs/Running-behind-apache.md) +- [Nginx](https://github.com/netdata/netdata/blob/master/docs/Running-behind-nginx.md) +- [Caddy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-caddy.md) +- [HAProxy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-haproxy.md) +- [lighttpd](https://github.com/netdata/netdata/blob/master/docs/Running-behind-lighttpd.md) The next few sections outline how to add firewall rules to GCP, AWS, and Azure instances. diff --git a/packaging/installer/methods/freebsd.md b/packaging/installer/methods/freebsd.md index 3523157bd..ea7099b36 100644 --- a/packaging/installer/methods/freebsd.md +++ b/packaging/installer/methods/freebsd.md @@ -45,7 +45,7 @@ gunzip netdata*.tar.gz && tar xf netdata*.tar && rm -rf netdata*.tar Install Netdata in `/opt/netdata`. If you want to enable automatic updates, add `--auto-update` or `-u` to install `netdata-updater` in `cron` (**need root permission**): ```sh -cd netdata-v* && ./netdata-installer.sh --install /opt && cp /opt/netdata/usr/sbin/netdata-claim.sh /usr/sbin/ +cd netdata-v* && ./netdata-installer.sh --install-prefix /opt && cp /opt/netdata/usr/sbin/netdata-claim.sh /usr/sbin/ ``` You also need to enable the `netdata` service in `/etc/rc.conf`: @@ -66,7 +66,7 @@ You can now access the Netdata dashboard by navigating to `http://NODE:19999`, r Starting with v1.30, Netdata collects anonymous usage information by default and sends it to a self hosted PostHog instance within the Netdata infrastructure. To read more about the information collected and how to opt-out, check the [anonymous statistics -page](/docs/anonymous-statistics.md). +page](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md). ## Updating the Agent on FreeBSD If you have not passed the `--auto-update` or `-u` parameter for the installer to enable automatic updating, repeat the last step to update Netdata whenever a new version becomes available. @@ -75,7 +75,7 @@ The `netdata-updater.sh` script will update your Agent. ## Optional parameters to alter your installation | parameters | Description | |:-----:|-----------| -|`--install <path>`| Install netdata in `<path>.` Ex: `--install /opt` will put netdata in `/opt/netdata`| +|`--install-prefix <path>`| Install netdata in `<path>.` Ex: `--install-prefix /opt` will put netdata in `/opt/netdata`| | `--dont-start-it` | Do not (re)start netdata after installation| | `--dont-wait` | Run installation in non-interactive mode| | `--auto-update` or `-u` | Install netdata-updater in cron to update netdata automatically once per day| diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md index 2555e4a83..7c1f60d19 100644 --- a/packaging/installer/methods/kickstart.md +++ b/packaging/installer/methods/kickstart.md @@ -1,21 +1,25 @@ <!-- title: "Install Netdata with kickstart.sh" description: "The kickstart.sh script installs Netdata from source, including all dependencies required to connect to Netdata Cloud, with a single command." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/kickstart.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/kickstart.md" +sidebar_label: "Install Netdata with kickstart.sh" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> import { OneLineInstallWget, OneLineInstallCurl } from '@site/src/components/OneLineInstall/' # Install Netdata with kickstart.sh -![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=kickstart%20downloads&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_per_url&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=kickstart%20downloads&precision=0) +![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=kickstart%20downloads&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=kickstart%20downloads&precision=0) This page covers detailed instructions on using and configuring the automatic one-line installation script named `kickstart.sh`. -The kickstart script works on all Linux distributions and macOS environments. By default, automatic nightly updates are enabled. If you are installing on macOS, make sure to check the [install documentation for macOS](macos.md) before continuing. +The kickstart script works on all Linux distributions and macOS environments. By default, automatic nightly updates are enabled. If you are installing on macOS, make sure to check the [install documentation for macOS](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/macos.md) before continuing. -> If you are unsure whether you want nightly or stable releases, read the [installation guide](/packaging/installer/README.md#nightly-vs-stable-releases). -> If you want to turn off [automatic updates](/packaging/installer/README.md#automatic-updates), use the `--no-updates` option. You can find more installation options below. +> If you are unsure whether you want nightly or stable releases, read the [installation guide](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#nightly-vs-stable-releases). +> If you want to turn off [automatic updates](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#automatic-updates), use the `--no-updates` option. You can find more installation options below. To install Netdata, run the following as your normal user: @@ -68,7 +72,6 @@ The `kickstart.sh` script accepts a number of optional parameters to control how - `--disable-cloud`: For local builds, don’t build any of the cloud code at all. For native packages and static builds, use runtime configuration to disable cloud support. - `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`. -- `--install`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system), this option is deprecated and will be removed in a future version, please use `--install-prefix` instead. - `--install-prefix`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system). - `--install-version`: Specify the version of Netdata to install. - `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed. @@ -76,7 +79,7 @@ The `kickstart.sh` script accepts a number of optional parameters to control how - `--reinstall-clean`: Performs an uninstall of Netdata and clean installation. - `--local-build-options`: Specify additional options to pass to the installer code when building locally. Only valid if `--build-only` is also specified. - `--static-install-options`: Specify additional options to pass to the static installer code. Only valid if --static-only is also specified. -- `--prepare-offline-install-source`: Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](/packaging/installer/methods/offline.md) for more info. +- `--prepare-offline-install-source`: Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md) for more info. Additionally, the following environment variables may be used to further customize how the script runs (most users should not need to use special values for any of these): @@ -91,9 +94,9 @@ should not need to use special values for any of these): ### Connect node to Netdata Cloud during installation -The `kickstart.sh` script accepts additional parameters to automatically [connect](/claim/README.md) your node to Netdata Cloud immediately after installation. +The `kickstart.sh` script accepts additional parameters to automatically [connect](https://github.com/netdata/netdata/blob/master/claim/README.md) your node to Netdata Cloud immediately after installation. -> Note: You either need to run the command with root privileges or run it with the user that is running the agent. More details: [Connect an agent without root privileges](/claim/README.md#connect-an-agent-without-root-privileges) section. +> Note: You either need to run the command with root privileges or run it with the user that is running the agent. More details: [Connect an agent without root privileges](https://github.com/netdata/netdata/blob/master/claim/README.md#connect-an-agent-without-root-privileges) section. To automatically claim nodes after installation: @@ -106,7 +109,7 @@ To automatically claim nodes after installation: after the install. - `--claim-rooms`: Specify a comma-separated list of tokens for each War Room this node should appear in. - `--claim-proxy`: Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. - See [connecting through a proxy](/claim/README.md#connect-through-a-proxy) for details. + See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/claim/README.md#connect-through-a-proxy) for details. - `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://api.netdata.cloud`. For example: @@ -160,10 +163,10 @@ If the script is valid, this command will return `OK, VALID`. ## What's next? -When you're finished with installation, check out our [single-node](/docs/quickstart/single-node.md) or -[infrastructure](/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. +When you're finished with installation, check out our [single-node](https://github.com/netdata/netdata/blob/master/docs/quickstart/single-node.md) or +[infrastructure](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. -Or, skip straight to [configuring the Netdata Agent](/docs/configure/nodes.md). +Or, skip straight to [configuring the Netdata Agent](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). Read through Netdata's [documentation](https://learn.netdata.cloud/docs), which is structured based on actions and solutions, to enable features like health monitoring, alarm notifications, long-term metrics storage, exporting to diff --git a/packaging/installer/methods/kubernetes.md b/packaging/installer/methods/kubernetes.md index 216703a33..142c098b4 100644 --- a/packaging/installer/methods/kubernetes.md +++ b/packaging/installer/methods/kubernetes.md @@ -1,7 +1,11 @@ <!-- title: "Deploy Kubernetes monitoring with Netdata" description: "Deploy Netdata to monitor a Kubernetes cluster to monitor the health, performance, resource utilization, and application metrics of a Kubernetes cluster in real time." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/kubernetes.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/kubernetes.md" +sidebar_label: "Deploy Kubernetes monitoring with Netdata" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Deploy Kubernetes monitoring with Netdata @@ -41,8 +45,8 @@ dashboards available in Netdata Cloud. ## Connect your Kubernetes cluster to Netdata Cloud -To start [Kubernetes monitoring](https://learn.netdata.cloud/docs/cloud/visualize/kubernetes/), you must first -[connect](/claim/README.md) your Kubernetes cluster to [Netdata Cloud](https://app.netdata.cloud). The connection process securely +To start [Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md), you must first +[connect](https://github.com/netdata/netdata/blob/master/claim/README.md) your Kubernetes cluster to [Netdata Cloud](https://app.netdata.cloud). The connection process securely connects your Kubernetes cluster to stream metrics data to Netdata Cloud, enabling Kubernetes-specific visualizations like the health map and time-series composite charts. @@ -180,17 +184,17 @@ helm upgrade netdata netdata/netdata ## What's next? -[Start Kubernetes monitoring](https://learn.netdata.cloud/docs/cloud/visualize/kubernetes/) in Netdata Cloud, which +[Start Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) in Netdata Cloud, which comes with meaningful visualizations out of the box. Read our guide, [_Kubernetes monitoring with Netdata: Overview and -visualizations_](/docs/guides/monitor/kubernetes-k8s-netdata.md), for a complete walkthrough of Netdata's Kubernetes +visualizations_](https://github.com/netdata/netdata/blob/master/docs/guides/monitor/kubernetes-k8s-netdata.md), for a complete walkthrough of Netdata's Kubernetes monitoring capabilities, including a health map of every container in your infrastructure, aggregated resource utilization metrics, and application metrics. ### Related reference documentation -- [Netdata Cloud · Kubernetes monitoring](https://learn.netdata.cloud/docs/cloud/visualize/kubernetes/) +- [Netdata Cloud · Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) - [Netdata Helm chart](https://github.com/netdata/helmchart) - [Netdata service discovery](https://github.com/netdata/agent-service-discovery/) diff --git a/packaging/installer/methods/macos.md b/packaging/installer/methods/macos.md index a1b5f60ce..f80f4c137 100644 --- a/packaging/installer/methods/macos.md +++ b/packaging/installer/methods/macos.md @@ -1,13 +1,17 @@ <!-- title: "Install Netdata on macOS" -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/macos.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/macos.md" +sidebar_label: "Install Netdata on macOS" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Install Netdata on macOS Netdata works on macOS, albeit with some limitations. -The number of charts displaying system metrics is limited, but you can use any of Netdata's [external plugins](/collectors/plugins.d/README.md) to monitor any services you might have installed on your macOS system. -You could also use a macOS system as the parent node in a [streaming configuration](/streaming/README.md). +The number of charts displaying system metrics is limited, but you can use any of Netdata's [external plugins](https://github.com/netdata/netdata/blob/master/collectors/plugins.d/README.md) to monitor any services you might have installed on your macOS system. +You could also use a macOS system as the parent node in a [streaming configuration](https://github.com/netdata/netdata/blob/master/streaming/README.md). You can install Netdata in one of the three following ways: @@ -18,12 +22,12 @@ You can install Netdata in one of the three following ways: Each of these installation option requires [Homebrew](https://brew.sh/) for handling dependencies. > The Netdata Homebrew package is community-created and -maintained. -> Community-maintained packages _may_ receive support from Netdata, but are only a best-effort affair. Learn more about [Netdata's platform support policy](/packaging/PLATFORM_SUPPORT.md). +> Community-maintained packages _may_ receive support from Netdata, but are only a best-effort affair. Learn more about [Netdata's platform support policy](https://github.com/netdata/netdata/blob/master/packaging/PLATFORM_SUPPORT.md). ## Install Netdata with our automatic one-line installation script **Local Netdata Agent installation** -To install Netdata using our automatic [kickstart](/packaging/installer/README.md#automatic-one-line-installation-script) open a new terminal and run: +To install Netdata using our automatic [kickstart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#automatic-one-line-installation-script) open a new terminal and run: ```bash curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh @@ -34,25 +38,25 @@ The Netdata Agent is installed under `/usr/local/netdata`. Dependencies are hand <!-- Potential reuse: https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-macos--> <!--Potential reuse https://learn.netdata.cloud/docs/agent/packaging/installer/methods/kickstart#connect-node-to-netdata-cloud-during-installation The following information is copied from this link.--> -The `kickstart.sh` script accepts additional parameters to automatically [connect](/claim/README.md) your node to Netdata +The `kickstart.sh` script accepts additional parameters to automatically [connect](https://github.com/netdata/netdata/blob/master/claim/README.md) your node to Netdata Cloud immediately after installation. Find the `token` and `rooms` strings by [signing in to Netdata Cloud](https://app.netdata.cloud/sign-in?cloudRoute=/spaces), then clicking on **Connect Nodes** in the [Spaces management -area](https://learn.netdata.cloud/docs/cloud/spaces#manage-spaces). +area](https://github.com/netdata/netdata/blob/master/docs/cloud/cloud.mdx#manage-spaces). - `--claim-token`: Specify a unique claiming token associated with your Space in Netdata Cloud to be used to connect to the node after the install. - `--claim-rooms`: Specify a comma-separated list of tokens for each War Room this node should appear in. - `--claim-proxy`: Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. - See [connecting through a proxy](/claim/README.md#connect-through-a-proxy) for details. + See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/claim/README.md#connect-through-a-proxy) for details. - `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://api.netdata.cloud`. For example: ```bash -curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud +curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://api.netdata.cloud ``` The Netdata Agent is installed under `/usr/local/netdata` on your machine. Your machine will also show up as a node in your Netdata Cloud. -If you experience issues while claiming your node, follow the steps in our [Troubleshooting](/claim/README.md#troubleshooting) documentation. +If you experience issues while claiming your node, follow the steps in our [Troubleshooting](https://github.com/netdata/netdata/blob/master/claim/README.md#troubleshooting) documentation. ## Install Netdata via Homebrew To install Netdata and all its dependencies, run Homebrew using the following command: @@ -77,7 +81,7 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu ``` 2. Click **Install** on the Software Update popup window that appears. -3. Use the same terminal session to install some of Netdata's prerequisites using Homebrew. If you don't want to use [Netdata Cloud](https://learn.netdata.cloud/docs/cloud/), you can omit `cmake`. +3. Use the same terminal session to install some of Netdata's prerequisites using Homebrew. If you don't want to use [Netdata Cloud](https://github.com/netdata/netdata/blob/master/docs/cloud/cloud.mdx), you can omit `cmake`. ```bash brew install ossp-uuid autoconf automake pkg-config libuv lz4 json-c openssl libtool cmake @@ -93,7 +97,7 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu ```bash cd netdata/ - sudo ./netdata-installer.sh --install /usr/local + sudo ./netdata-installer.sh --install-prefix /usr/local ``` > Your Netdata configuration directory will be at `/usr/local/netdata/`. @@ -102,10 +106,10 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu ## What's next? -When you're finished with installation, check out our [single-node](/docs/quickstart/single-node.md) or -[infrastructure](/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. +When you're finished with installation, check out our [single-node](https://github.com/netdata/netdata/blob/master/docs/quickstart/single-node.md) or +[infrastructure](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. -Or, skip straight to [configuring the Netdata Agent](/docs/configure/nodes.md). +Or, skip straight to [configuring the Netdata Agent](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). diff --git a/packaging/installer/methods/manual.md b/packaging/installer/methods/manual.md index d32075394..46bc9a33f 100644 --- a/packaging/installer/methods/manual.md +++ b/packaging/installer/methods/manual.md @@ -1,7 +1,11 @@ <!-- title: "Install Netdata on Linux from a Git checkout" description: "Use the Netdata Agent source code from GitHub, plus helper scripts to set up your system, to install Netdata without packages or binaries." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/manual.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/manual.md" +sidebar_label: "Install Netdata on Linux from a Git checkout" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Install Netdata on Linux from a Git checkout @@ -96,10 +100,7 @@ Netdata plugins and various aspects of Netdata can be enabled or benefit when th | `python`|for most of the external plugins| | `python-yaml`|used for monitoring **beanstalkd**| | `python-beanstalkc`|used for monitoring **beanstalkd**| -| `python-dnspython`|used for monitoring DNS query time| -| `python-ipaddress`|used for monitoring **DHCPd**<br/>this package is required only if the system has python v2. python v3 has this functionality embedded| | `python-mysqldb`<br/>or<br/>`python-pymysql`|used for monitoring **mysql** or **mariadb** databases<br/>`python-mysqldb` is a lot faster and thus preferred| -| `python-pymongo`|used for monitoring **mongodb** databases| | `nodejs`|used for `node.js` plugins for monitoring **named** and **SNMP** devices| | `lm-sensors`|for monitoring **hardware sensors**| | `libelf`|for monitoring kernel-level metrics using eBPF| @@ -123,7 +124,7 @@ Netdata Cloud support may require the following packages to be installed: |:---------:|--------------------------------------------------------------------------------------------------------------------------------------| | `cmake` | Needed at build time if you aren't using your distribution's version of libwebsockets or are building on a platform other than Linux | | `openssl` | Needed to secure communications with the Netdata Cloud | -| `protobuf`| Used for the new Cloud<->Agent binary protocol +| `protobuf`| Used for the new Cloud<->Agent binary protocol | *Netdata will greatly benefit if you have the above packages installed, but it will still work without them.* @@ -189,7 +190,7 @@ cd netdata - You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds. -- If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install /opt`. This one will install Netdata in `/opt/netdata`. +- If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install-prefix /opt`. This one will install Netdata in `/opt/netdata`. - If your server does not have access to the internet and you have manually put the installation directory on your server, you will need to pass the option `--disable-go` to the installer. The option will prevent the installer from attempting to download and install `go.d.plugin`. @@ -201,22 +202,22 @@ cd netdata - `--dont-start-it`: Prevent the installer from starting Netdata automatically. - `--stable-channel`: Automatically update only on the release of new major versions. - `--nightly-channel`: Automatically update on every new nightly build. -- `--disable-telemetry`: Opt-out of [anonymous statistics](/docs/anonymous-statistics.md) we use to make +- `--disable-telemetry`: Opt-out of [anonymous statistics](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md) we use to make Netdata better. - `--no-updates`: Prevent automatic updates of any kind. - `--reinstall`: If an existing install is detected, reinstall instead of trying to update it. Note that this cannot be used to change installation types. -- `--local-files`: Used for [offline installations](offline.md). Pass four file paths: the Netdata +- `--local-files`: Used for [offline installations](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md). Pass four file paths: the Netdata tarball, the checksum file, the go.d plugin tarball, and the go.d plugin config tarball, to force kickstart run the process using those files. This option conflicts with the `--stable-channel` option. If you set this _and_ `--stable-channel`, Netdata will use the local files. ### Connect node to Netdata Cloud during installation -Unlike the [`kickstart.sh`](/packaging/installer/methods/kickstart.md), the `netdata-installer.sh` script does -not allow you to automatically [connect](/claim/README.md) your node to Netdata Cloud immediately after installation. +Unlike the [`kickstart.sh`](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md), the `netdata-installer.sh` script does +not allow you to automatically [connect](https://github.com/netdata/netdata/blob/master/claim/README.md) your node to Netdata Cloud immediately after installation. -See the [connect to cloud](/claim/README.md) doc for details on connecting a node with a manual installation of Netdata. +See the [connect to cloud](https://github.com/netdata/netdata/blob/master/claim/README.md) doc for details on connecting a node with a manual installation of Netdata. ### 'nonrepresentable section on output' errors @@ -228,10 +229,10 @@ In most cases, you can do this by running `CC=gcc ./netdata-installer.sh`. ## What's next? -When you're finished with installation, check out our [single-node](/docs/quickstart/single-node.md) or -[infrastructure](/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. +When you're finished with installation, check out our [single-node](https://github.com/netdata/netdata/blob/master/docs/quickstart/single-node.md) or +[infrastructure](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. -Or, skip straight to [configuring the Netdata Agent](/docs/configure/nodes.md). +Or, skip straight to [configuring the Netdata Agent](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). Read through Netdata's [documentation](https://learn.netdata.cloud/docs), which is structured based on actions and solutions, to enable features like health monitoring, alarm notifications, long-term metrics storage, exporting to diff --git a/packaging/installer/methods/offline.md b/packaging/installer/methods/offline.md index 5e92976e0..e49f1d2e5 100644 --- a/packaging/installer/methods/offline.md +++ b/packaging/installer/methods/offline.md @@ -1,7 +1,11 @@ <!-- title: "Install Netdata on offline systems" description: "Install the Netdata Agent on offline/air gapped systems to benefit from real-time, per-second monitoring without connecting to the internet." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/offline.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/offline.md" +sidebar_label: "Install Netdata on offline systems" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Install Netdata on offline systems @@ -41,7 +45,7 @@ curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/n This will create a directory called `netdata-offline` in the current directory and place all the files required for an offline install in it. If you want to use a specific release channel (nightly or stable), it _must_ be specified on this step using the -apporpriate option for the kickstart script. +appropriate option for the kickstart script. ## Installing on the target system @@ -50,16 +54,16 @@ target system. This can be done in any manner you like, as long as filenames are After copying the files, simply run the `install.sh` script located in the offline install source directory. It accepts all the [same options as the kickstart -script](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) for further +script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) for further customization of the installation, though it will default to not enabling automatic updates (as they are not supported on offline installs). ## What's next? -When you're finished with installation, check out our [single-node](/docs/quickstart/single-node.md) or -[infrastructure](/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. +When you're finished with installation, check out our [single-node](https://github.com/netdata/netdata/blob/master/docs/quickstart/single-node.md) or +[infrastructure](https://github.com/netdata/netdata/blob/master/docs/quickstart/infrastructure.md) monitoring quickstart guides based on your use case. -Or, skip straight to [configuring the Netdata Agent](/docs/configure/nodes.md). +Or, skip straight to [configuring the Netdata Agent](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). Read through Netdata's [documentation](https://learn.netdata.cloud/docs), which is structured based on actions and solutions, to enable features like health monitoring, alarm notifications, long-term metrics storage, exporting to diff --git a/packaging/installer/methods/packages.md b/packaging/installer/methods/packages.md new file mode 100644 index 000000000..135512808 --- /dev/null +++ b/packaging/installer/methods/packages.md @@ -0,0 +1,89 @@ +<!-- +title: "Install Netdata using native DEB/RPM packages." +description: "Instructions for how to install Netdata using native DEB or RPM packages." +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/packages.md" +sidebar_label: "Install Netdata using native DEB/RPM packages." +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" +--> + +# Installing Netdata using native DEB or RPM packages. + +For most common Linux distributions that use either DEB or RPM packages, Netdata provides pre-built native packages +for current releases in-line with +our [official platform support policy](https://github.com/netdata/netdata/blob/master/packaging/PLATFORM_SUPPORT.md). +These packages will be used by default when attempting to install on a supported platform using our +[kickstart.sh installer script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md). + +When using the kickstart script, you can force usage of native DEB or RPM packages by passing the option +`--native-only` when invoking the script. This will cause it to only attempt to use native packages for the install, +and fail if it cannot do so. + +## Manual setup of RPM packages. + +Netdata’s official RPM repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of +repositories at that top level: + +- `stable`: Contains packages for stable releases of the Netdata Agent. +- `edge`: Contains packages for nightly builds of the Netdata Agent. +- `repoconfig`: Provides packages that set up configuration files for using the other repositories. +- `devel`: Is used for one-off development builds of the Netdata Agent, and can simply be ignored by users. + +Within each top level group of repositories, there are directories for each supported group of distributions: + +- `el`: Is for Red Hat Enterprise Linux and binary compatible distros, such as CentOS, Alma Linux, and Rocky Linux. +- `fedora`: Is for Fedora and binary compatible distros. +- `ol`: Is for Oracle Linux and binary compatible distros. +- `opensuse`: Is for openSUSE and binary compatible distros. + +Under each of those directories is a directory for each supported release of that distribution, and under that a +directory for each supported CPU architecture which contains the actual repository. + +For example, for stable release packages for RHEL 9 on 64-bit x86, the full URL for the repository would be +https://repo.netdata.cloud/repos/stable/el/9/x86\_64/ + +Our RPM packages and repository metadata are signed using a GPG key with a user name of ‘Netdatabot’. The +current key fingerprint is `6588FDD7B14721FE7C3115E6F9177B5265F56346`. The associated public key can be fetched from +`https://repo.netdata.cloud/netdatabot.gpg.key`. + +If you are explicitly configuring a system to use our repositories, the recommended setup is to download the +appropriate repository configuration package from https://repo.netdata.cloud/repos/repoconfig and install it +directly on the target system using the system package manager. This will ensure any packages needed to use the +repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure. + +## Manual setup of DEB packages. + +Netdata’s official DEB repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of +repositories at that top level: + +- `stable`: Contains packages for stable releases of the Netdata Agent. +- `edge`: Contains packages for nightly builds of the Netdata Agent. +- `repoconfig`: Provides packages that set up configuration files for using the other repositories. +- `devel`: Is used for one-off development builds of the Netdata Agent, and can simply be ignored by users. + +Within each top level group of repositories, there are directories for each supported group of distributions: + +- `debian`: Is for Debian Linux and binary compatible distros. +- `ubuntu`: Is for Ubuntu Linux and binary compatible distros. + +Under each of these directories is a directory for each supported release, corresponding to the release codename. + +These repositories are set up as what Debian calls ‘flat repositories’, and are available via both HTTP and HTTPS. + +As a result of this structure, the required APT sources entry for stable packages for Debian 11 (Bullseye) is: + +``` +deb http://repo.netdata.cloud/repos/stable/debian/ bullseye/ +``` + +Note the `/` at the end of the codename, this is required for the repository to be processed correctly. + +Our DEB packages and repository metadata are signed using a GPG key with a user name of ‘Netdatabot’. The +current key fingerprint is `6588FDD7B14721FE7C3115E6F9177B5265F56346`. The associated public key can be fetched from +`https://repo.netdata.cloud/netdatabot.gpg.key`. + +If you are explicitly configuring a system to use our repositories, the recommended setup is to download the +appropriate repository configuration package from https://repo.netdata.cloud/repos/repoconfig and install it +directly on the target system using the system package manager. This will ensure any packages needed to use the +repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure. diff --git a/packaging/installer/methods/source.md b/packaging/installer/methods/source.md index d8f4f0bda..ecf35382a 100644 --- a/packaging/installer/methods/source.md +++ b/packaging/installer/methods/source.md @@ -1,7 +1,11 @@ <!-- title: "Manually build Netdata from source" description: "Package maintainers and power users may be interested in manually building Netdata from source without using any of our installation scripts." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/source.md +custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/source.md" +sidebar_label: "Manually build Netdata from source" +learn_status: "Published" +learn_topic_type: "Tasks" +learn_rel_path: "Installation" --> # Manually build Netdata from source @@ -9,7 +13,7 @@ custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/instal These instructions are for advanced users and distribution package maintainers. Unless this describes you, you almost certainly want to follow [our guide for manually installing Netdata from a git -checkout](/packaging/installer/methods/manual.md) instead. +checkout](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md) instead. ## Required dependencies diff --git a/packaging/installer/methods/synology.md b/packaging/installer/methods/synology.md index 30ec3035c..e3602df5e 100644 --- a/packaging/installer/methods/synology.md +++ b/packaging/installer/methods/synology.md @@ -26,7 +26,7 @@ installations run it as the `netdata` user, you might wish to do the same. This 2. Create a user `netdata` via the Synology user interface. Give it no access to anything and a random password. Assign the user to the `netdata` group. Netdata will chuid to this user when running. 3. Change ownership of the following directories, as defined in [Netdata - Security](/docs/netdata-security.md#security-design): + Security](https://github.com/netdata/netdata/blob/master/docs/netdata-security.md#security-design): ```sh chown -R root:netdata /opt/netdata/usr/share/netdata diff --git a/packaging/installer/netdata-uninstaller.sh b/packaging/installer/netdata-uninstaller.sh index 45ec73fce..2f2e89ffd 100755 --- a/packaging/installer/netdata-uninstaller.sh +++ b/packaging/installer/netdata-uninstaller.sh @@ -426,7 +426,7 @@ portable_del_group() { # Linux if command -v groupdel 1> /dev/null 2>&1; then - if grep -q "${groupname}" /etc/group; then + if get_group "${groupname}" > /dev/null 2>&1; then run groupdel "${groupname}" && return 0 else info "Group ${groupname} already removed in a previous step." diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index d018d67d2..130507c17 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -34,6 +34,9 @@ set -e PACKAGES_SCRIPT="https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh" +NETDATA_STABLE_BASE_URL="${NETDATA_BASE_URL:-https://github.com/netdata/netdata/releases}" +NETDATA_NIGHTLY_BASE_URL="${NETDATA_BASE_URL:-https://github.com/netdata/netdata-nightlies/releases}" + script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" if [ -x "${script_dir}/netdata-updater" ]; then @@ -369,13 +372,13 @@ download() { } get_netdata_latest_tag() { - dest="${1}" - url="https://github.com/netdata/netdata/releases/latest" + url="${1}/latest" + dest="${2}" if command -v curl >/dev/null 2>&1; then tag=$(curl "${url}" -s -L -I -o /dev/null -w '%{url_effective}' | grep -m 1 -o '[^/]*$') elif command -v wget >/dev/null 2>&1; then - tag=$(wget --max-redirect=0 "${url}" 2>&1 | grep Location | cut -d ' ' -f2 | grep -m 1 -o '[^/]*$') + tag=$(wget -S -O /dev/null "${url}" 2>&1 | grep -m 1 Location | grep -o '[^/]*$') else fatal "I need curl or wget to proceed, but neither of them are available on this system." U0006 fi @@ -439,7 +442,12 @@ self_update() { parse_version() { r="${1}" - if echo "${r}" | grep -q '^v.*'; then + if [ "${r}" = "latest" ]; then + # If we get ‘latest’ as a version, return the largest possible + # version value. + printf "99999999999999" + return 0 + elif echo "${r}" | grep -q '^v.*'; then # shellcheck disable=SC2001 # XXX: Need a regex group substitution here. r="$(echo "${r}" | sed -e 's/^v\(.*\)/\1/')" @@ -463,9 +471,9 @@ parse_version() { get_latest_version() { if [ "${RELEASE_CHANNEL}" = "stable" ]; then - get_netdata_latest_tag /dev/stdout + get_netdata_latest_tag "${NETDATA_STABLE_BASE_URL}" /dev/stdout else - download "$NETDATA_NIGHTLIES_BASEURL/latest-version.txt" /dev/stdout + get_netdata_latest_tag "${NETDATA_NIGHTLY_BASE_URL}" /dev/stdout fi } @@ -529,12 +537,13 @@ set_tarball_urls() { fi if [ "$1" = "stable" ]; then - latest="$(get_netdata_latest_tag /dev/stdout)" - export NETDATA_TARBALL_URL="https://github.com/netdata/netdata/releases/download/$latest/${filename}" - export NETDATA_TARBALL_CHECKSUM_URL="https://github.com/netdata/netdata/releases/download/$latest/sha256sums.txt" + latest="$(get_netdata_latest_tag "${NETDATA_STABLE_BASE_URL}" /dev/stdout)" + export NETDATA_TARBALL_URL="${NETDATA_STABLE_BASE_URL}/download/$latest/${filename}" + export NETDATA_TARBALL_CHECKSUM_URL="${NETDATA_STABLE_BASE_URL}/download/$latest/sha256sums.txt" else - export NETDATA_TARBALL_URL="$NETDATA_NIGHTLIES_BASEURL/${filename}" - export NETDATA_TARBALL_CHECKSUM_URL="$NETDATA_NIGHTLIES_BASEURL/sha256sums.txt" + tag="$(get_netdata_latest_tag "${NETDATA_NIGHTLY_BASE_URL}" /dev/stdout)" + export NETDATA_TARBALL_URL="${NETDATA_NIGHTLY_BASE_URL}/download/${tag}/${filename}" + export NETDATA_TARBALL_CHECKSUM_URL="${NETDATA_NIGHTLY_BASE_URL}/download/${tag}/sha256sums.txt" fi } @@ -769,8 +778,8 @@ update_binpkg() { opensuse) pm_cmd="zypper" repo_subcmd="--gpg-auto-import-keys refresh" - upgrade_cmd="upgrade" - pkg_install_opts="${interactive_opts} --allow-unsigned-rpm" + upgrade_cmd="update" + pkg_install_opts="${interactive_opts}" repo_update_opts="" pkg_installed_check="rpm -q" INSTALL_TYPE="binpkg-rpm" @@ -907,9 +916,6 @@ export NETDATA_LIB_DIR="${NETDATA_LIB_DIR:-${NETDATA_PREFIX}/var/lib/netdata}" # Source the tarball checksum, if not already available from environment (for existing installations with the old logic) [ -z "${NETDATA_TARBALL_CHECKSUM}" ] && [ -f "${NETDATA_LIB_DIR}/netdata.tarball.checksum" ] && NETDATA_TARBALL_CHECKSUM="$(cat "${NETDATA_LIB_DIR}/netdata.tarball.checksum")" -# Grab the nightlies baseurl (defaulting to our Google Storage bucket) -export NETDATA_NIGHTLIES_BASEURL="${NETDATA_NIGHTLIES_BASEURL:-https://storage.googleapis.com/netdata-nightlies}" - if echo "$INSTALL_TYPE" | grep -qv ^binpkg && [ "${INSTALL_UID}" != "$(id -u)" ]; then fatal "You are running this script as user with uid $(id -u). We recommend to run this script as root (user with uid 0)" U0011 fi diff --git a/packaging/libbpf.checksums b/packaging/libbpf.checksums index 9a8b8f8cf..e0b91c0c6 100644 --- a/packaging/libbpf.checksums +++ b/packaging/libbpf.checksums @@ -1 +1 @@ -63fe4ac3f6807e8ff4cd3af2ffae0091eb177fb7f6aca2f03d3f201a609b988c v1.0.1_netdata.tar.gz +f2a8214c967153fcbb7a8f2af59c23a38f6e175384878dd37648649c5d8182c4 v1.1_netdata.tar.gz diff --git a/packaging/libbpf.version b/packaging/libbpf.version index bb58ffc40..b0797d5a8 100644 --- a/packaging/libbpf.version +++ b/packaging/libbpf.version @@ -1 +1 @@ -1.0.1_netdata +1.1_netdata diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index be2b2f75f..52a23fc70 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -27,7 +27,7 @@ fi STARTIT=1 REINSTALL_OPTIONS="" -RELEASE_CHANNEL="nightly" # check .travis/create_artifacts.sh before modifying +RELEASE_CHANNEL="nightly" while [ "${1}" ]; do case "${1}" in @@ -121,6 +121,11 @@ if portable_add_group netdata; then run_failed "Failed to add netdata user to secondary groups" fi done + # Netdata must be able to read /etc/pve/qemu-server/* and /etc/pve/lxc/* + # for reading VMs/containers names, CPU and memory limits on Proxmox. + if [ -d "/etc/pve" ]; then + portable_add_user_to_group "www-data" netdata && NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS} www-data" + fi NETDATA_USER="netdata" NETDATA_GROUP="netdata" else @@ -218,12 +223,6 @@ if [ -f "usr/libexec/netdata/plugins.d/go.d.plugin" ] && command -v setcap 1>/de run setcap "cap_net_admin+epi cap_net_raw=eip" "usr/libexec/netdata/plugins.d/go.d.plugin" fi -# fix the fping binary -if [ -f bin/fping ]; then - run chown root:${NETDATA_GROUP} bin/fping - run chmod 4750 bin/fping -fi - # ----------------------------------------------------------------------------- echo "Configure TLS certificate paths" diff --git a/packaging/makeself/jobs/50-fping-5.1.install.sh b/packaging/makeself/jobs/50-fping-5.1.install.sh deleted file mode 100755 index 644b5524a..000000000 --- a/packaging/makeself/jobs/50-fping-5.1.install.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck source=packaging/makeself/functions.sh -. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 - -version="5.1" - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building fping" || true - -fetch "fping-${version}" "https://fping.org/dist/fping-${version}.tar.gz" \ - 1ee5268c063d76646af2b4426052e7d81a42b657e6a77d8e7d3d2e60fd7409fe fping - -export CFLAGS="-static -I/openssl-static/include -pipe" -export LDFLAGS="-static -L/openssl-static/lib" -export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" - -if [ "${CACHE_HIT:-0}" -eq 0 ]; then - run ./configure \ - --prefix="${NETDATA_INSTALL_PATH}" \ - --enable-ipv4 \ - --enable-ipv6 \ - --disable-dependency-tracking - - cat > doc/Makefile <<-EOF - all: - clean: - install: - EOF - - run make clean - run make -j "$(nproc)" -fi - -run make install - -store_cache fping "${NETDATA_MAKESELF_PATH}/tmp/fping-${version}" - -if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - run strip "${NETDATA_INSTALL_PATH}"/bin/fping -fi - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh index ea6902a44..2c4fb3007 100755 --- a/packaging/makeself/jobs/70-netdata-git.install.sh +++ b/packaging/makeself/jobs/70-netdata-git.install.sh @@ -27,7 +27,7 @@ export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" export CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=/openssl-static -DOPENSSL_LIBRARIES=/openssl-static/lib -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/openssl-static -DLWS_OPENSSL_INCLUDE_DIRS=/openssl-static/include -DLWS_OPENSSL_LIBRARIES=/openssl-static/lib/libssl.a;/openssl-static/lib/libcrypto.a" run ./netdata-installer.sh \ - --install "${NETDATA_INSTALL_PARENT}" \ + --install-prefix "${NETDATA_INSTALL_PARENT}" \ --dont-wait \ --dont-start-it \ --require-cloud \ diff --git a/packaging/repoconfig/Makefile b/packaging/repoconfig/Makefile index d0f246ac3..18b9887fe 100644 --- a/packaging/repoconfig/Makefile +++ b/packaging/repoconfig/Makefile @@ -4,23 +4,26 @@ all: $(FILES) netdata.list: netdata.list.in cp netdata.list.in netdata.list - set -a && . /etc/os-release && sed -i -e "s/__DISTRO__/$${ID}/" -e "s/__SUITE__/$${VERSION_CODENAME}/" -e "s/__VARIANT__//" netdata.list + set -a && . /etc/os-release && sed -i -e "s/__DISTRO__/$${ID}/" -e "s/__SUITE__/$${VERSION_CODENAME}/" -e "s/__VARIANT__/stable/" netdata.list netdata-edge.list: netdata.list.in cp netdata.list.in netdata-edge.list - set -a && . /etc/os-release && sed -i -e "s/__DISTRO__/$${ID}/" -e "s/__SUITE__/$${VERSION_CODENAME}/" -e "s/__VARIANT__/-edge/" netdata-edge.list + set -a && . /etc/os-release && sed -i -e "s/__DISTRO__/$${ID}/" -e "s/__SUITE__/$${VERSION_CODENAME}/" -e "s/__VARIANT__/edge/" netdata-edge.list -netdata-archive-keyring.gpg: - curl -L https://packagecloud.io/netdata/netdata/gpgkey | gpg --dearmor > netdata-archive-keyring.gpg +netdata.gpg.key: + curl -L https://repo.netdata.cloud/netdatabot.gpg.key > $@ -netdata-edge-archive-keyring.gpg: - curl -L https://packagecloud.io/netdata/netdata-edge/gpgkey | gpg --dearmor > netdata-edge-archive-keyring.gpg +netdata-archive-keyring.gpg: netdata.gpg.key + gpg --dearmor > $@ < $< -netdata-repoconfig-archive-keyring.gpg: - curl -L https://packagecloud.io/netdata/netdata-repoconfig/gpgkey | gpg --dearmor > netdata-repoconfig-archive-keyring.gpg +netdata-edge-archive-keyring.gpg: netdata.gpg.key + gpg --dearmor > $@ < $< + +netdata-repoconfig-archive-keyring.gpg: netdata.gpg.key + gpg --dearmor > $@ < $< debian/tmp: - mkdir -p debian/tmp + mkdir -p $@ install: $(FILES) debian/tmp cp $(FILES) debian/tmp/ @@ -29,3 +32,4 @@ clean: rm -f $(FILES) .PHONY: clean +.INTERMEDIATE: netdatabot.gpg.key diff --git a/packaging/repoconfig/debian/changelog b/packaging/repoconfig/debian/changelog index 57c12d71b..02eedfc36 100644 --- a/packaging/repoconfig/debian/changelog +++ b/packaging/repoconfig/debian/changelog @@ -1,3 +1,10 @@ +netdata-repo (2-1) unstable; urgency=medium + + * Switched to new package hosting infrastructure + * Removed apt-transport-https requirement + + -- Netdata Builder <bot@netdata.cloud> Wed, 18 Jan 2023 08:30:00 -0500 + netdata-repo (1-2) unstable; urgency=medium * Fixed package file naming for repo layout compliance diff --git a/packaging/repoconfig/debian/control b/packaging/repoconfig/debian/control index 5fdcf140b..fdea6a829 100644 --- a/packaging/repoconfig/debian/control +++ b/packaging/repoconfig/debian/control @@ -8,12 +8,12 @@ Homepage: https://netdata.cloud Package: netdata-repo Architecture: all -Depends: apt-transport-https, debian-archive-keyring, gnupg +Depends: debian-archive-keyring, gnupg Conflicts: netdata-repo-edge Description: Configuration for the official Netdata Stable package repository. Package: netdata-repo-edge Architecture:all -Depends: apt-transport-https, debian-archive-keyring, gnupg +Depends: debian-archive-keyring, gnupg Conflicts: netdata-repo Description: Configuration for the official Netdata Edge package repository. diff --git a/packaging/repoconfig/debian/copyright b/packaging/repoconfig/debian/copyright index 193b45e6a..44b59693d 100644 --- a/packaging/repoconfig/debian/copyright +++ b/packaging/repoconfig/debian/copyright @@ -4,7 +4,7 @@ Upstream-Contact: Costa Tsaousis <costa@netdata.cloud> Source: https://github.com/netdata/netdata Files: * -Copyright: 2021 Netdata Inc. +Copyright: 2021-2023 Netdata Inc. License: GPL-3+ On Debian systems, the complete text of the GNU General Public License version 3 can be found in /usr/share/common-licenses/GPL-3. diff --git a/packaging/repoconfig/netdata-edge.repo.centos b/packaging/repoconfig/netdata-edge.repo.centos index af56384f3..fd96f0d71 100644 --- a/packaging/repoconfig/netdata-edge.repo.centos +++ b/packaging/repoconfig/netdata-edge.repo.centos @@ -1,9 +1,9 @@ [netdata-edge] name=Netdata Edge -baseurl=https://packagecloud.io/netdata/netdata-edge/el/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/edge/el/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-edge/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/el/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/el/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata-edge.repo.fedora b/packaging/repoconfig/netdata-edge.repo.fedora index 902e00c13..03b0e9c7c 100644 --- a/packaging/repoconfig/netdata-edge.repo.fedora +++ b/packaging/repoconfig/netdata-edge.repo.fedora @@ -1,9 +1,9 @@ [netdata-edge] name=Netdata Edge -baseurl=https://packagecloud.io/netdata/netdata-edge/fedora/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/edge/fedora/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-edge/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/fedora/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/fedora/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata-edge.repo.ol b/packaging/repoconfig/netdata-edge.repo.ol index 1d1ea407b..89f74e712 100644 --- a/packaging/repoconfig/netdata-edge.repo.ol +++ b/packaging/repoconfig/netdata-edge.repo.ol @@ -1,9 +1,9 @@ [netdata-edge] name=Netdata Edge -baseurl=https://packagecloud.io/netdata/netdata-edge/ol/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/edge/ol/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-edge/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/ol/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/ol/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata-edge.repo.suse b/packaging/repoconfig/netdata-edge.repo.suse index 94db12a51..f65bd08d7 100644 --- a/packaging/repoconfig/netdata-edge.repo.suse +++ b/packaging/repoconfig/netdata-edge.repo.suse @@ -1,19 +1,19 @@ [netdata-edge] name=Netdata Edge -baseurl=https://packagecloud.io/netdata/netdata-edge/opensuse/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/edge/opensuse/$releasever/$basearch repo_gpgcheck=1 -pkg_gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-edge/gpgkey +pkg_gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 type=rpm-md autorefresh=1 [netdata-repoconfig] name=Netdata Repoconfig -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/opensuse/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/opensuse/$releasever/$basearch repo_gpgcheck=1 -pkg_gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +pkg_gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 type=rpm-md autorefresh=1 diff --git a/packaging/repoconfig/netdata-repo.spec b/packaging/repoconfig/netdata-repo.spec index 3e5f66b81..cc53fd8cb 100644 --- a/packaging/repoconfig/netdata-repo.spec +++ b/packaging/repoconfig/netdata-repo.spec @@ -1,8 +1,8 @@ %{?rhel:%global centos_ver %rhel} Name: netdata-repo -Version: 1 -Release: 2 +Version: 2 +Release: 1 Summary: Netdata stable repositories configuration. Group: System Environment/Base @@ -96,6 +96,8 @@ This package contains the official Netdata package repository configuration for %endif %changelog +* Wed Dec 7 2022 Austin Hemmelgarn <austin@netdata.cloud> 2-1 +- Switch to new hosting at repo.netdata.cloud. * Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2 - Bump release to keep in sync with DEB package. * Mon Jun 14 2021 Austin Hemmelgarn <austin@netdata.cloud> 1-1 diff --git a/packaging/repoconfig/netdata.list.in b/packaging/repoconfig/netdata.list.in index 9c3ddba01..a49dbd91c 100644 --- a/packaging/repoconfig/netdata.list.in +++ b/packaging/repoconfig/netdata.list.in @@ -1,2 +1,2 @@ -deb https://packagecloud.io/netdata/netdata__VARIANT__/__DISTRO__/ __SUITE__ main -deb https://packagecloud.io/netdata/netdata-repoconfig/__DISTRO__/ __SUITE__ main +deb http://repo.netdata.cloud/repos/__VARIANT__/__DISTRO__/ __SUITE__/ +deb http://repo.netdata.cloud/repos/repoconfig/__DISTRO__/ __SUITE__/ diff --git a/packaging/repoconfig/netdata.repo.centos b/packaging/repoconfig/netdata.repo.centos index d9cb2bca8..221e64513 100644 --- a/packaging/repoconfig/netdata.repo.centos +++ b/packaging/repoconfig/netdata.repo.centos @@ -1,9 +1,9 @@ [netdata] name=Netdata -baseurl=https://packagecloud.io/netdata/netdata/el/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/stable/el/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/el/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/el/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata.repo.fedora b/packaging/repoconfig/netdata.repo.fedora index 82ec6ea57..e13262acb 100644 --- a/packaging/repoconfig/netdata.repo.fedora +++ b/packaging/repoconfig/netdata.repo.fedora @@ -1,9 +1,9 @@ [netdata] name=Netdata -baseurl=https://packagecloud.io/netdata/netdata/fedora/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/stable/fedora/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/fedora/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/fedora/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata.repo.ol b/packaging/repoconfig/netdata.repo.ol index 763504b29..0488670d4 100644 --- a/packaging/repoconfig/netdata.repo.ol +++ b/packaging/repoconfig/netdata.repo.ol @@ -1,9 +1,9 @@ [netdata] name=Netdata -baseurl=https://packagecloud.io/netdata/netdata/ol/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/stable/ol/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt @@ -11,10 +11,10 @@ priority=50 [netdata-repoconfig] name=Netdata Repository Config -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/ol/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/ol/$releasever/$basearch repo_gpgcheck=1 -gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt diff --git a/packaging/repoconfig/netdata.repo.suse b/packaging/repoconfig/netdata.repo.suse index 55ad73e36..8204d8d4d 100644 --- a/packaging/repoconfig/netdata.repo.suse +++ b/packaging/repoconfig/netdata.repo.suse @@ -1,19 +1,19 @@ [netdata] name=Netdata -baseurl=https://packagecloud.io/netdata/netdata/opensuse/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/stable/opensuse/$releasever/$basearch repo_gpgcheck=1 -pkg_gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata/gpgkey +pkg_gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 type=rpm-md autorefresh=1 [netdata-repoconfig] name=Netdata Repoconfig -baseurl=https://packagecloud.io/netdata/netdata-repoconfig/opensuse/$releasever/$basearch +baseurl=https://repo.netdata.cloud/repos/repoconfig/opensuse/$releasever/$basearch repo_gpgcheck=1 -pkg_gpgcheck=0 -gpgkey=https://packagecloud.io/netdata/netdata-repoconfig/gpgkey +pkg_gpgcheck=1 +gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key enabled=1 type=rpm-md autorefresh=1 diff --git a/packaging/version b/packaging/version index 094f172cf..553ed7204 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.37.1 +v1.38.0 |