Skip to content

Commit

Permalink
chore(doc): migrate to docusaurus v3 (#3808)
Browse files Browse the repository at this point in the history
* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* feat(doc): migrate to docusaurus v3

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* fix zoom

* remove backslash from inline code

* remove backslash from inline code

* remove backslosh from coeblocks

* remove backslosh from coeblocks

* remove backslosh from coeblocks

* Update poller-troubleshoot.md

* Update poller-troubleshoot.md

* Update poller-troubleshoot.md

* Update using-packages.md

* Update using-packages.md

* Update using-packages.md

* Update using-packages.md

* Update using-packages.md

* Update using-packages.md

---------

Co-authored-by: cg-tw <[email protected]>
  • Loading branch information
kduret and cg-tw authored Dec 13, 2024
1 parent 8315d67 commit f6af52e
Show file tree
Hide file tree
Showing 1,441 changed files with 33,784 additions and 23,146 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@ concurrency:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
run_install: false

- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0
with:
cmd: install --frozen-lockfile
run: pnpm install --frozen-lockfile
shell: bash

- name: Redirect pp and cloud links to last documentation
run: |
Expand All @@ -34,10 +42,10 @@ jobs:
shell: bash

- name: Build documentation for ${{ github.event.inputs.version }}
run: ARCHIVED_VERSION="${{ github.event.inputs.version }}" yarn build
run: ARCHIVED_VERSION="${{ github.event.inputs.version }}" pnpm build

- name: Store build archived doc in cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand All @@ -47,7 +55,7 @@ jobs:
runs-on: [self-hosted, infra]
steps:
- name: Restore built archived doc from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/clean-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: clean-cache

on:
pull_request:
types:
- closed

jobs:
clean-cache:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Clean cache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 changes: 47 additions & 19 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
Expand Down Expand Up @@ -169,34 +169,60 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
run_install: false

- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 20
cache: yarn
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0
run: pnpm install --frozen-lockfile
shell: bash

- name: Restore docusaurus build from cache
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
cmd: install --frozen-lockfile
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
restore-keys: |
docusaurus-build-${{ matrix.environment }}-staging
- name: Build documentation
run: yarn build
run: pnpm build
env:
PP: ${{ matrix.pp }}
CLOUD: ${{ matrix.cloud }}
VERSIONS: ${{ matrix.environment == 'staging' && matrix.versions || matrix.next_version }}
BASE_URL: ${{ github.event_name == 'pull_request' && format('/previews/pr-{0}/{1}', github.event.pull_request.number, matrix.environment) || '' }}

- name: Store build in cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- name: Clear previous docker image from cache
run: |
curl \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/centreon/centreon-documentation/actions/caches?key=docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
shell: bash

- name: Store docusaurus build cache in cache
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}

deploy-preview:
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -212,13 +238,15 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
fail-on-cache-miss: true

- name: Setup awscli
Expand Down Expand Up @@ -292,10 +320,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-staging"
Expand Down Expand Up @@ -324,10 +352,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-next"
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let you know so that you can rebase it.

