Skip to content

Commit eddda5b

Browse files
authored
Merge pull request #94 from WenbinWL/docs/add-mkdocs-site-v2
docs: add MkDocs documentation site
2 parents 74ee5b5 + 83ae2a5 commit eddda5b

File tree

10 files changed

+545
-1
lines changed

10 files changed

+545
-1
lines changed

.github/workflows/docs.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- 'pyproject.toml'
11+
workflow_dispatch:
12+
inputs:
13+
reason:
14+
description: 'Reason for manual documentation deployment'
15+
required: true
16+
type: string
17+
18+
permissions:
19+
contents: write
20+
21+
jobs:
22+
build-and-deploy:
23+
if: ${{ github.repository == 'opencadc/deployments' }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v5
33+
34+
- name: Setup Python
35+
run: uv python install
36+
37+
- name: Install dependencies
38+
run: uv sync
39+
40+
- name: Deploy documentation
41+
run: uv run mkdocs gh-deploy --force

docs/index.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# CANFAR Deployments
2+
3+
Welcome to the operational documentation for deploying and maintaining the CANFAR Science Platform. This repository contains Helm charts, Kubernetes configurations, CI/CD automation, and operations runbooks that power the platform infrastructure.
4+
5+
## What You'll Find Here
6+
7+
This documentation is designed for **platform operators, DevOps engineers, and infrastructure maintainers** who deploy, configure, and manage CANFAR services.
8+
9+
<div class="grid cards" markdown>
10+
11+
- :material-kubernetes: **Helm Charts**
12+
13+
Reusable deployment templates for CANFAR services with configurable values and environment overlays.
14+
15+
- :material-rocket-launch: **Release Automation**
16+
17+
Automated CI/CD pipelines using GitHub Actions and Release Please for Helm chart versioning.
18+
19+
- :material-file-document: **Operations Runbooks**
20+
21+
Step-by-step procedures for releases, rollbacks, monitoring, and troubleshooting production deployments.
22+
23+
- :material-cog: **Configuration Management**
24+
25+
Environment-specific overlays, secrets management, and Kubernetes resource definitions for staging and production.
26+
27+
- :material-book-open-variant: **Documentation**
28+
29+
Automated MkDocs site deployment with operations guides and platform runbooks.
30+
31+
- :material-shield-check: **Code Quality**
32+
33+
Pre-commit hooks, linting, and security scanning for infrastructure-as-code.
34+
35+
</div>
36+
37+
## Quick Links
38+
39+
- [**CI/CD Pipelines**](operations/ci-cd.md) - Understand GitHub Actions workflows for documentation and code quality
40+
- [**Release Process**](operations/release-process.md) - Follow the Helm chart release process and CANFAR platform schedule
41+
- [**GitHub Repository**](https://github.com/opencadc/deployments/) - Browse source code, Helm charts, and configurations
42+
43+
## Getting Started
44+
45+
If you're new to CANFAR deployments:
46+
47+
1. Review the [Release Process](operations/release-process.md) to understand our deployment workflow
48+
2. Explore the [CI/CD Pipelines](operations/ci-cd.md) documentation to see how automation works
49+
3. Check the [GitHub repository](https://github.com/opencadc/deployments/) for Helm charts and configuration files
50+
51+
## Contributing
52+
53+
This is an operational repository for CANFAR platform infrastructure. Changes follow the standard pull request workflow with Release Please automation for versioning and changelog generation.
54+
55+
For questions or support, contact the CADC operations team or visit the [main CANFAR documentation](https://www.opencadc.org/canfar/).

docs/logo.png

1.85 KB
Loading

docs/operations/ci-cd.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# CI/CD Pipelines
2+
3+
The deployments repository uses GitHub Actions to automate documentation and code quality tasks.
4+
5+
## Documentation Deployment (`docs.yml`)
6+
7+
Automatically builds and deploys the MkDocs documentation site to GitHub Pages.
8+
9+
### Triggers
10+
11+
- Pushes to `main` that modify `docs/**`, `mkdocs.yml`, or `pyproject.toml`
12+
- Manual dispatch with required reason field
13+
14+
### Workflow Steps
15+
16+
1. **Checkout**: Fetches full git history (required for git-revision-date plugin)
17+
2. **Install uv**: Sets up the uv package manager
18+
3. **Setup Python**: Installs Python using uv
19+
4. **Install dependencies**: Runs `uv sync` to install all dependencies from `pyproject.toml`
20+
5. **Deploy**: Runs `uv run mkdocs gh-deploy --force` to build and publish to `gh-pages` branch
21+
22+
### Requirements
23+
24+
- `contents: write` permission for pushing to `gh-pages` branch
25+
- Dependencies managed in `pyproject.toml`:
26+
- `mkdocs-material` - Material theme for MkDocs
27+
- `mkdocs-git-revision-date-localized-plugin` - Git revision dates in docs
28+
29+
## Pre-commit Checks (`pre-commit.yml`)
30+
31+
Runs pre-commit hooks on all files to ensure code quality and consistency.
32+
33+
### Triggers
34+
35+
- Pull requests to `main`
36+
- Manual dispatch
37+
38+
### What it checks
39+
40+
- YAML syntax and formatting
41+
- JSON formatting
42+
- File permissions and naming
43+
- Security scanning for hardcoded secrets
44+
- Python code quality (if applicable)

docs/operations/index.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Operations
2+
3+
Operational guides and runbooks for managing CANFAR platform infrastructure, releases, and deployments.
4+
5+
## Overview
6+
7+
This section provides comprehensive documentation for platform operators managing CANFAR deployments. Whether you're releasing new versions, troubleshooting issues, or maintaining infrastructure, these guides will help you follow best practices and ensure reliable operations.
8+
9+
<div class="grid cards" markdown>
10+
11+
- [:material-pipe: __CI/CD Pipelines__ <small>GitHub Actions workflows</small>](ci-cd.md)
12+
- [:material-rocket-launch-outline: __Release Process__ <small>Release playbook and procedures</small>](release-process.md)
13+
14+
</div>
15+
16+
## Key Responsibilities
17+
18+
### Release Management
19+
20+
- Coordinate releases using Release Please automation
21+
- Review and merge release PRs with proper approvals
22+
- Monitor post-release workflows and verify deployments
23+
- Manage hotfixes and rollback procedures when needed
24+
25+
### Infrastructure Operations
26+
27+
- Deploy Helm charts and configuration overlays
28+
- Manage environment-specific configurations (staging, production)
29+
- Monitor platform health and respond to incidents
30+
- Maintain secrets and access controls
31+
32+
### CI/CD Maintenance
33+
34+
- Keep GitHub Actions workflows up to date
35+
- Monitor workflow runs and troubleshoot failures
36+
- Update documentation and configuration files
37+
38+
## Tools & Technologies
39+
40+
The CANFAR deployment infrastructure relies on:
41+
42+
- **Kubernetes** - Container orchestration platform
43+
- **Helm** - Package manager for Kubernetes applications
44+
- **GitHub Actions** - CI/CD automation and workflows
45+
- **Release Please** - Automated release management and changelog generation
46+
- **MkDocs Material** - Documentation site generation
47+
- **uv** - Python package and dependency management
48+
49+
## Getting Help
50+
51+
For operational support or questions:
52+
53+
- Check the relevant runbook in this documentation
54+
- Review recent GitHub Actions workflow runs for error logs
55+
- Contact the CADC operations team
56+
- Consult the [main CANFAR documentation](https://www.opencadc.org/canfar/)
57+
58+
## Best Practices
59+
60+
1. **Always follow the release checklist** - Skip no steps to ensure consistent, reliable releases
61+
2. **Test in staging first** - Validate changes in staging before promoting to production
62+
3. **Monitor post-deployment** - Watch metrics and logs after every deployment
63+
4. **Document incidents** - Capture lessons learned and update runbooks
64+
5. **Keep secrets secure** - Rotate credentials regularly and limit access
65+
6. **Maintain audit trails** - All changes go through pull requests with proper reviews

docs/operations/release-process.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Release Process
2+
3+
Documentation for releasing Helm charts and platform configuration for the CANFAR Science Platform.
4+
5+
## CANFAR Release Cycle
6+
7+
The CANFAR Science Platform uses a version format `YYYY.Q` for quarterly releases:
8+
9+
- **2025.1** - Q1 2025 release
10+
- **2025.2** - Q2 2025 release
11+
12+
Between releases, **hotfix patches** may be released as needed for critical issues.
13+
14+
## Helm Chart Releases
15+
16+
Each Helm chart in this repository is versioned independently:
17+
18+
- Charts follow semantic versioning (`MAJOR.MINOR.PATCH`)
19+
- Release Please automation manages changelog and version bumps
20+
- Each chart has its own release cycle and `CHANGELOG.md`
21+
22+
## Branching Model
23+
24+
- `main` is the integration branch - all work merges via pull requests
25+
- Use conventional commits for automatic changelog generation
26+
- Hotfixes branch from the latest release tag and merge back to `main`
27+
28+
## Release Workflow
29+
30+
### 1. Making Changes
31+
32+
- Create a pull request to `main`
33+
- Use conventional commit messages (e.g., `feat:`, `fix:`, `docs:`)
34+
- Add appropriate labels for changelog categorization
35+
- Ensure all CI checks pass
36+
37+
### 2. Release Please Automation
38+
39+
Release Please automatically:
40+
41+
- Detects changes to Helm charts
42+
- Determines version bump based on conventional commits
43+
- Updates `CHANGELOG.md` and `Chart.yaml`
44+
- Creates a release PR for each affected chart
45+
46+
### 3. Review and Merge
47+
48+
- Review the generated changelog and version bump
49+
- Verify Helm chart values and configuration
50+
- Obtain required approvals
51+
- Merge the release PR to create tags and GitHub releases
52+
53+
### 4. Deployment
54+
55+
After release PR is merged:
56+
57+
- Git tag is created automatically
58+
- GitHub release is published with changelog
59+
- Deploy to staging environment first
60+
- Run validation and smoke tests
61+
- Deploy to production after successful validation
62+
63+
## Hotfix Process
64+
65+
For critical issues requiring immediate patches:
66+
67+
1. Create `hotfix/<issue>` branch from affected release tag
68+
2. Apply fix and create PR to `main`
69+
3. Release Please generates patch release PR
70+
4. Follow standard review and merge process
71+
5. Deploy hotfix after testing
72+
73+
## Pre-deployment Checklist
74+
75+
Before deploying a Helm chart release:
76+
77+
- ✅ Review CHANGELOG for all changes
78+
- ✅ Verify chart values match intended configuration
79+
- ✅ Check for breaking changes or migrations
80+
- ✅ Ensure dependent services are compatible
81+
- ✅ Prepare rollback plan
82+
83+
## Rollback Strategy
84+
85+
If issues are detected after deployment:
86+
87+
1. Roll back to previous Helm chart version
88+
2. Document issue and root cause
89+
3. Create hotfix branch to address problem
90+
4. Follow hotfix process for patch release

docs/stylesheets/extra.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[data-md-color-scheme="canfar"] {
2+
--md-primary-fg-color: #005493;
3+
--md-accent-fg-color: #F5AA1C;
4+
}
5+
6+
[data-md-color-scheme="slate"] {
7+
--md-hue: 210;
8+
--md-primary-fg-color: #005493;
9+
--md-accent-fg-color: #F5AA1C;
10+
}
11+
12+
@keyframes heart {
13+
0%, 40%, 80%, 100% {
14+
transform: scale(1);
15+
}
16+
20%, 60% {
17+
transform: scale(1.15);
18+
}
19+
}
20+
.heart {
21+
animation: heart 1000ms infinite;
22+
}
23+
24+
/* Indentation for nested items in the primary sidebar navigation */
25+
:root {
26+
/* Tune this to increase/decrease the indent */
27+
--canfar-nav-indent: 0.6rem;
28+
--canfar-nav-border-color: var(--md-default-fg-color--lighter);
29+
}
30+
31+
/* Clear active page: color only (no left bar, no bold) */
32+
:root {
33+
--canfar-nav-active-color: var(--md-accent-fg-color);
34+
}
35+
36+
/* Current page link and its parent trail */
37+
.md-sidebar--primary .md-nav--primary .md-nav__link--active,
38+
.md-sidebar--primary .md-nav--primary .md-nav__item--active > .md-nav__link,
39+
.md-sidebar--primary .md-nav--primary .md-nav__item--active > label.md-nav__link,
40+
.md-sidebar--primary .md-nav--primary a.md-nav__link[aria-current="page"],
41+
.md-sidebar--primary .md-nav--primary a.md-nav__link[aria-current="location"] {
42+
color: var(--canfar-nav-active-color);
43+
}
44+
45+
/* Indent nested nav via container padding (no borders) */
46+
.md-sidebar--primary .md-nav--primary .md-nav__item > .md-nav {
47+
margin-left: 0;
48+
padding-left: var(--canfar-nav-indent);
49+
}

0 commit comments

Comments
 (0)