Skip to content

Commit

Permalink
doc: consolidate upgrade steps with install (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss authored Jan 3, 2024
1 parent 9aa0ea8 commit 49e6adc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 42 deletions.
50 changes: 42 additions & 8 deletions docs/install/native.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 <existing harvest directory>
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.
42 changes: 32 additions & 10 deletions docs/install/package-managers.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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-<RELEASE>.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-<RELEASE>.amd64.deb
sudo apt upgrade ./harvest-<RELEASE>.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
Expand All @@ -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
24 changes: 0 additions & 24 deletions docs/upgrade.md

This file was deleted.

0 comments on commit 49e6adc

Please sign in to comment.