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

PMM-13597 Move pmm-doc v3 to monorepo #3370

Merged
merged 28 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f44ae57
PMM-13597 Move `pmm-doc` v3 to monorepo
ademidoff Dec 9, 2024
8448c29
PMM-13597 Move issue templates to .github
ademidoff Dec 9, 2024
26fc19c
PMM-13597 Minor image fixes
ademidoff Dec 9, 2024
39a449d
PMM-13597 Remove an unused plugin
ademidoff Dec 9, 2024
d97d0a2
PMM-13597 Remove mike version list
ademidoff Dec 9, 2024
13395db
PMM-13597 Try fetch-depth=0 to overcome the push failure
ademidoff Dec 9, 2024
7577787
PMM-13597 Rename preview branch to publish for consistency
ademidoff Dec 9, 2024
d112efc
PMM-13597 Remove a redundant config file
ademidoff Dec 10, 2024
e9ee56c
PMM-13597 Change the repo name and URL
ademidoff Dec 10, 2024
3cb66b4
PMM-13597 Remove unused icons
ademidoff Dec 11, 2024
6d33cf4
PMM-13597 Remove unused images
ademidoff Dec 11, 2024
aa45ecb
PMM-13597 Don't ignore files in /bin directory
ademidoff Dec 11, 2024
2184fbe
PMM-13597 Restore PMM.png file
ademidoff Dec 11, 2024
18d27e0
PMM-13597 Automate removal of unused images
ademidoff Dec 11, 2024
967cd31
PMM-13597 Update the scripts
ademidoff Dec 11, 2024
b9490f0
PMM-13597 Add a Makefile to documentation
ademidoff Dec 12, 2024
99244df
PMM-13597 Update the workflow
ademidoff Dec 12, 2024
01a2574
PMM-13597 Update Makefile and remove the bash script
ademidoff Dec 13, 2024
ed6722d
PMM-13597 Add doc-build-pdf make target
ademidoff Dec 13, 2024
b682a74
PMM-13597 Add more igrnore-paths to the worflows
ademidoff Dec 13, 2024
e88c30d
PMM-13597 Move over PR-1344 from pmm-doc
ademidoff Dec 13, 2024
0c36617
PMM-13597 Apply styles same as in other doc sites
ademidoff Dec 16, 2024
f2d0b0f
PMM-13597 Remove "PMM" from version selector
ademidoff Dec 17, 2024
5cd3c8a
PMM-13597 Disable version selector for the pdf plugin
ademidoff Dec 17, 2024
cb8d1b4
Merge branch 'v3' into PMM-13597-move-pmm-doc-to-monorepo
ademidoff Dec 18, 2024
93762be
PMM-13597 Follow up on PR review comments
ademidoff Dec 18, 2024
a1e7afb
Merge branch 'PMM-13597-move-pmm-doc-to-monorepo' of ssh://github.com…
ademidoff Dec 18, 2024
8be53d4
PMM-13597 Update the slack message
ademidoff Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* @percona/pmm-review-be
/docs/ @percona/pmm-docs
/documentation/ @percona/pmm-docs
/ui/ @percona/pmm-review-fe
/agent/agents/postgres/ @JiriCtvrtka @percona/pmm-review-be
/api/ @BupycHuk @percona/pmm-review-be
Expand Down
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-md-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

# Feature Name

!!! caution alert alert-warning "Important/Caution"
Crucial points that need emphasis:

- Important: A significant point that deserves emphasis.
- Caution: Used to mean 'Continue with care'.

## What is feature_name?

!!! note alert alert-primary "Note"
Replace **feature_name** with the name of the feature.


Describe the feature.

## Prerequisites
List the requirements before installing/configuring/using the feature.

**Example**

Install a particular software or utility.

Configure the software or utility.

## Before you begin

Do specific settings in PMM for the feature to work as expected.


## Installing/Configuring/Using feature_name

!!! note alert alert-primary "Note"
Replace **feature_name** with the name of the feature.

