Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readthedocs config and add installation docs #3436

Merged
merged 5 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/Agent/installation/Ansible_based_installation.md

This file was deleted.

37 changes: 37 additions & 0 deletions docs/Agent/installation/ansible_based_installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ansible based installation

In the following: we describe how to install Pbench Agent using an ANSIBLE playbook.

:::{note}
The same Pbench Agent version must be installed on all the test systems that participate in a benchmark run, there is no support for mixed installations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comma should be a colon or m-dash (or period).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sufficiently specific...my apologies, @vishalvvr!

The comma at line 3 was fine; it's line 6 which needs the change. (Please change line 3 back.... 😊)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 3: remove the colon, and possibly remove the "In the following" phrase, since it's kind of obvious. If the result doesn't read well, try something like "This document describes" (which allows us to escape using the first-person pronoun).

Line 6: the comma should be replaced by a colon or m-dash (or period).

:::

## Setup

1. Make sure that you have the ANSIBLE package installed.

2. Install the `pbench.agent` ANSIBLE collection from Ansible Galaxy.

```console
ansible-galaxy collection install pbench.agent
```

3. Tell ansible where to find these roles.
Comment on lines +13 to +19
Copy link
Member

@webbnh webbnh Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 19 still references "ansible" with a spelling different from that used in lines 13, 11, and 3.


```console
export ANSIBLE_ROLES_PATH=$HOME/.ansible/collections/ansible_collections/pbench/agent/roles:$ANSIBLE_ROLES_PATH
```

4. Create an inventory file (`~/.config/Inventory/myhosts.inv`) naming the hosts on which you wish to install Pbench Agent and the location of the config file. Example [inventory file](assets/myhosts.inv).

:::{note}
if you're planning to push performance data to a 0.69 Pbench Server, you need to specify the server's private RSA key. Example [inventory file](assets/0.69_myhosts.inv).
:::

5. Use the [example playbook](https://github.com/distributed-system-analysis/pbench/blob/main/agent/ansible/playbooks/pbench_agent_install.yml) or reference it to customize your own.

6. Run the playbook.

```console
ansible-playbook -i ~/.config/Inventory/myhosts.inv pbench_agent_install.yml
```
11 changes: 11 additions & 0 deletions docs/Agent/installation/assets/0.69_myhosts.inv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[servers]
<host1>
<host2>
<host3>

[servers:vars]
# where to get the key
pbench_key_url = <url>

# where to get the config file
pbench_config_url = <url>
8 changes: 8 additions & 0 deletions docs/Agent/installation/assets/myhosts.inv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[servers]
<host1>
<host2>
<host3>

[servers:vars]
# where to get the config file
pbench_config_url = <url>
2 changes: 1 addition & 1 deletion docs/Agent/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Choose any one of the following approaches to setup `Pbench Agent`

pbench-containers
rpm_based_installation
Ansible_based_installation
ansible_based_installation

25 changes: 23 additions & 2 deletions docs/Agent/installation/pbench-containers.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# Pbench containers

# Pbench Agent Container

Pbench Agent is available as container images on [Quay.io](https://quay.io/organization/pbench). This makes Pbench Agent a distro-independent solution and it could also be used in any containerized ecosystem.

**Want to build container images from sources?**
Follow [README](https://github.com/distributed-system-analysis/pbench/blob/main/agent/containers/images/README.md)

Running Pbench Agent container is as simple as
```console
podman run quay.io/pbench/pbench-agent-all-centos-8
```
Depending on the use cases one has to run these containers with privileged mode, host network, pid, ipc, mount required volumes, etc.

Example:
```console
podman run --name pbench --rm -ti --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=pbench -e IMAGE=quay.io/pbench/pbench-agent-all-centos-8 -v /run:/run -v /var/log:/var/log -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -v /:/host quay.io/pbench/pbench-agent-all-centos-8
```

:::{note}
The volumes and config shown in the command snippet above may vary depending on users needs.
:::

Possibilities are endless, please give it a try <https://quay.io/organization/pbench>.
42 changes: 42 additions & 0 deletions docs/Agent/installation/rpm_based_installation.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# RPM based installation

The Pbench Agent requires the installation of some generic bits, but it also
requires some localization. It needs to know where to send the results for
storage and analysis, and it needs to be able to authenticate to the results
server.

The generic bits are packaged as an RPM, available from
[COPR](https://copr.fedorainfracloud.org/coprs/ndokos).
Pbench Agent is built for all major releases of
Fedora, RHEL, CentOS and openSUSE.

In the following, we describe how to install Pbench Agent using an RPM.

## Setup

1. Enable required repos.

```console
dnf copr enable ndokos/pbench-0.72
dnf copr enable ndokos/pbench
```

:::{note}
- We release Pbench Agent RPMs under the `ndokos` COPR account with repos following the pattern `pbench-<release>`.
- There are some RPMs that are shared between versions (e.g. pbench-sysstat). We maintain those in [ndokos/pbench](https://copr.fedorainfracloud.org/coprs/ndokos/pbench) repo.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the earlier discussion, we should probably omit the hyperlink here. (If you want the user to be able to browse, we should direct them to the ndokos account page rather to any specific "project" under it; in terms of finding specific packages, that will be handled automagically one the user enables the repo using the DNF copr pluging, so the reader doesn't need the hyperlink for that.)

This text would read better if you inserted the word "the" before "nodokos".

I would put ndokos/pbench in monospace font.

- On a RHEL-based system enable the subscription manager and enable the `EPEL` repo.
:::

2. Install Pbench Agent package

```console
dnf install pbench-agent
```

3. Restart terminal/shell session so that all environment varibales and PATH variables are updated

or

```console
source /etc/profile.d/pbench-agent.sh
```

3 changes: 2 additions & 1 deletion docs/Agent/user-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ User Guide

getting_started
UserGuide
man_page
man_page
guides/end-to-end-workflow
16 changes: 12 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ Pbench website is hosted on gh-pages and readthedocs pages(`/docs`) are also hos

## Readthedocs setup

`$ pip3 install -r requirement.txt`
`$ make clean`
`$ make html`
> **Note:** Above command will build your readthedocs page in `_build/html` dir.
```console
$ pip3 install -r requirements.txt
$ make clean
$ make html
```

> **Note:** Above command will build your static readthedocs page/website in `_build/html` dir.

## Some important links

- [online markdown editor](https://pandao.github.io/editor.md/en.html)
- [myst-parser](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html) is a plugin used to build our markdown documentation.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"sphinx.ext.autosectionlabel",
"sphinx_design",
"myst_parser",
"sphinx_copybutton",
Comment on lines 43 to +46
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to keep these entries in order.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These still need to be ordered, e.g.

    "myst_parser",
    "sphinx.ext.autosectionlabel",
    "sphinx_copybutton",
    "sphinx_design",

]

# Add any paths that contain templates here, relative to this directory.
Expand Down
6 changes: 4 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sphinx-design
myst-parser
sphinx-copybutton
sphinx-rtd-theme
myst-parser
sphinx-design