Skip to content

Commit b1ab3cf

Browse files
authored
Refactor v14 documentation for Sphinx (#981)
* add starter pack and sync tutorial with VM * update deployment guides * rename how-to-guides to how-to * sync how-to guides with vm * sync references with vm * sync explanation pages with vm * add .readthedocs.yaml and reduce .gitignore scope for requirements.txt file * fix some formatting issues * sync backup guides with vm * fix misc. build errors and sync tutorial with vm * add doc ci checks * remove discourse sync workflow * polish tutorial and deploy guide * specify channel on all deploy commands * sync misc. pages with vm * minor README update with new documentation link * ignore docs folder in development workflows * remove sphinx python dependency check workflow * update home page
1 parent 9d77611 commit b1ab3cf

File tree

113 files changed

+3937
-2383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+3937
-2383
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
name: Automatic doc checks
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
paths:
9+
- 'docs/**' # Only run on changes to the docs directory
10+
11+
workflow_dispatch:
12+
# Manual trigger
13+
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
documentation-checks:
21+
uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
22+
with:
23+
working-directory: "docs"
24+
fetch-depth: 0

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- 'LICENSE'
1515
- '**.md'
1616
- .github/renovate.json5
17-
- '.github/workflows/sync_docs.yaml'
17+
- 'docs/**'
1818
schedule:
1919
- cron: '53 0 * * *' # Daily at 00:53 UTC
2020
# Triggered on push to branch "main" by .github/workflows/release.yaml

.github/workflows/lib-check.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- 'LICENSE'
1515
- '**.md'
1616
- 'renovate.json'
17+
- 'docs/**'
1718

1819
jobs:
1920
lib-check:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Markdown style checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**' # Only run on changes to the docs directory
9+
pull_request:
10+
branches:
11+
- '*'
12+
paths:
13+
- 'docs/**' # Only run on changes to the docs directory
14+
15+
jobs:
16+
markdown-lint:
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: DavidAnson/markdownlint-cli2-action@v16
23+
with:
24+
config: "docs/.sphinx/.markdownlint.json"

.github/workflows/sync_docs.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build/
66
coverage.xml
77
__pycache__/
88
*.py[cod]
9-
requirements.txt
9+
./requirements.txt
1010
requirements-last-build.txt
1111

1212
# PyCharm project folder.

.readthedocs.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
jobs:
14+
post_checkout:
15+
- git fetch --unshallow || true
16+
# Cancel building pull requests when there aren't changed in the docs directory.
17+
# If there are no changes (git diff exits with 0) we force the command to return with 183.
18+
# This is a special exit code on Read the Docs that will cancel the build immediately.
19+
# https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
20+
- |
21+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/14/docs -- 'docs/' '.readthedocs.yaml';
22+
then
23+
exit 183;
24+
fi
25+
26+
# Build documentation in the docs/ directory with Sphinx
27+
sphinx:
28+
builder: dirhtml
29+
configuration: docs/conf.py
30+
fail_on_warning: true
31+
32+
# If using Sphinx, optionally build your docs in additional formats such as PDF
33+
# formats:
34+
# - pdf
35+
36+
# Optionally declare the Python requirements required to build your docs
37+
python:
38+
install:
39+
- requirements: docs/requirements.txt

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
# Charmed PostgreSQL K8s operator
2+
23
[![CharmHub Badge](https://charmhub.io/postgresql-k8s/badge.svg)](https://charmhub.io/postgresql-k8s)
34
[![Release](https://github.com/canonical/postgresql-k8s-operator/actions/workflows/release.yaml/badge.svg)](https://github.com/canonical/postgresql-k8s-operator/actions/workflows/release.yaml)
45
[![Tests](https://github.com/canonical/postgresql-k8s-operator/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/canonical/postgresql-k8s-operator/actions/workflows/ci.yaml?query=branch%3Amain)
56
[![codecov](https://codecov.io/gh/canonical/postgresql-k8s-operator/graph/badge.svg?token=KmBJqV1AM2)](https://codecov.io/gh/canonical/postgresql-k8s-operator)
67

7-
## Description
8-
9-
This repository contains a [Juju Charm](https://charmhub.io/postgresql-k8s) for deploying [PostgreSQL](https://www.postgresql.org/about/) on Kubernetes.
8+
This repository contains a charmed operator for deploying [PostgreSQL](https://www.postgresql.org/about/) on Kubernetes via the [Juju orchestration engine](https://juju.is/).
109

11-
To deploy on virtual machines, please use [Charmed PostgreSQL operator](https://charmhub.io/postgresql).
10+
To learn more about how to deploy and operate Charmed PostgreSQL K8s, see the [official documentation](https://canonical-charmed-postgresql-k8s.readthedocs-hosted.com/).
1211

1312
## Usage
1413

15-
Bootstrap a Kubernetes (e.g. [Multipass-based MicroK8s](https://discourse.charmhub.io/t/charmed-environment-charm-dev-with-canonical-multipass/8886)) and create a new model using Juju 2.9+:
14+
Bootstrap a Kubernetes (e.g. [Multipass-based MicroK8s](https://discourse.charmhub.io/t/charmed-environment-charm-dev-with-canonical-multipass/8886)) and create a new model using Juju 3.6+:
1615

1716
```shell
1817
juju add-model postgresql-k8s
19-
juju deploy postgresql-k8s --channel 14 --trust
18+
juju deploy postgresql-k8s --channel 14/stable --trust
2019
```
2120

2221
**Note:** the `--trust` flag is required because the charm and Patroni need to create some K8s resources.
@@ -62,7 +61,7 @@ Adding a relation is accomplished with `juju relate` (or `juju integrate` for Ju
6261

6362
```shell
6463
# Deploy Charmed PostgreSQL cluster with 3 nodes
65-
juju deploy postgresql-k8s -n 3 --trust --channel 14
64+
juju deploy postgresql-k8s --channel 14/stable -n 3 --trust --channel 14
6665

6766
# Deploy the relevant application charms
6867
juju deploy mycharm
@@ -87,7 +86,7 @@ juju status --relations
8786
This charm supports legacy interface `pgsql` from the previous [PostgreSQL charm](https://launchpad.net/postgresql-charm):
8887

8988
```shell
90-
juju deploy postgresql-k8s --trust --channel 14
89+
juju deploy postgresql-k8s --channel 14/stable --trust
9190
juju deploy finos-waltz-k8s --channel edge
9291
juju relate postgresql-k8s:db finos-waltz-k8s
9392
```

docs/.custom_wordlist.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Leave a blank line at the end of this file to support concatenation
2+
backend
3+
backends
4+
Charmcraft
5+
cjk
6+
cryptographically
7+
dvipng
8+
fonts
9+
freefont
10+
github
11+
GPG
12+
gyre
13+
https
14+
Intersphinx
15+
lang
16+
LaTeX
17+
latexmk
18+
Multipass
19+
otf
20+
plantuml
21+
PNG
22+
Pygments
23+
QEMU
24+
Rockcraft
25+
rst
26+
SVG
27+
tex
28+
texlive
29+
TOC
30+
toctree
31+
txt
32+
uncommenting
33+
utils
34+
VMs
35+
WCAG
36+
whitespace
37+
whitespaces
38+
wordlist
39+
xetex
40+
xindy

docs/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Environment
2+
*env*/
3+
.sphinx/venv/
4+
5+
# Sphinx
6+
.sphinx/warnings.txt
7+
.sphinx/.wordlist.dic
8+
.sphinx/.doctrees/
9+
.sphinx/update/
10+
.sphinx/node_modules/
11+
12+
# Vale
13+
.sphinx/styles/*
14+
.sphinx/vale.ini
15+
16+
# Build outputs
17+
_build
18+
19+
# Node.js
20+
package*.json
21+
22+
# Unrelated cache and config files
23+
.DS_Store
24+
__pycache__
25+
.idea/
26+
.vscode/

0 commit comments

Comments
 (0)