Use numbered list to provide step by step instructions to install/confiigure/use the feature. Use just one instruction per step for clarity.

Use images (optional)

![!](../images/image_name.png)


**Note, Info (Optional)**

To give your users important or useful information that isn't part of the flow of the text, you can offset the information with a note.

Preferred use is without the label (first form).


!!! note alert alert-primary ""
Note ...

!!! note alert alert-primary "Note"
Text ...

!!! note alert alert-primary "Info"
Text ...

**Caution, Warning, Important**

Uses same type but different label text:

- Caution: Used to mean 'Continue with care'.

- Important: A significant point that deserves emphasis.
84 changes: 84 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-rn-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
name: Percona Monitoring and Management <version>
about: Release Notes Template for PMM

---

| **Release date:** | [Month DD, YYYY] |
| ----------------- | ----------------------------------------------------------------------------------------------- |
| **Installation:** | [Installing Percona Monitoring and Management](https://www.percona.com/software/pmm/quickstart) |

Percona Monitoring and Management (PMM) is an open source database monitoring, management, and observability solution for MySQL, PostgreSQL, and MongoDB.

!!! caution alert alert-warning "Important/Caution"
Crucial points that need emphasis:

- Important: A significant point that deserves emphasis.
- Caution: Used to mean 'Continue with care'.


## Release Highlights


### Release Highlights1
Description of the feature with a link to the documentation


### Release Highlights2
Description of the feature with a link to the documentation

Add more subsections for more release highlights.


### Components Upgrade
- List the components which are upgraded as part of the Release.

## New Features

- List of new features with a comprehensive description of the feature and link to the JIRA ticket.

Example:

[PMM-XXXX](https://jira.percona.com/browse/PMM-XXXX) - Comprehensive description.



## Improvements

- ​​List of improvements with a comprehensive description and link to the JIRA ticket.

Example:

[PMM-XXXX](https://jira.percona.com/browse/PMM-XXXX) - Comprehensive description.


## Bugs Fixed

- ​​List of bugs with a comprehensive description and link to the JIRA ticket.

Example:

[PMM-XXXX](https://jira.percona.com/browse/PMM-XXXX) - Comprehensive description.



## Known issues

- ​List of known issues with a comprehensive description and link to the JIRA ticket.

Example:

[PMM-XXXX](https://jira.percona.com/browse/PMM-XXXX) - Comprehensive description.


**Solution**

Description of the solution.


## Coming Soon

Share what are the upcoming features on your roadmap to keep users excited:

- Planned item 1
- Planned item 2
3 changes: 3 additions & 0 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ on:
- pmm-*
tags:
- v[0-9]+.[0-9]+.[0-9]+*
paths-ignore:
- "documentation/**"

pull_request:
paths-ignore:
- "agent/**"
- "api-tests/**"
- "docs/**"
- "documentation/**"
- "managed/**"
- "qan-api2/**"
- "update/**"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ on:
- pmm-*
tags:
- v[0-9]+.[0-9]+.[0-9]+*
paths-ignore:
- "documentation/**"

pull_request:
paths-ignore:
- "admin/**"
- "api-tests/**"
- "cli-tests/**"
- "docs/**"
- "documentation/**"
- "managed/**"
- "qan-api2/**"
- "update/**"
Expand Down
File renamed without changes.
25 changes: 7 additions & 18 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:

env:
GOFLAGS: -v -mod=readonly
GOPRIVATE: github.com/percona-platform

steps:
- name: Configure git for private modules
Expand All @@ -33,25 +32,13 @@ jobs:
run: echo "machine github.com login percona-robot password ${{ secrets.ROBOT_TOKEN }}" > $HOME/.netrc

- name: Set up Go release
if: matrix.go.version != 'tip'
env:
# to avoid error due to `go version` accepting -v flag with an argument since 1.15
GOFLAGS: ""
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ matrix.go.version }}

- name: Set up Go tip
if: matrix.go.version == 'tip'
env:
# to avoid error due to `go version` accepting -v flag with an argument since 1.15
GOFLAGS: ""
run: |
git clone --depth=1 https://go.googlesource.com/go $HOME/gotip
cd $HOME/gotip/src
./make.bash
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
echo "$HOME/gotip/bin" >> $GITHUB_PATH
- name: Check out code into the Go module directory
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -61,17 +48,19 @@ jobs:
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ matrix.go.version }}-modules-${{ hashFiles('**/go.sum') }}
key: ${{ matrix.go.version }}-modules-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.os }}-go-${{ matrix.go.version }}-modules-
${{ matrix.go.version }}-modules-

