Skip to content

Commit 31f360d

Browse files
committed
Expand help.md to all meza commands
1 parent 9071e05 commit 31f360d

File tree

3 files changed

+99
-25
lines changed

3 files changed

+99
-25
lines changed

manual/meza-cmd/MIGRATION.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ def display_docs(name):
2323
"""
2424
Display the contents of a help file with the given name.
2525
Prefers Markdown (.md) files over text (.txt) files.
26-
26+
2727
Notes:
2828
- Prioritizes .md files over .txt files for enhanced formatting
2929
- Provides fallback to legacy .txt files if .md files don't exist
3030
- Shows helpful update instructions if no help file is found
3131
- Guides users to update their project sources for latest documentation
3232
"""
3333
import os
34-
34+
3535
# Try .md file first, fallback to .txt
3636
md_file = f'/opt/meza/manual/meza-cmd/{name}.md'
3737
txt_file = f'/opt/meza/manual/meza-cmd/{name}.txt'
38-
38+
3939
if os.path.exists(md_file):
4040
with open(md_file, encoding='utf-8') as f:
4141
print(f.read())
@@ -49,7 +49,7 @@ def display_docs(name):
4949
print("Please update your project sources to get the latest help documentation:")
5050
print("")
5151
print(" git pull origin main")
52-
print(" # or")
52+
print(" # or")
5353
print(" git pull origin dev")
5454
print("")
5555
print("For a complete list of available commands, try:")
@@ -139,7 +139,7 @@ All help commands now display rich Markdown formatting:
139139
# All commands show enhanced Markdown help
140140
meza create --help # Wiki creation with detailed examples
141141
meza delete --help # Deletion with safety warnings and emojis
142-
meza deploy --help # Deployment options and workflows
142+
meza deploy --help # Deployment options and workflows
143143
meza backup --help # Backup operations with visual indicators
144144
meza setup --help # Environment setup instructions
145145
meza deploy --help # Deployment directives and requirements
@@ -157,8 +157,8 @@ meza migrate-wikis --help # Wiki migration workflows
157157

158158
## Migration Results
159159

160-
**Before migration**: 16 `.txt` files, 0 `.md` files
161-
**After migration**: 16 `.txt` files, 16 `.md` files
160+
**Before migration**: 16 `.txt` files, 0 `.md` files
161+
**After migration**: 16 `.txt` files, 16 `.md` files
162162
**After cleanup**: 0 `.txt` files, 16 `.md` files (pending deletion)
163163

164164
### Files Ready for Deletion
@@ -197,4 +197,4 @@ All help commands have been thoroughly tested and verified:
197197

198198
🎉 **The migration is now complete and ready for production use!**
199199

200-
All legitimate user commands have been migrated to Markdown with enhanced documentation, improved formatting, and better user experience. The `.txt` files can be safely deleted from the repository.
200+
All legitimate user commands have been migrated to Markdown with enhanced documentation, improved formatting, and better user experience. The `.txt` files can be safely deleted from the repository.

manual/meza-cmd/help.md

Lines changed: 90 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,124 @@
88
meza COMMAND [directives]
99
```
1010

11-
## Quick Multi-Server Setup
11+
## Quick Start
1212

13-
To set up a multi-server environment:
13+
### Single Machine Development Setup
14+
```bash
15+
# Deploy monolith environment (creates 'demo' wiki automatically)
16+
meza deploy monolith
17+
18+
# Create additional wikis
19+
meza create wiki monolith
20+
```
1421

22+
### Multi-Server Production Setup
1523
```bash
1624
# 1. Setup the environment (follow prompts)
17-
meza setup env
25+
meza setup env production
1826

1927
# 2. Edit configuration files as required:
20-
sudo vi /opt/conf-meza/secret/<env-name>/hosts
21-
sudo vi /opt/conf-meza/secret/<env-name>/secret.yml
28+
sudo vi /opt/conf-meza/secret/production/hosts
29+
sudo vi /opt/conf-meza/secret/production/secret.yml
2230

