Skip to content
Merged
Changes from 12 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
186 changes: 73 additions & 113 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,174 +1,134 @@
# Contributing guide
# Contributing Guide

Check warning on line 1 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L1

[Google.Headings] 'Contributing Guide' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Contributing Guide' should use sentence-style capitalization.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 1, "column": 3}}}, "severity": "WARNING"}

Welcome to Percona Link for MongoDB documentation!
Welcome to Percona ClusterSync for MongoDB (PCSM) documentation!

Check notice on line 3 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L3

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 3, "column": 44}}}, "severity": "INFO"}

Check notice on line 3 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L3

[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 3, "column": 45}}}, "severity": "INFO"}

Check failure on line 3 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L3

[Google.Exclamation] Don't use exclamation points in text.
Raw output
{"message": "[Google.Exclamation] Don't use exclamation points in text.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 3, "column": 51}}}, "severity": "ERROR"}

We're glad that you would like to become a Percona community member and participate in keeping open source open.
We're glad that you would like to become a Percona community member and help keep open source open.

Check warning on line 5 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L5

[Google.We] Try to avoid using first-person plural like 'We'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'We'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 5, "column": 1}}}, "severity": "WARNING"}

Percona Link for MongoDB is a tool for replicating data from a source MongoDB cluster to a target MongoDB cluster. It supports cloning data, replicating changes, and managing collections and indexes.
Percona ClusterSync for MongoDB is a tool for replicating data from a source MongoDB cluster to a target MongoDB cluster. It supports cloning data, replicating changes, and managing collections and indexes.

This repository contains the source file for PLM documentation and this document explains how you can contribute to it.
This repository contains the source file for PCSM documentation, and this document explains how you can contribute to it.

Check notice on line 9 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L9

[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 9, "column": 46}}}, "severity": "INFO"}

If you'd like to submit a PLM code patch, follow the [Contributing section in PLM's code repository](https://github.com/percona/percona-link-mongodb/blob/main/README.md#contributing).
If you'd like to submit a PCSM code patch, follow the [Contributing section in PCSM's code repository](https://github.com/percona/percona-clustersync-mongodb/blob/main/README.md#contributing).

Check notice on line 11 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L11

[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 11, "column": 27}}}, "severity": "INFO"}

Check notice on line 11 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L11

[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'PCSM', if it's unfamiliar to the audience.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 11, "column": 80}}}, "severity": "INFO"}

## Contributing to documentation

Percona Backup for MongoDB documentation is written in [Markdown] language, so you can
[edit it online via GitHub](#edit-documentation-online-via-github). If you wish to have more control over the doc process, jump to how to [edit documentation locally](#edit-documentation-locally).
We welcome contributions from all users and the community. By contributing, you agree to the [Percona Community code of conduct](https://percona.community/contribute/coc/). Thank you for deciding to contribute and help us improve the Percona ClusterSync for MongoDB documentation.

Check warning on line 15 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L15

[Google.We] Try to avoid using first-person plural like 'We'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'We'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 15, "column": 1}}}, "severity": "WARNING"}

Check warning on line 15 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L15

[Google.We] Try to avoid using first-person plural like 'us'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 15, "column": 220}}}, "severity": "WARNING"}

Before you start, learn what [git], [MkDocs] and [Docker] are and what [Markdown] is and how to write it. For your convenience, there's also a cheat sheet to help you with the syntax.
You can contribute to the documentation in the following ways:

The doc files are in the `docs` directory.
### Rate and comment on documentation pages

### Edit documentation online via GitHub
Each documentation page includes a Rate this page feature at the bottom that allows you to assign stars (1-5) and leave comments. This is a quick and easy way to provide feedback about the documentation.

Check notice on line 21 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L21

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 21, "column": 105}}}, "severity": "INFO"}

1. Click the <img src="_resource/.icons/edit_page.png" width="20px" height="20px"/> **Edit this page** icon next to the page title. The source `.md` file of the page opens in GitHub editor in your browser. If you haven’t worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.
To rate a page:

2. Edit the page. You can check your changes on the **Preview** tab.
1. Use the star rating system to rate the page (1-5 stars).

Check notice on line 25 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L25

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 25, "column": 48}}}, "severity": "INFO"}

3. Commit your changes.
2. Leave a comment describing your feedback.

- In the *Commit changes* section, describe your changes.
- Select the **Create a new branch for this commit and start a pull request** option
- Click **Propose changes**.
>[!Important]
Help us improve the documentation faster by leaving clear and detailed comments. This helps us understand the issue and address it more efficiently.

Check warning on line 30 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L30

[Google.We] Try to avoid using first-person plural like 'us'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 30, "column": 6}}}, "severity": "WARNING"}

Check warning on line 30 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L30

[Google.We] Try to avoid using first-person plural like 'us'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 30, "column": 93}}}, "severity": "WARNING"}

