Finish renaming the `--install` option to `--install-prefix`. (#13881)
* Finish renaming the `--install` option to `--install-prefix`. * Fix remaining references to `--install` option.
Austin S. Hemmelgarn committed
Jan 4, 2023 at 07:34 UTC
df379e45fbaddf825f1f7972a75ae3f3daf80097
17 files changed
+24
-40
.github/scripts/run_install_with_dist_file.sh
+1
-1
@@ -33,7 +33,7 @@ docker run \
33
-v "${PWD}:/netdata" \
34
-w /netdata \
35
"ubuntu:latest" \
36
- /bin/bash -c "./install-required-packages.sh --dont-wait --non-interactive netdata && apt install wget && ./netdata-installer.sh --dont-wait --require-cloud --disable-telemetry --install /tmp --one-time-build && echo \"Validating netdata instance is running\" && wget -O - 'http://127.0.0.1:19999/api/v1/info' | grep version"
36
+ /bin/bash -c "./install-required-packages.sh --dont-wait --non-interactive netdata && apt install wget && ./netdata-installer.sh --dont-wait --require-cloud --disable-telemetry --install-prefix /tmp --one-time-build && echo \"Validating netdata instance is running\" && wget -O - 'http://127.0.0.1:19999/api/v1/info' | grep version"
37
popd || exit 1
38
39
echo "All Done!"
.github/workflows/checks.yml
+1
-1
@@ -51,7 +51,7 @@ jobs:
51
- name: Prepare environment
52
run: ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
53
- name: Build netdata
54
- run: ./netdata-installer.sh --dont-start-it --disable-telemetry --dont-wait --install /tmp/install --one-time-build
54
+ run: ./netdata-installer.sh --dont-start-it --disable-telemetry --dont-wait --install-prefix /tmp/install --one-time-build
55
- name: Check that repo is clean
56
run: |
57
git status --porcelain=v1 > /tmp/porcelain
.github/workflows/codeql.yml
+1
-1
@@ -87,7 +87,7 @@ jobs:
87
- name: Prepare environment
88
run: ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
89
- name: Build netdata
90
- run: ./netdata-installer.sh --dont-start-it --disable-telemetry --dont-wait --install /tmp/install --one-time-build
90
+ run: ./netdata-installer.sh --dont-start-it --disable-telemetry --dont-wait --install-prefix /tmp/install --one-time-build
91
- name: Run CodeQL
92
uses: github/codeql-action/analyze@v2
93
with:
.travis.yml
+1
-1
@@ -63,6 +63,6 @@ jobs:
63
- stage: Build process
64
65
name: Standard netdata build
66
- script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
66
+ script: fakeroot ./netdata-installer.sh --install-prefix $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
67
env: CFLAGS='-O1 -Wall -Wextra -Wformat-signedness -fstack-protector-all -fno-common -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1'
68
after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)"
claim/README.md
+6
-6
@@ -288,7 +288,7 @@ you don't see the node in your Space after 60 seconds, see the [troubleshooting
288
To connect a node that is running on a macOS environment the script that will be provided to you by Netdata Cloud is the [kickstart](/packaging/installer/methods/macos.md#install-netdata-with-our-automatic-one-line-installation-script) which will install the Netdata Agent on your node, if it isn't already installed, and connect the node to Netdata Cloud. It should be similar to:
289
290
```bash
291
-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
291
+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
292
```
293
The script should return `Agent was successfully claimed.`. If the connecting to Netdata Cloud process returns errors, or if you don't see
294
the node in your Space after 60 seconds, see the [troubleshooting information](#troubleshooting).
@@ -382,10 +382,10 @@ For a successful execution you will need to run the script with root privileges
382
383
#### bash: netdata-claim.sh: command not found
384
385
-If you run the claiming script and see a `command not found` error, you either installed Netdata in a non-standard
386
-location or are using an unsupported package. If you installed Netdata in a non-standard path using the `--install`
387
-option, you need to update your `$PATH` or run `netdata-claim.sh` using the full path. For example, if you installed
388
-Netdata to `/opt/netdata`, use `/opt/netdata/bin/netdata-claim.sh` to run the claiming script.
385
+If you run the claiming script and see a `command not found` error, you either installed Netdata in a
386
+non-standard location or are using an unsupported package. If you installed Netdata in a non-standard path using the
387
+`--install-prefix` option, you need to update your `$PATH` or run `netdata-claim.sh` using the full path. For example,
388
+if you installed Netdata to `/opt/netdata`, use `/opt/netdata/bin/netdata-claim.sh` to run the claiming script.
389
390
If you are using an unsupported package, such as a third-party `.deb`/`.rpm` package provided by your distribution,
391
please remove that package and reinstall using our [recommended kickstart
@@ -538,7 +538,7 @@ wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/
538
**macOS**
539
540
```bash
541
-curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install /usr/local/
541
+curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/
542
```
543
### Claiming script
544
netdata-installer.sh
+1
-10
@@ -163,10 +163,6 @@ banner_nonroot_install() {
163
164
$PROGRAM ${@} --install-prefix /tmp
165
166
- or
167
-
168
- $PROGRAM ${@} --install /tmp
169
-
166
or, run the installer as root:
167
168
sudo $PROGRAM ${@}
@@ -203,8 +199,7 @@ usage() {
199
USAGE: ${PROGRAM} [options]
200
where options include:
201
206
- --install <path> Install netdata in <path>. Ex. --install /opt will put netdata in /opt/netdata, this option is deprecated and will be removed in a future version, please use --install-prefix instead.
207
- --install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata.
202
+ --install-prefix <path> Install netdata in <path>. Ex. --install-prefix /opt will put netdata in /opt/netdata.
203
--dont-start-it Do not (re)start netdata after installation.
204
--dont-wait Run installation in non-interactive mode.
205
--stable-channel Use packages from GitHub release pages instead of nightly updates.
@@ -366,10 +361,6 @@ while [ -n "${1}" ]; do
361
"--build-json-c")
362
NETDATA_BUILD_JSON_C=1
363
;;
369
- "--install")
370
- NETDATA_PREFIX="${2}/netdata"
371
- shift 1
372
- ;;
364
"--install-prefix")
365
NETDATA_PREFIX="${2}/netdata"
366
shift 1
packaging/installer/UNINSTALL.md
+1
-1
@@ -51,7 +51,7 @@ A workflow for uninstallation looks like this:
51
2. If you cannot find that file and would like to uninstall Netdata, then create a new file with the following content:
52
53
```sh
54
-NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install` flag. Otherwise it should be empty
54
+NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install-prefix` flag. Otherwise it should be empty
55
NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running the Netdata process
56
```
57
packaging/installer/UPDATE.md
+2
-2
@@ -45,7 +45,7 @@ command:
45
wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --dry-run
46
```
47
48
-Note that if you installed Netdata using an installation prefix, you will need to add an `--install` option
48
+Note that if you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option
49
specifying that prefix to make sure it finds the existing install.
50
51
If you see a line starting with `--- Would attempt to update existing installation by running the updater script
@@ -61,7 +61,7 @@ In most cases, you can update netdata using our one-line installation script. T
61
run the update script that was installed as part of the initial install (even if you disabled automatic updates)
62
and preserve the existing install options you specified.
63
64
-If you installed Netdata using an installation prefix, you will need to add an `--install` option specifying
64
+If you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying
65
that prefix to this command to make sure it finds Netdata.
66
67
```bash
packaging/installer/kickstart.sh
+1
-7
@@ -183,7 +183,6 @@ USAGE: kickstart.sh [options]
183
--reinstall-even-if-unsafe Even try to reinstall if we don't think we can do so safely (implies --reinstall).
184
--disable-cloud Disable support for Netdata Cloud (default: detect)
185
--require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud.
186
- --install <path> This option is deprecated and will be removed in a future version, use --install-prefix instead.
186
--install-prefix <path> Specify an installation prefix for local builds (default: autodetect based on system type).
187
--old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default).
188
--install-version <version> Specify the version of Netdata to install.
@@ -1046,7 +1045,7 @@ EOF
1045
1046
confirm_install_prefix() {
1047
if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_ONLY_BUILD}" -ne 1 ]; then
1049
- fatal "The --install-prefix and --install options are only supported together with the --build-only option." F0204
1048
+ fatal "The --install-prefix option is only supported together with the --build-only option." F0204
1049
fi
1050
1051
if [ -n "${INSTALL_PREFIX}" ]; then
@@ -2154,11 +2153,6 @@ parse_args() {
2153
NETDATA_DISABLE_TELEMETRY="1"
2154
NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS} --disable-telemetry"
2155
;;
2157
- "--install")
2158
- warning "--install flag is deprecated and will be removed in a future version. Please use --install-prefix instead."
2159
- INSTALL_PREFIX="${2}"
2160
- shift 1
2161
- ;;
2156
"--install-prefix")
2157
INSTALL_PREFIX="${2}"
2158
shift 1
packaging/installer/methods/freebsd.md
+2
-2
@@ -45,7 +45,7 @@ gunzip netdata*.tar.gz && tar xf netdata*.tar && rm -rf netdata*.tar
45
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**):
46
47
```sh
48
-cd netdata-v* && ./netdata-installer.sh --install /opt && cp /opt/netdata/usr/sbin/netdata-claim.sh /usr/sbin/
48
+cd netdata-v* && ./netdata-installer.sh --install-prefix /opt && cp /opt/netdata/usr/sbin/netdata-claim.sh /usr/sbin/
49
```
50
51
You also need to enable the `netdata` service in `/etc/rc.conf`:
@@ -75,7 +75,7 @@ The `netdata-updater.sh` script will update your Agent.
75
## Optional parameters to alter your installation
76
| parameters | Description |
77
|:-----:|-----------|
78
-|`--install <path>`| Install netdata in `<path>.` Ex: `--install /opt` will put netdata in `/opt/netdata`|
78
+|`--install-prefix <path>`| Install netdata in `<path>.` Ex: `--install-prefix /opt` will put netdata in `/opt/netdata`|
79
| `--dont-start-it` | Do not (re)start netdata after installation|
80
| `--dont-wait` | Run installation in non-interactive mode|
81
| `--auto-update` or `-u` | Install netdata-updater in cron to update netdata automatically once per day|
packaging/installer/methods/kickstart.md
-1
@@ -68,7 +68,6 @@ The `kickstart.sh` script accepts a number of optional parameters to control how
68
- `--disable-cloud`: For local builds, don’t build any of the cloud code at all. For native packages and static builds,
69
use runtime configuration to disable cloud support.
70
- `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`.
71
-- `--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.
71
- `--install-prefix`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system).
72
- `--install-version`: Specify the version of Netdata to install.
73
- `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed.
packaging/installer/methods/macos.md
+2
-2
@@ -48,7 +48,7 @@ area](https://learn.netdata.cloud/docs/cloud/spaces#manage-spaces).
48
49
For example:
50
```bash
51
-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
51
+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
52
```
53
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.
54
@@ -93,7 +93,7 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu
93
94
```bash
95
cd netdata/
96
- sudo ./netdata-installer.sh --install /usr/local
96
+ sudo ./netdata-installer.sh --install-prefix /usr/local
97
```
98
99
> Your Netdata configuration directory will be at `/usr/local/netdata/`.
packaging/installer/methods/manual.md
+1
-1
@@ -189,7 +189,7 @@ cd netdata
189
190
- You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds.
191
192
-- 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`.
192
+- 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`.
193
194
- 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`.
195
packaging/makeself/jobs/70-netdata-git.install.sh
+1
-1
@@ -27,7 +27,7 @@ export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig"
27
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"
28
29
run ./netdata-installer.sh \
30
- --install "${NETDATA_INSTALL_PARENT}" \
30
+ --install-prefix "${NETDATA_INSTALL_PARENT}" \
31
--dont-wait \
32
--dont-start-it \
33
--require-cloud \
tests/lifecycle.bats
+1
-1
@@ -34,7 +34,7 @@ setup() {
34
}
35
36
@test "install netdata" {
37
- ./netdata-installer.sh --dont-wait --dont-start-it --auto-update --install "${INSTALLATION}"
37
+ ./netdata-installer.sh --dont-wait --dont-start-it --auto-update --install-prefix "${INSTALLATION}"
38
39
# Validate particular files
40
for file in $FILES; do
tests/run-unit-tests.sh
+1
-1
@@ -21,7 +21,7 @@
21
install_netdata() {
22
echo "Installing Netdata"
23
fakeroot ./netdata-installer.sh \
24
- --install "$HOME" \
24
+ --install-prefix "$HOME" \
25
--dont-wait \
26
--dont-start-it \
27
--enable-plugin-nfacct \
tests/updater_checks.bats
+1
-1
@@ -34,7 +34,7 @@ setup() {
34
}
35
36
@test "install stable netdata using kickstart" {
37
- ./packaging/installer/kickstart.sh --dont-wait --dont-start-it --auto-update --install ${INSTALLATION}
37
+ ./packaging/installer/kickstart.sh --dont-wait --dont-start-it --auto-update --install-prefix ${INSTALLATION}
38
39
# Validate particular files
40
for file in $FILES; do