2331
# 3. Deploy the environment
24-
sudo meza deploy <env-name>
32+
sudo meza deploy production
33+
34+
# 4. Monitor deployment progress
35+
meza deploy-tail production
36+
```
37+
38+
### Common Management Tasks
39+
```bash
40+
# List existing wikis
41+
meza list-wikis monolith
42+
43+
# Backup before changes
44+
meza backup monolith
45+
46+
# Run maintenance jobs
47+
meza maint run-jobs monolith
48+
49+
# Check deployment status
50+
meza deploy-check production
2551
```
2652

2753
## Command Reference
2854

55+
### Environment Management
2956
| Command | Directives | Description |
3057
|---------|------------|-------------|
31-
| **deploy** | `<environment>` | Deploy your server (e.g. `monolith`) |
32-
| **setup** | `env` | Setup an environment |
33-
| | `dev` | Setup dev features (Git, FTP) |
34-
| **create** | `wiki` | Create a wiki |
35-
| | `wiki-promptless` | Create a wiki without prompts |
36-
| **backup** | `<environment>` | Create a backup of an environment |
37-
| **docker** | `run` | 🧪 (experimental) Start container |
58+
| **setup** | `env` | Setup a new environment |
59+
| | `dev` | Setup development tools (Git, FTP) |
60+
| | `dev-networking` | Configure VirtualBox VM networking |
61+
| | `docker` | Install Docker (CentOS only) |
62+
| **deploy** | `<environment>` | Deploy MediaWiki to environment |
63+
| **update** | `[version]` | Update Meza to version or branch |
64+
65+
### Wiki Operations
66+
| Command | Directives | Description |
67+
|---------|------------|-------------|
68+
| **create** | `wiki` | Create a new wiki (interactive) |
69+
| | `wiki-promptless` | Create wiki without prompts |
70+
| **delete** | `wiki` | Delete a wiki (interactive) |
71+
| | `wiki-promptless` | Delete wiki without prompts |
72+
| | `elasticsearch` | Delete Elasticsearch data |
73+
| **list-wikis** | `<environment>` | List all wikis in environment |
74+
75+
### Maintenance & Backup
76+
| Command | Directives | Description |
77+
|---------|------------|-------------|
78+
| **backup** | `<environment>` | Create environment backup |
79+
| **push-backup** | `<environment>` | Push backup to remote location |
80+
| **maint** | `run-jobs` | Run MediaWiki job queue |
81+
| | `rebuild` | Rebuild search index and SMW |
82+
| | `cleanuploadstash` | Clean upload stash |
83+
| | `encrypt-string` | Encrypt sensitive data |
84+
| | `decrypt-string` | Decrypt data |
85+
86+
### Deployment Management
87+
| Command | Directives | Description |
88+
|---------|------------|-------------|
89+
| **deploy-check** | `<environment>` | Check if environment is deploying |
90+
| **deploy-lock** | `<environment>` | Lock environment for deployment |
91+
| **deploy-unlock** | `<environment>` | Remove deployment lock |
92+
| **deploy-kill** | `<environment>` | Kill deployment and remove lock |
93+
| **deploy-log** | `<environment>` | Get deployment log file path |
94+
| **deploy-tail** | `<environment>` | Follow deployment logs real-time |
95+
96+
### Development & Debug
97+
| Command | Directives | Description |
98+
|---------|------------|-------------|
99+
| **debug** | `<environment> [variable]` | Debug Ansible variables |
100+
| **docker** | `run` | 🧪 Start development container |
38101
| | `exec` | Execute command on container |
102+
| **migrate-wikis** | `<environment>` | Migrate wiki IDs to declarative YAML |
39103

40104
## Getting Help
41105

42106
Every command has directives. If you run any command without directives, it will provide help for that command.
43107

44108
```bash
45-
# Get help for specific commands
109+
# Get help for main commands
46110
meza deploy --help
47111
meza setup --help
48112
meza create --help
113+
meza maint --help
114+
115+
# Get help for deployment management
116+
meza deploy-check --help
117+
meza deploy-tail --help
118+
119+
# Run commands without arguments for specific help
120+
meza backup
121+
meza debug
122+
meza delete
49123
```
50124

51125
## Architecture Overview
52126

53127
- **Environment**: Complete MediaWiki deployment (production, development, etc.)
54-
- **Wiki**: Individual wiki within an environment
128+
- **Wiki**: Individual wiki within an environment
55129
- **Monolith**: Single-server environment (ideal for development)
56130
- **Multi-server**: Distributed deployment across multiple servers
57131

@@ -65,4 +139,4 @@ meza create --help
65139

66140
- [Complete Command Index](index.md) - Detailed documentation for all commands
67141
- [Installation Guide](install.md) - Get started with Meza
68-
- [Setup Guide](setup.md) - Environment configuration
142+
- [Setup Guide](setup.md) - Environment configuration

manual/meza-cmd/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ meza create wiki monolith mywiki "My Wiki"
7070

7171
- [`meza deploy`](deploy.md) - Deploy environments
7272
- [`meza setup`](setup.md) - Set up system components
73-
- [`meza create`](create.md) - Create wikis after deployment
73+
- [`meza create`](create.md) - Create wikis after deployment

0 commit comments

Comments
 (0)