4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button.
5. Someone from our team reviews the pull request and if everything is correct, merges it into the documentation. Then it gets published on the site.
Brief comments like “this is confusing” or “needs improvement” are helpful, but sharing a bit more context allows us to take the most appropriate action.

Check warning on line 32 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L32

[Google.We] Try to avoid using first-person plural like 'us'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 32, "column": 115}}}, "severity": "WARNING"}

### Edit documentation locally
Please include:
* What issue did you encounter, or what improvement would you like to see
* Which section or topic needs clarification or correction
* Any specific examples or use cases that would help
* The version or environment you're using (if relevant)

Check notice on line 38 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L38

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 38, "column": 43}}}, "severity": "INFO"}
* Steps to reproduce any issues you found

This option is for users who prefer to work from their computer and / or have the full control over the documentation process.
### Add a topic in the Percona Community Forum

Check warning on line 41 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L41

[Google.Headings] 'Add a topic in the Percona Community Forum' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Add a topic in the Percona Community Forum' should use sentence-style capitalization.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 41, "column": 5}}}, "severity": "WARNING"}
The [Percona Community Forum](https://forums.percona.com/) is a public discussion platform where you can ask questions, share feedback, or suggest improvements to the documentation. Use the forum to start a conversation about documentation issues, request clarifications, or discuss potential changes with the community and documentation team.

The steps are the following:

1. Fork this repository
2. Clone the repository on your machine:

```sh
git clone [email protected]:<your_name>/plm-docs.git
```
To add a topic, navigate to the [Percona Product Documentation category](https://forums.percona.com/c/percona-product-documentation/71) in the Percona Community Forum and select **New Topic**. Complete the form and select **Create Topic** to add the topic to the forum.

3. Change the directory to ``pbm-docs`` and add the remote upstream repository:

```sh
git remote add upstream [email protected]:percona/plm-docs.git
```
### Request a change with a Jira issue

4. Pull the latest changes from upstream
Create a Jira ticket to report documentation issues or request changes. This method is useful for formal tracking or when you want the documentation team to handle the changes.

```sh
git fetch upstream
git merge upstream/main
```
1. Open the [Percona Server Jira project](https://jira.percona.com/projects/PCSM/issues) in your browser.

5. Create a separate branch for your changes
2. Sign in (or create a Percona Jira account if you don't have one).

```sh
git checkout -b <my_branch>
```
3. Click the **Create** button.

6. Make changes. See the [Repository structure](#repository-structure) to for details what files this repo contains and their purpose.
7. Check your changes. Some editors (Sublime Text, VSCode and others) have the Markdown preview which you can use to check how the page is rendered. Alternatively, you can [build the documentation](#building-the-documentation) to know exactly how the documentation looks on the web site.
8. Commit your changes. The [commit message guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53) will help you with writing great commit messages
4. Fill in the required fields:

9. Open a pull request to Percona
* **Summary**: Provide a brief description of the issue.

### Building the documentation
* **Description**: Provide more information about the issue. If needed, add a Steps To Reproduce section and information about your environment (version number, your operating system, etc.). Be detailed.

Check notice on line 61 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L61

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 61, "column": 146}}}, "severity": "INFO"}

Check notice on line 61 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L61

[Google.Passive] In general, use active voice instead of passive voice ('Be detailed').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('Be detailed').", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 61, "column": 193}}}, "severity": "INFO"}

To verify how your changes look, generate the static site with the documentation. This process is called *building*. You can do it in these ways:
* **Version**, **Environment**, and other relevant fields as needed.

- [Use Docker](#use-docker)
- [Install MkDocs and build locally](#install-sphinx-and-build-locally)
5. Click **Create** to submit the ticket.

#### Use Docker
To go directly to the Create Issue form, use this URL: [https://jira.percona.com/secure/CreateIssue!default.jspa?pid=10100](https://jira.percona.com/secure/CreateIssue!default.jspa?pid=10100)

1. [Get Docker](https://docs.docker.com/get-docker/)
2. We use [our Docker image](https://hub.docker.com/repository/docker/perconalab/pmm-doc-md) to build documentation. Run the following command:
### Edit the documentation yourself

```sh
docker run --rm -v $(pwd):/docs perconalab/pmm-doc-md mkdocs build
```
If Docker can't find the image locally, it first downloads the image, and then runs it to build the documentation.
Percona ClusterSync for MongoDB documentation is written in [Markdown](https://www.markdownguide.org/) language, so you can

Check notice on line 71 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L71

[Google.Passive] In general, use active voice instead of passive voice ('is written').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is written').", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 71, "column": 47}}}, "severity": "INFO"}
[edit it online via GitHub](#edit-documentation-online-via-github). If you wish to have more control over the doc process, jump to how to [edit documentation locally](#edit-documentation-locally).

3. Go to the ``site`` directory and open the ``index.html`` file to see the documentation.
Before you start, learn what git, MkDocs, and Markdown are, and how to write them. For your convenience, a cheat sheet is also available to assist you with the syntax.

If you want to see the changes as you edit the docs, use this command instead:
The doc files are in the `docs` directory.

```sh
docker run --rm -v $(pwd):/docs -p 8000:8000 perconalab/pmm-doc-md mkdocs serve --dev-addr=0.0.0.0:8000
```
#### Edit documentation online via GitHub

Wait until you see `INFO - Start detecting changes`, then enter `0.0.0.0:8000` in the browser's address bar. The documentation automatically reloads after you save the changes in source files.
1. Click the **Edit this page** icon next to the page title. The source `.md` file of the page opens in GitHub editor in your browser. If you haven’t worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.

#### Install MkDocs and build locally
2. Edit the page. You can check your changes on the **Preview** tab.

1. Install [Python].
3. Commit your changes.

2. Install MkDocs and required extensions:
- In the **Commit changes** section, describe your changes.
- Select the **Create a new branch for this commit and start a pull request** option
- Click **Propose changes**.

```sh
pip install -r requirements.txt
```
4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message, and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button.

Check failure on line 90 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L90

[Google.Spacing] 'e. T' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.  T' should have one space.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 90, "column": 295}}}, "severity": "ERROR"}
5. Someone from our team reviews the pull request and, if everything is correct, merges it into the documentation. Then it gets published on the site.

Check warning on line 91 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L91

[Google.We] Try to avoid using first-person plural like 'our'.
Raw output
{"message": "[Google.We] Try to avoid using first-person plural like 'our'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 91, "column": 17}}}, "severity": "WARNING"}

3. Build the site:
#### Edit documentation locally

```sh
mkdocs build
```
This option is for users who prefer to work from their computer and/or have full control over the documentation process.

4. Open `site/index.html`
The steps are the following:

Or, to run the built-in web server:
1. Fork this repository
2. Clone the repository on your machine:

```sh
mkdocs serve
git clone [email protected]:<your_name>/pcsm-docs.git
```

#### PDF
3. Change the directory to ``pcsm-docs`` and add the remote upstream repository:

To create the PDF version of the documentation, use the following command:
```sh
git remote add upstream [email protected]:percona/pcsm-docs.git
```

* With Docker:
4. Pull the latest changes from upstream

```sh
docker run --rm -v $(pwd):/docs -e ENABLE_PDF_EXPORT=1 perconalab/pmm-doc-md mkdocs build -f mkdocs-pdf.yml
```
```sh
git fetch upstream
git merge upstream/main
```

* Without:
5. Create a separate branch for your changes

```sh
ENABLE_PDF_EXPORT=1 mkdocs build -f mkdocs-pdf.yml
```
```sh
git checkout -b <my_branch>
```

The PDF is in `site/_pdf`.
6. Make changes.
7. Check your changes. Some editors (Sublime Text, VSCode, and others) have the Markdown preview, which you can use to check how the page is rendered. Alternatively, you can [build the documentation](#building-the-documentation) to know exactly how the documentation looks on the website.

Check notice on line 126 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L126

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 126, "column": 37}}}, "severity": "INFO"}

Check notice on line 126 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L126

[Google.Passive] In general, use active voice instead of passive voice ('is rendered').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is rendered').", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 126, "column": 139}}}, "severity": "INFO"}
8. Commit your changes. The [commit message guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53) will help you with writing great commit messages

Check warning on line 127 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / vale

[vale] CONTRIBUTING.md#L127

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "CONTRIBUTING.md", "range": {"start": {"line": 127, "column": 128}}}, "severity": "WARNING"}

9. Open a pull request to Percona

## After your pull request is merged

Once your pull request is merged, you are an official Percona Community Contributor. Welcome to the community!

## Repository structure

The repository includes the following directories and files:

- `mkdocs-base.yml` - the base configuration file. It includes general settings and documentation structure.
- `mkdocs.yml` - configuration file. Contains the settings for building the docs with Material theme.
- `mkdocs-pdf.yml` - configuration file. Contains the settings for building the PDF docs.
- `docs`:
- `*.md` - Source markdown files.
- `_images` - Images, logos and favicons
- `css` - Styles
- `js` - Javascript files
- `_resource`:
- `templates`:
- ``styles.scss`` - Styling for PDF documents
- `theme`:
- `main.html` - The layout template for hosting the documentation on Percona website
- overrides - The folder with the Material theme template customization for builds
- `site` - This is where the output HTML files are put after the build


[MkDocs]: https://www.mkdocs.org/
[Markdown]: https://daringfireball.net/projects/markdown/
[Git]: https://git-scm.com
[Python]: https://www.python.org/downloads/
[Docker]: https://docs.docker.com/get-docker/