- name: Enable Go build cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.cache/go-build
key: ${{ matrix.os }}-go-${{ matrix.go.version }}-build-${{ github.ref }}-${{ hashFiles('**') }}
key: ${{ matrix.go.version }}-build-${{ github.ref }}-${{ hashFiles('**') }}
restore-keys: |
${{ matrix.os }}-go-${{ matrix.go.version }}-build-${{ github.ref }}-
${{ matrix.os }}-go-${{ matrix.go.version }}-build-
${{ matrix.go.version }}-build-${{ github.ref }}-
${{ matrix.go.version }}-build-

- name: Clean Go modules cache
run: go clean -modcache

Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PMM Docs 3.x

on:
push:
branches:
- v3
paths:
- "documentation/**"

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # read more about why this is necessary at https://github.com/jimporter/mike/issues/60
sparse-checkout: |
.github
documentation
Makefile
Makefile.include

- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.x'
cache: 'pip'

- name: Setup MkDocs
working-directory: documentation
run: |
python -m pip install --upgrade pip
pip install wheel
test -f requirements.txt && pip install -r requirements.txt

- name: Configure git
env:
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
run: |
git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"
git config user.name "GitHub Action"
git config user.email "[email protected]"
git config user.password "${ROBOT_TOKEN}"
echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV

- name: Check for unused images
run: make doc-check-images

# Builds Material-themed static web site in 'publish' branch
- name: Build a themed site (3.x)
working-directory: documentation
run: |
mike deploy 3 -b publish -p
# Note: enable the next line after v3 GA
# mike set-default 3 -b publish -p
mike retitle 3 "3.x (BETA)" -b publish -p
60 changes: 60 additions & 0 deletions .github/workflows/helm-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test helm.md

on:
push:
branches:
- v3
paths:
- 'documentation/docs/install-pmm/install-pmm-server/baremetal/helm.md'
pull_request:
paths:
- 'documentation/docs/install-pmm/install-pmm-server/baremetal/helm.md'

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb
sudo apt-get install -y ./pandoc-2.18-1-amd64.deb

- name: Copy test template
run: cp documentation/resources/bin/doc_test_template.sh documentation/docs_test_helm.sh

- name: Get CodeBlocks and push them to test template
run: |
pandoc -i documentation/docs/install-pmm/install-pmm-server/baremetal/helm.md --lua-filter documentation/resources/bin/CodeBlock.lua -t html -o /dev/null >> documentation/docs_test_helm.sh

- name: Start k8s cluster
run: minikube start

- name: Setup storage driver for snapshots
run: |
minikube addons disable storage-provisioner
kubectl delete storageclass standard
minikube addons enable csi-hostpath-driver
minikube addons enable volumesnapshots
kubectl patch storageclass csi-hostpath-sc -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

- name: Run helm tests
run: ./documentation/docs_test_helm.sh

- name: Get debug
if: ${{ failure() }}
run: |
cat ./documentation/docs_test_helm.sh
pandoc --version
helm version
kubectl get pods
kubectl describe pod --selector=app.kubernetes.io/name=pmm || true
kubectl get events --sort-by=lastTimestamp
kubectl logs --all-containers --timestamps --selector=app.kubernetes.io/name=pmm || true
Loading
Loading