From 49e6adcee84892c3101dd6c58537072c4adaa98b Mon Sep 17 00:00:00 2001 From: Rahul Date: Wed, 3 Jan 2024 13:41:35 +0530 Subject: [PATCH] doc: consolidate upgrade steps with install (#2567) --- docs/install/native.md | 50 +++++++++++++++++++++++++++----- docs/install/package-managers.md | 42 ++++++++++++++++++++------- docs/upgrade.md | 24 --------------- 3 files changed, 74 insertions(+), 42 deletions(-) delete mode 100644 docs/upgrade.md diff --git a/docs/install/native.md b/docs/install/native.md index fff5e47c4..40ed5b86a 100644 --- a/docs/install/native.md +++ b/docs/install/native.md @@ -1,11 +1,13 @@ -## Native +## Installation -Visit the [Releases page](https://github.com/NetApp/harvest/releases) and copy the `tar.gz` link -for the latest release. For example, to download the `v22.08.0` release: -``` -wget https://github.com/NetApp/harvest/releases/download/v22.08.0/harvest-22.08.0-1_linux_amd64.tar.gz -tar -xvf harvest-22.08.0-1_linux_amd64.tar.gz -cd harvest-22.08.0-1_linux_amd64 +Visit the [Releases page](https://github.com/NetApp/harvest/releases) and copy the `tar.gz` link +for the latest release. For example, to download the `23.08.0` release: + +```bash +VERSION=23.08.0 +wget https://github.com/NetApp/harvest/releases/download/v${VERSION}/harvest-${VERSION}-1_linux_amd64.tar.gz +tar -xvf harvest-${VERSION}-1_linux_amd64.tar.gz +cd harvest-${VERSION}-1_linux_amd64 # Run Harvest with the default unix localhost collector bin/harvest start @@ -19,8 +21,40 @@ bin/harvest start curl -L -O https://github.com/NetApp/harvest/releases/download/v22.08.0/harvest-22.08.0-1_linux_amd64.tar.gz ``` +## Upgrade + +Stop Harvest: +``` +cd +bin/harvest stop +``` + +Verify that all pollers have stopped: +``` +bin/harvest status +or +pgrep --full '\-\-poller' # should return nothing if all pollers are stopped +``` + +Download the latest release and extract it to a new directory. For example, to upgrade to the 23.11.0 release: + +```bash +VERSION=23.11.0 +wget https://github.com/NetApp/harvest/releases/download/v${VERSION}/harvest-${VERSION}-1_linux_amd64.tar.gz +tar -xvf harvest-${VERSION}-1_linux_amd64.tar.gz +cd harvest-${VERSION}-1_linux_amd64 +``` + +Copy your old `harvest.yml` into the new install directory: +``` +cp /path/to/old/harvest/harvest.yml /path/to/new/harvest/harvest.yml +``` + +After upgrade, re-import all dashboards (either `bin/harvest grafana import` cli or via the Grafana UI) to +get any new enhancements in dashboards. For more details, see the [dashboards documentation](../dashboards.md). + It's best to run Harvest as a non-root user. Make sure the user running Harvest can write to `/var/log/harvest/` or tell Harvest to write the logs somewhere else with the `HARVEST_LOGS` environment variable. If something goes wrong, examine the logs files in `/var/log/harvest`, check out the [troubleshooting](https://github.com/NetApp/harvest/wiki/Troubleshooting-Harvest) section on the wiki and jump -onto [Discord](https://github.com/NetApp/harvest/blob/main/SUPPORT.md#getting-help) and ask for help. +onto [Discord](https://github.com/NetApp/harvest/blob/main/SUPPORT.md#getting-help) and ask for help. \ No newline at end of file diff --git a/docs/install/package-managers.md b/docs/install/package-managers.md index 32ac91af8..48ac67f79 100644 --- a/docs/install/package-managers.md +++ b/docs/install/package-managers.md @@ -1,22 +1,32 @@ - ## Redhat > Installation and upgrade of the Harvest package may require root or administrator privileges +### Installation + Download the latest rpm of [Harvest](https://github.com/NetApp/harvest/releases/latest) from the releases -tab and install or upgrade with yum. +tab and install with yum. -``` +```bash sudo yum install harvest.XXX.rpm ``` -Once the installation has finished, edit the [harvest.yml configuration](../configure-harvest-basic.md) file +### Upgrade + +Download the latest rpm of [Harvest](https://github.com/NetApp/harvest/releases/latest) from the releases +tab and upgrade with yum. + +```bash +sudo yum upgrade harvest.XXX.rpm +``` + +Once the installation or upgrade has finished, edit the [harvest.yml configuration](../configure-harvest-basic.md) file located in `/opt/harvest/harvest.yml` After editing `/opt/harvest/harvest.yml`, manage Harvest with `systemctl start|stop|restart harvest`. After upgrade, re-import all dashboards (either `bin/harvest grafana import` cli or via the Grafana UI) to -get any new enhancements in dashboards. +get any new enhancements in dashboards. For more details, see the [dashboards documentation](../dashboards.md). > To ensure that you don't run > into [permission issues](https://github.com/NetApp/harvest/issues/122#issuecomment-856138831), make sure you manage @@ -32,21 +42,33 @@ get any new enhancements in dashboards. > Installation and upgrade of the Harvest package may require root or administrator privileges +### Installation + Download the latest deb of [Harvest](https://github.com/NetApp/harvest/releases/latest) from the releases -tab and install or upgrade with apt. +tab and install with apt. +```bash +sudo apt update +sudo apt install ./harvest-.amd64.deb ``` + +### Upgrade + +Download the latest deb of [Harvest](https://github.com/NetApp/harvest/releases/latest) from the releases +tab and upgrade with apt. + +```bash sudo apt update -sudo apt install|upgrade ./harvest-.amd64.deb +sudo apt upgrade ./harvest-.amd64.deb ``` -Once the installation has finished, edit the [harvest.yml configuration](../configure-harvest-basic.md) file +Once the installation or upgrade has finished, edit the [harvest.yml configuration](../configure-harvest-basic.md) file located in `/opt/harvest/harvest.yml` After editing `/opt/harvest/harvest.yml`, manage Harvest with `systemctl start|stop|restart harvest`. After upgrade, re-import all dashboards (either `bin/harvest grafana import` cli or via the Grafana UI) to -get any new enhancements in dashboards. +get any new enhancements in dashboards. For more details, see the [dashboards documentation](../dashboards.md). > To ensure that you don't run > into [permission issues](https://github.com/NetApp/harvest/issues/122#issuecomment-856138831), make sure you manage @@ -56,4 +78,4 @@ get any new enhancements in dashboards. * Directories `/var/log/harvest/` and `/var/log/run/` are created * A `harvest` user and group are created and the installed files are chowned to harvest - * Systemd `/etc/systemd/system/harvest.service` file is created and enabled + * Systemd `/etc/systemd/system/harvest.service` file is created and enabled \ No newline at end of file diff --git a/docs/upgrade.md b/docs/upgrade.md deleted file mode 100644 index cf8acdaf9..000000000 --- a/docs/upgrade.md +++ /dev/null @@ -1,24 +0,0 @@ -To upgrade Harvest - -Stop harvest -``` -cd -bin/harvest stop -``` - -Verify that all pollers have stopped: -``` -bin/harvest status -or -pgrep --full '\-\-poller' # should return nothing if all pollers are stopped -``` - -Follow the [installation](install/overview.md) instructions to download and install Harvest and then -copy your old `harvest.yml` into the new install directory like so: - -``` -cp /path/to/old/harvest/harvest.yml /path/to/new/harvest.yml -``` - -After upgrade, re-import all dashboards (either `bin/harvest grafana import` cli or via the Grafana UI) to -get any new enhancements in dashboards.