Skip to content

Commit

Permalink
VFS-11182 Applied auto-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kliput committed Jul 19, 2023
1 parent 5600d65 commit 6bb08e1
Show file tree
Hide file tree
Showing 48 changed files with 1,515 additions and 1,375 deletions.
5 changes: 3 additions & 2 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export default {
module.exports = {
"settings": {
bullet: "*",
listItemIndent: "one"
listItemIndent: "one",
fences: true,
},
"plugins": {
"remark-preset-lint-recommended": true,
Expand Down
68 changes: 37 additions & 31 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,62 @@
# Guidelines
Unified guidelines for writing and formatting the Onedata documentation.

Unified guidelines for writing and formatting the Onedata documentation.

## TODO
* VFS-9738 carry on with more guidelines and adjust the existing docs so that they comply.

* VFS-9738 carry on with more guidelines and adjust the existing docs so that they comply.

## Source file structure

The source files reside in `./docs/` and the images reside in `./images/`,
with the mirrored directory structure (image path should correspond to
the markdown source path where it is used - see below).

To add a new page:
- create a new .md file, placing it in a sensible location in the structure,

* create a new .md file, placing it in a sensible location in the structure,
e.g. `./docs/admin-guide/onezone/installation.md`,
- add appropriate entry in `./docs/.vuepress/config.js`, in the
* add appropriate entry in `./docs/.vuepress/config.js`, in the
`sidebar` object.

To add an image:
- place the image to be referenced by an .md file in its corresponding directory,

* place the image to be referenced by an .md file in its corresponding directory,
i.e. for the above-mentioned page, it would be:
`./images/admin-guide/onezone/installation/first-step.png`,
- embed the image into the Markdown page:
```
* embed the image into the Markdown page:
![image](../../../images/admin-guide/onezone/installation/first-step.png)
```


## Writing tone
* Always use second person and imperative mood to address the user. Don't be
overly polite (avoid using `please` when giving commands).

:white_check_mark: To upload a file, click on the corresponding button in the top toolbar.
* Always use second person and imperative mood to address the user. Don't be
overly polite (avoid using `please` when giving commands).

:white\_check\_mark: To upload a file, click on the corresponding button in the top toolbar.

:x: Files can be uploaded by clicking on the corresponding button in the top toolbar.
:white_check_mark: You can find the transfer statistics below.

:white\_check\_mark: You can find the transfer statistics below.

:x: The transfer statistics can be found below.

:white_check_mark: For more information, see this chapter.
:white\_check\_mark: For more information, see this chapter.

:x: For more information, please see this chapter.

:white_check_mark: Note that the log size can get substantial.
:white\_check\_mark: Note that the log size can get substantial.

:x: Please note that the log size can get substantial.


## Code style

### General

* Do not exceed 80-120 characters per line, unless really necessary (e.g. with
long links or tables).

### Enumeration & itemization

```
* Use only the wildcard (`*`) character for bullet points — do not use the hyphen (`-`).
Expand All @@ -65,10 +67,12 @@ To add an image:
```

### Code blocks

Use the three backticks notation to create a multi-line code block. Whenever
possible, specify the language for nice syntax highlighting. More tips and the
list of supported languages can be found in the
list of supported languages can be found in the
[Vuepress docs](https://v1.vuepress.vuejs.org/guide/markdown.html#syntax-highlighting-in-code-blocks).

````
```js
export default {
Expand All @@ -79,7 +83,8 @@ export default {
````

### Custom blocks/containers
Avoid using the default markdown blockquotes, but use the

Avoid using the default markdown blockquotes, but use the
[Vuepress custom containers](https://v1.vuepress.vuejs.org/guide/markdown.html#custom-containers).

````
Expand All @@ -106,27 +111,30 @@ console.log('Hello, VuePress!')
:::
````


## Links & references

Below are some examples how a link or reference can be introduced:

* `For more information about X, refer to [this page](path/to/file.md#section).`
* `For more information about X, see the [Y](path/to/file.md#section) section/chapter.`
* `See [this](path/to/file.md#section) chapter for more details.`


## Technicalities

* Use the hyphen (`-`), en dash (``) and em dash (``) characters appropriately.

The hyphen (`-`) is used for compound terms and word division.
The hyphen (`-`) is used for compound terms and word division.

> Onedata is a state-of-the-art system.
The en dash (``) is used for ranges, scores and conflict, connection, or direction:

> The years 2021–2022 brought rapid improvement of the POSIX–CEPH transfer performance.
The em dash (``) is a versatile punctuation mark that can take the place of
The em dash (``) is a versatile punctuation mark that can take the place of
commas, parentheses, or colons, depending on the context. Always put a space
before and after the em dash.

> Authentication is carried by access tokens — bearer tokens that allow acting
> on behalf of the token subject.
Expand All @@ -141,24 +149,22 @@ Below are some examples how a link or reference can be introduced:
> You may choose between the supporting providers in the top menu.
> The data is distributed between three providers.
> As an admin, you should install the Oneprovider cluster to expose your storage system via Onedata.
> As an admin, you should install the Oneprovider cluster to expose your storage system via Onedata.
## Screenshots

* Crop as much as possible; leave just enough context so that the user can
locate the region of interest in GUI, but focus on the discussed feature.

* When taking screenshots, use browser zoom to get better quality images.
Satisfying zoom level depends on the screenshot region size, but quite often
is about 125% for a 1920x1080 window. Verify the quality of screenshots
in the docs preview; if the image is not clear, try different zoom levels.

* Always add the `screenshot` class to all screenshots:
```
![image](../../images/user-guide/spaces/1-no_spaces.png#screenshot)
```

`![image](../../images/user-guide/spaces/1-no_spaces.png#screenshot)`

## Custom routes

Can be placed in `./docs/.vuepress/enhanceApp.js`.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

This documentation is built using [VuePress](https://vuepress.vuejs.org).


## Guidelines
All docs should be edited and formatted in compliance with the [guidelines](GUIDELINES.md).

All docs should be edited and formatted in compliance with the [guidelines](GUIDELINES.md).

## Building and developing

* `make build` builds the documentation using a docker.
* `make dev` prepares a local preview with livereload using a docker, allowing
convenient development. The livereload might not cope with some structural
* `make dev` prepares a local preview with livereload using a docker, allowing
convenient development. The livereload might not cope with some structural
changes, in such case the command must be re-run. `Ctrl-C` interrupts the preview.
Note that in this mode, the `RELEASE` version is not injected, only the
placeholders are visible, as opposed to the `make preview` target.
* `make preview` starts a simple HTTP server in python that serves the docs
statically, giving a preview of what's in the build artifact.


## Versioning
The current Onedata version to which the docs correspond is placed in the
`RELEASE` file and injected into the docs using the `./inject-release.sh`
script during the build.

The current Onedata version to which the docs correspond is placed in the
`RELEASE` file and injected into the docs using the `./inject-release.sh`
script during the build.

## Build artifact

After a successful build, the static HTML files are placed in `docs/.vuepress/dist`.
Calling `make package` will pack it up into a tarball.
2 changes: 2 additions & 0 deletions cspell-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ mybackups
oneclient
onepanel
oneprovider
oneproviders
onezone
vuepress
xattrs
33 changes: 17 additions & 16 deletions docs/admin-guide/oneprovider/configuration/auto-cleaning.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
# Auto-cleaning

As a prerequisite for understanding this chapter, we advise to familiarize with
As a prerequisite for understanding this chapter, we advise to familiarize with
the mechanism of [*file popularity*](file-popularity.md).

The purpose of the *auto-cleaning* mechanism is to automatically maintain storage usage at a certain
The purpose of the *auto-cleaning* mechanism is to automatically maintain storage usage at a certain
level and ensure that there is enough space for new replicas when performing continuous computations.
The mechanism uses the statistics collected by the
The mechanism uses the statistics collected by the
[*file popularity*](file-popularity.md) to determine
the least popular file replicas and evict them.
The process is safe — only redundant replicas (duplicated on remote providers) are evicted.
Eviction of replicas is coordinated among providers using a custom algorithm.
It ensures that there is no risk of data loss, even in case of simultaneous requests for deletion of replicas of
It ensures that there is no risk of data loss, even in case of simultaneous requests for deletion of replicas of
the same file.

Each auto-cleaning run produces a report, which shows the number of removed replicas and the amount of released
Each auto-cleaning run produces a report, which shows the number of removed replicas and the amount of released
storage space.

## Basic setup

The mechanism can be enabled in the space configuration tab in Oneprovider panel.

> *NOTE:*
> The [*file popularity*](file-popularity.md) mechanism must be enabled to turn *auto-cleaning* on.
> *NOTE:*
> The [*file popularity*](file-popularity.md) mechanism must be enabled to turn *auto-cleaning* on.
> Disabling [*file popularity*](file-popularity.md) disables *auto-cleaning* as well.
The user interface allows specifying **low** and **high** thresholds,
corresponding to the amount of data stored on the local storage supporting given space:
* **high threshold** — when exceeded, an auto-cleaning run is triggered to evict redundant replicas.
* **low threshold** — when reached, the current auto-cleaning run is stopped.

The thresholds can be adjusted in the
* **high threshold** — when exceeded, an auto-cleaning run is triggered to evict redundant replicas.
* **low threshold** — when reached, the current auto-cleaning run is stopped.

The thresholds can be adjusted in the
`Spaces -> "Space Name" -> Auto-cleaning` tab, in the Spaces menu of Oneprovider panel GUI (as shown below)
or using [REST API](#rest-api).
or using [REST API](#rest-api).

![Auto-cleaning configuration tab](../../../../images/admin-guide/oneprovider/configuration/auto-cleaning/auto_cleaning_tab.png#screenshot)


## Selective rules

It is possible to filter the list of files obtained from the
It is possible to filter the list of files obtained from the
[*file popularity*](file-popularity.md) by enabling *selective rules*.

There are six rules for which ranges might be provided:

* `maxOpenCount` — Files that have been opened not more than `maxOpenCount` times may be cleaned.
The default value is `9007199254740991 (2^53-1)`.
* `minHoursSinceLastOpen` — Files that have been closed at least this many hours ago may be cleaned.
Expand All @@ -54,13 +55,13 @@ There are six rules for which ranges might be provided:
count per hour not greater than given value may be cleaned. The average is calculated
in 24 hours window. The default value is `9007199254740991 (2^53-1)`.
* `maxDailyMovingAverage` — Files that have moving average of open operations
count per day not greater than given value may be cleaned. The average is calculated in
count per day not greater than given value may be cleaned. The average is calculated in
30 days window. The default value is `9007199254740991 (2^53-1)`.
* `maxMonthlyMovingAverage` — Files that have moving average of open operations
count per month not greater than given value may be cleaned. The average is calculated
in 12 months window. The default value is `9007199254740991 (2^53-1)`.

Disabled rules are ignored. A file replica must satisfy all enabled rules to be evicted.
Disabled rules are ignored. A file replica must satisfy all enabled rules to be evicted.

## Starting run on demand

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Cluster nodes

<!-- @TODO VFS-7218 missing chapter -->
<!-- @TODO VFS-7218 missing chapter -->
2 changes: 1 addition & 1 deletion docs/admin-guide/oneprovider/configuration/dns-config.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DNS config

<!-- @TODO VFS-7218 missing chapter -->
<!-- @TODO VFS-7218 missing chapter -->
Loading

0 comments on commit 6bb08e1

Please sign in to comment.