Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ jobs:
test-venv/bin/pip install dist/*.whl
- name: Smoke test CLI
run: |
test-venv/bin/devops-learn doctor
test-venv/bin/devops-learn explain "Terraform state"
# Test outside the repository to ensure no accidental source dependencies
cd /tmp
$GITHUB_WORKSPACE/test-venv/bin/devops-learn
$GITHUB_WORKSPACE/test-venv/bin/devops-learn --help
$GITHUB_WORKSPACE/test-venv/bin/devops-learn doctor
$GITHUB_WORKSPACE/test-venv/bin/devops-learn report --help
$GITHUB_WORKSPACE/test-venv/bin/devops-learn ai-test --help
$GITHUB_WORKSPACE/test-venv/bin/devops-learn explain "Terraform state"

83 changes: 83 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Getting Started with DevOps Learn

`devops-learn` is an AI-assisted DevOps learning CLI that guides you through a security-gated Azure deployment lifecycle using real engineering tools.

## Installation

You can install `devops-learn` in an isolated virtual environment from the wheel, or in development mode.

### Production Install (from wheel)
```bash
python -m venv venv
source venv/bin/activate
pip install devops_learn-0.2.0-py3-none-any.whl
```

### Development Install (from source)
```bash
git clone https://github.com/howlcipher/DevOps-Learn-by-Doing.git
cd DevOps-Learn-by-Doing
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

## The Workflow

The core philosophy of `devops-learn` is to move from simulation to real execution in controlled steps.
The recommended progression is:

### 1. Check Readiness
Start by checking your system capabilities:
```bash
devops-learn doctor
```
Install any missing prerequisites (Docker, Terraform, Azure CLI, Trivy, Conftest) according to the output.

### 2. Set Up Learner Profile (Optional)
Configure your experience level to customize AI explanations:
```bash
devops-learn profile --set docker=strong terraform=beginner
```

### 3. Understand Your Workload
Initialize the project context and get AI-assisted architecture recommendations:
```bash
devops-learn init .
```

### 4. Build Locally
Run the real local vertical slice (pytest, flake8, and local Docker build):
```bash
devops-learn local .
```

### 5. Secure
Scan your code and configurations with Trivy and Conftest:
```bash
devops-learn security scan .
```

### 6. Infrastructure as Code
Plan your Terraform configuration safely:
```bash
devops-learn terraform .
```

### 7. Deploy to Azure
Execute the real, approval-controlled Container Apps path:
```bash
devops-learn deploy .
```
*Note: Azure deployment remains IMPLEMENTED but AWAITING LIVE VERIFICATION until an actual acceptance run provides proof.*

### 8. Prove Your Work
Generate an engineering evidence report from your session:
```bash
devops-learn report
```

You can view your active configuration anytime using:
```bash
devops-learn config show
```
22 changes: 13 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -682,19 +682,23 @@ <h3>Azure lifecycle acceptance run</h3>
<span class="window-controls" aria-hidden="true"><span></span><span></span><span></span></span>
</div>
<div class="terminal">
<p><span class="dim"># install the project and development dependencies</span></p>
<p>pip install -e ".[dev]"</p>
<p><span class="dim"># 01 CHECK</span></p>
<p>devops-learn doctor</p>
<br>
<p><span class="dim"># set your learner profile</span></p>
<p>devops-learn profile --set docker=strong terraform=beginner</p>
<p><span class="dim"># 02 UNDERSTAND</span></p>
<p>devops-learn init .</p>
<br>
<p><span class="dim"># run a real local vertical slice</span></p>
<p>devops-learn local projects/api_platform</p>
<p><span class="dim"># 03 BUILD</span></p>
<p>devops-learn local .</p>
<br>
<p><span class="dim"># simulate the full cloud workflow</span></p>
<p>devops-learn analyze projects/api_platform --mode collaborative --depth learning</p>
<p><span class="dim"># 04 SECURE</span></p>
<p>devops-learn security scan .</p>
<br>
<p class="info">Other commands: init · review · history · explain</p>
<p><span class="dim"># 05 DEPLOY</span></p>
<p>devops-learn deploy .</p>
<br>
<p><span class="dim"># 06 PROVE</span></p>
<p>devops-learn report</p>
</div>
</div>
</div>
Expand Down
25 changes: 25 additions & 0 deletions src/devops_learn/cli/commands/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""`devops-learn config`: display configuration settings."""

from __future__ import annotations

import argparse

from devops_learn.bootstrap import Platform
from devops_learn.config.settings import load_settings


def register(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
parser = subparsers.add_parser("config", help="Manage configuration")
subparsers_config = parser.add_subparsers(dest="config_command", required=True)
show_parser = subparsers_config.add_parser("show", help="Show current configuration")
show_parser.set_defaults(handler=run_show)


def run_show(args: argparse.Namespace, platform: Platform) -> None:
settings = load_settings()
has_key = bool(settings.anthropic_api_key)

print("DEVOPS-LEARN CONFIGURATION")
print(f"{'Database path':<25} {settings.db_path}")
print(f"{'AI Provider':<25} {settings.ai_provider}")
print(f"{'Anthropic credential':<25} {'Configured' if has_key else 'Not configured'}")
2 changes: 1 addition & 1 deletion src/devops_learn/cli/commands/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def register(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]")
def run(args: argparse.Namespace, platform: Platform) -> None:
session = platform.session_service.latest()
if not session:
print("No sessions found.")
print("No engagement evidence recorded yet.\n\nStart with:\ndevops-learn init <project>")
return
assert session.id is not None

Expand Down
2 changes: 2 additions & 0 deletions src/devops_learn/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
security,
terraform,
ai_test,
config,
)
from devops_learn.config.settings import load_settings
from devops_learn.domain.enums import ExecutionMode
Expand Down Expand Up @@ -59,6 +60,7 @@
doctor,
report,
ai_test,
config,
)


Expand Down
Loading