To understand how the documentation is structured, you may have a look to the
[Docusaurus project](https://docusaurus.io/).
We're using version 2.
We're using version 3.

### Pull request guidelines

Expand All @@ -57,17 +57,17 @@ set by the existing documentation.

## How to build the documentation locally

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Which branch should I base my PRs on?

Use branch **staging**. We will merge the PR into production once it has gone through the validation process.

### Prerequisites

1. Install **yarn**. On Windows: https://classic.yarnpkg.com/latest.msi
1. Install [**pnpm** (version 9)]: https://pnpm.io/installation

2. Install **node.js** (version 14 minimum): https://nodejs.org/en/download/
2. Install **node.js** (version 18 minimum): https://nodejs.org/en/download/

3. Clone the repository :

Expand All @@ -85,28 +85,28 @@ Use branch **staging**. We will merge the PR into production once it has gone th
git checkout <name_of_branch>
```

4. Install dependencies:
5. Install dependencies:

```
yarn install --frozen-lockfile
pnpm install --frozen-lockfile
```

### Building the documentation website

* Build the EN or FR version of the site (faster)

* EN: ```yarn start```
* FR: ```yarn start --locale=fr```
* EN: ```pnpm start```
* FR: ```pnpm start --locale=fr```

The website opens in your browser at the following address: http://localhost:3000/. Most changes are reflected live without having to restart the server.

* If you really need to build the whole website, use the following command (but be aware it takes a long time to build):

```
yarn build
pnpm build
```

Then use the `npm run serve` command to open the website in your browser.
Then use the `pnpm run serve` command to open the website in your browser.

## Adding files to the table of contents

Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

14 changes: 7 additions & 7 deletions cloud/alerts-notifications/notif-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Resources are checked according to the following parameters:

| Macro | Description | Example |
| ----- | ----------- |-------- |
|{{NOTIFICATIONTYPE}}| **Recovery**, **Warning**, **Critical** or **Unknown** for a service; **Recovery**, **Down** or **Unreachable** for a host. | CRITICAL |
{{NAME}}| The name of the service or host. For a service, the name of the host it is attached to is also given. | central/proc-ntpd |
{{ID}}| An internal ID for the resource. This can be used for API calls. | 41:209 |
{{STATE}}| The [status](./concepts.md) that the resource has just entered. | CRITICAL |
{{SHORTDATETIME}}| Date and time in the following format: MM/DD/YY h:mm:ss | 10/18/23 12:20:42 |
{{LONGDATETIME}}| Date and time, including the day of the week. | Wednesday October 18, 2023, 12:20:42 |
{{OUTPUT}}| The output of the check command, i.e. the text that is displayed in the **Information** column in the **Resources status** page. | CRITICAL: Number of current processes running: 0 |
|\{\{NOTIFICATIONTYPE\}\}| **Recovery**, **Warning**, **Critical** or **Unknown** for a service; **Recovery**, **Down** or **Unreachable** for a host. | CRITICAL |
\{\{NAME\}\}| The name of the service or host. For a service, the name of the host it is attached to is also given. | central/proc-ntpd |
\{\{ID\}\}| An internal ID for the resource. This can be used for API calls. | 41:209 |
\{\{STATE\}\}| The [status](./concepts.md) that the resource has just entered. | CRITICAL |
\{\{SHORTDATETIME\}\}| Date and time in the following format: MM/DD/YY h:mm:ss | 10/18/23 12:20:42 |
\{\{LONGDATETIME\}\}| Date and time, including the day of the week. | Wednesday October 18, 2023, 12:20:42 |
\{\{OUTPUT\}\}| The output of the check command, i.e. the text that is displayed in the **Information** column in the **Resources status** page. | CRITICAL: Number of current processes running: 0 |

3. Click the **Save** button at the top right of the panel. The new notification rule appears in the list. You may have to wait up to 5 minutes before the rule starts being applied.
2 changes: 1 addition & 1 deletion cloud/alerts-notifications/resources-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Graphs display metric evolution over a given period. This can be defined in the

- A selection of preconfigured periods is available in the graph header: Last Day, Last 7 Days, Last 31 Days
- Datetime pickers are available for Start and End points in time. Whenever the displayed period changes, this element is updated accordingly
- Using the side [<] and [>] buttons that appear upon hovering the graph's border, you can translate in time by half your current timespan (backward and forward in time, respectively)
- Using the side [\<] and [>] buttons that appear upon hovering the graph's border, you can translate in time by half your current timespan (backward and forward in time, respectively)
- Selecting a period of time within the graph will zoom in on this period

![image](../assets/alerts/resources-status/resources-status-graph-time-selection.gif)
Expand Down
10 changes: 5 additions & 5 deletions cloud/installation/poller-troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ If it doesn't, check the logs for errors.

### Step 1: Test network connectivity

Check that the poller can send real-time data to the Centreon Cloud platform. Execute the following command (replace **{org-code}** by your organization code):
Check that the poller can send real-time data to the Centreon Cloud platform. Execute the following command (replace **\<org-code\>** by your organization code):

```shell
nc -zv -w 5 broker-{org-code}.euwest1.centreon.cloud 443
nc -zv -w 5 broker-<org-code>.euwest1.centreon.cloud 443
```

The command should print a message like this one:
Expand Down Expand Up @@ -227,10 +227,10 @@ Modify log levels to get more information about what Engine is doing.
### Step 5: Enable and review cbmod logs

1. Edit the Centreon Broker module configuration (replace **{hostname}** by the correct value):
1. Edit the Centreon Broker module configuration (replace **\<hostname\>** by the correct value):

```shell
vi /etc/centreon-broker/{hostname}-module.json
vi /etc/centreon-broker/<hostname>-module.json
```

2. Adjust the **centreonBroker.log.loggers** object to the desired log level.
Expand Down Expand Up @@ -259,6 +259,6 @@ If all troubleshooting steps have failed, contact [our support team](https://sup

| Use to debug what? | Process | File | Symptoms |
|--------------------|---------|------|----------|
| Installation of the poller | | {scriptdir}/logs/register-poller.log | |
| Installation of the poller | | \<scriptdir\>/logs/register-poller.log | |
| Centreon Engine | centengine | /var/log/centreon-engine/centengine.log | <ul><li>Checks are not performed</li><li>Objects that have been deleted are still monitored</li></ul> |
| Gorgone | gorgoned | /var/log/centreon-gorgone/gorgoned.log | Actions are not triggered: acknowledgements, downtimes, force checks, autodiscovery |
Loading

0 comments on commit f6af52e

Please sign in to comment.