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
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ jobs:
- shell: bash
run: pipx install dist/*.whl && capellactl --version

windows-install: # CAP-055 AC3: the README's Windows steps, as written, in Windows PowerShell 5.1
needs: test
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # the version comes from git tags (scripts/version.py)
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- shell: powershell
run: |
$python = @()
py -3.12 --version
if ($LASTEXITCODE) { $python = @('--python', (Get-Command python).Source); Write-Host "py launcher has no 3.12: using $($python[1])" }
python scripts/readme-windows-steps.py --source "$env:GITHUB_WORKSPACE" --workdir "$env:RUNNER_TEMP\windows-install" --out "$env:RUNNER_TEMP\steps.ps1" @python
if ($LASTEXITCODE) { exit $LASTEXITCODE }
powershell -NoProfile -ExecutionPolicy Bypass -File "$env:RUNNER_TEMP\steps.ps1"

image-smoke: # CAP-001 AC6
needs: test
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ First release, 1.0.0: declarative management of Couchbase Capella through the Ma
`cluster group list|add|remove`; `--single-node`, `--server-version`, `--zone`, `--cmek-id`, `--private-dns` and
`--disk-auto-expansion`; node sizes Capella offers in `cluster options`, with a warning for any other size. Guide:
[docs/custom-clusters.md](docs/custom-clusters.md).
- Backup and restore: cluster backups (cloud snapshots) with `cluster backup schedule show|options|set|delete` and
`cluster backup list|create|retain|delete|restore|restores|regions`; bucket backups with
`bucket backup schedule show|set|delete`, `bucket backup cycle list|get` and
`bucket backup list|get|create|delete|restore|export`. Schedules are recorded as `backupSchedule` in `capella.yaml`
and covered by `plan`, `apply`, `drift` and `sync`. Guide: [docs/backup-restore.md](docs/backup-restore.md).
- Disk types: `cluster disk-types` lists each provider's types with their size range, speed and use; interactive
`cluster create` and `cluster group add` offer them after the node size; `cluster update --disk-type`; disks get
Capella's recommended IOPS for their size, and sizes or IOPS a type does not accept are refused offline.
- `sync` is the one command for `capella.yaml`: it writes the file when there is none, refreshes it, and adds the
organization's projects that are missing (`--skip-project` leaves one out). `import` remains as an alias.
- `sync` keeps the buckets and credentials of a cluster that is turned off (or cannot be read) instead of removing them
Expand All @@ -26,3 +34,6 @@ First release, 1.0.0: declarative management of Couchbase Capella through the Ma
a terminal, and `--quiet` keeps pipeline logs short (`capellactl help ci`).
- Secret redaction everywhere, generated passwords saved locally, API Key Token in the OS keychain.
- `make dist`: source archive, wheel and `SHA256SUMS`, reproducible and versioned from the git tag.
- Windows: step-by-step PowerShell install in the README (checked in CI on Windows PowerShell 5.1), PowerShell
equivalents for the docs' shell commands, and an API Key Token piped from PowerShell (`Get-Clipboard |`) is
accepted with its byte-order mark.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ else, use the Capella UI or the Management API directly.
## Install

capellactl has not had its first release yet, so install it from source. It takes a few minutes and needs
[Git](https://git-scm.com/) and Python 3.10–3.13.
[Git](https://git-scm.com/) and Python 3.10–3.13. The steps below are for macOS and Linux; on Windows, follow
[On Windows (PowerShell)](#on-windows-powershell).

**1. Check your Python version.** On many Macs, `python3` is older than 3.10:

Expand All @@ -78,9 +79,30 @@ capellactl 1.0.0.devN+g… (Management API v4.0)
Licensed under Apache-2.0 · Copyright 2026 Couchbase, Inc.
```

On Windows, activate with `.venv\Scripts\activate` instead. To update later, run `git pull` in the `capellactl`
folder; the environment picks up the new code. Then continue with [Quick start](#quick-start), or the step-by-step
[getting started guide](docs/getting-started.md).
To update later, run `git pull` in the `capellactl` folder; the environment picks up the new code. Then continue
with [Quick start](#quick-start), or the step-by-step [getting started guide](docs/getting-started.md).

### On Windows (PowerShell)

Open **Windows PowerShell** (Start menu → type *PowerShell*) and run each command on its own, in order:

<!-- windows-install:start -->
| Step | Run in PowerShell | You should see / if it fails |
|---|---|---|
| 1. Install Git and Python 3.12 | `winget install --id Git.Git -e`<br>`winget install --id Python.Python.3.12 -e` | Then **close PowerShell and open it again**. No `winget`: install Git from [git-scm.com](https://git-scm.com/download/win) and Python **3.12** from [python.org](https://www.python.org/downloads/windows/), not the newest version (capellactl needs 3.10–3.13), and tick *Add python.exe to PATH* |
| 2. Check Python | `py -3.12 --version` | `Python 3.12.x`. If `python` opens the Microsoft Store, ignore it: use `py` as shown here |
| 3. Download capellactl | `git clone https://github.com/couchbaselabs/capellactl.git`<br>`cd capellactl` | Two separate commands: Windows PowerShell does not accept `&&` |
| 4. Create its environment | `py -3.12 -m venv .venv` | A new `.venv` folder |
| 5. Install it | `.venv\Scripts\python -m pip install -e .` | `Successfully installed … capellactl-…`. `requires a different Python`: step 4 used a Python newer than 3.13; install 3.12 (step 1), delete `.venv` and repeat step 4 |
| 6. Allow activation (once per user) | `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` | Answer `Y`. If your company blocks this, skip steps 6 and 7, and type `.venv\Scripts\capellactl.exe` wherever the docs say `capellactl` |
| 7. Activate (in each new window) | `.venv\Scripts\Activate.ps1` | The prompt starts with `(.venv)`. Without it you get `capellactl is not recognized`. In cmd.exe: `.venv\Scripts\activate.bat` |
| 8. Check capellactl | `capellactl --version` | `capellactl 1.0.0.devN+g… (Management API v4.0)` |
| 9. Make a folder for your environment | `mkdir ~\capella-env`<br>`cd ~\capella-env` | capellactl writes `capella.yaml` in the folder you run it from |
<!-- windows-install:end -->

`configure` keeps the API Key Token in **Windows Credential Manager** (entry `capellactl`) and profiles in
`%APPDATA%\capellactl`. The docs show macOS/Linux commands; [Using the commands in PowerShell](docs/getting-started.md#using-the-commands-in-powershell)
lists the few that are typed differently (passwords in `$env:`, long commands, pasting the token).

### After the first release (1.0.0)

Expand Down Expand Up @@ -147,7 +169,8 @@ Passwords are never written to `capella.yaml` or printed: give them as `--passwo
| Document | For |
|---|---|
| [Getting started](docs/getting-started.md) | Step-by-step walkthrough with example output, from install to deleting a cluster, and troubleshooting |
| [Custom clusters and service groups](docs/custom-clusters.md) | Any size and service layout: several service groups (MDS) with `--group`, adding and removing groups, single-node and advanced options |
| [Custom clusters and service groups](docs/custom-clusters.md) | Any size and service layout: several service groups (MDS) with `--group`, adding and removing groups, disk types, single-node and advanced options |
| [Backup and restore](docs/backup-restore.md) | Cluster and bucket backup schedules, listing backups, backing up before a change, restoring a cluster or a bucket, downloading a bucket backup |
| [Runbook](docs/runbook.md) | Day-2 tasks with the exact command and expected output, a copy-paste reference of every command, and a 20-minute demo script |
| [capella.yaml reference](docs/reference.md) | Every field: type, default, whether it can change, API mapping (generated from the schema) |
| [Examples](docs/release-1.0.0/examples/) | [Annotated reference](docs/release-1.0.0/examples/capella.yaml), [single-node dev](docs/release-1.0.0/examples/single-node-dev.yaml), [GCP production](docs/release-1.0.0/examples/gcp-prod.yaml), [Azure production](docs/release-1.0.0/examples/azure-prod.yaml), [minimal](docs/release-1.0.0/examples/minimal-cluster.yaml) |
Expand Down
6 changes: 4 additions & 2 deletions capellactl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ from PyInstaller.utils.hooks import collect_data_files, copy_metadata

ROOT = Path(SPECPATH) # noqa: F821 - defined by PyInstaller

# Read at run time from inside the package: the config schema, the init presets, the known node sizes and the help pages.
# Read at run time from inside the package: the config schema, the init presets, the known node sizes, the disk types
# and the help pages.
datas = [(str(ROOT / "capellactl" / "config" / "schema.json"), "capellactl/config"),
(str(ROOT / "capellactl" / "config" / "presets.yaml"), "capellactl/config"),
(str(ROOT / "capellactl" / "config" / "compute.yaml"), "capellactl/config")]
(str(ROOT / "capellactl" / "config" / "compute.yaml"), "capellactl/config"),
(str(ROOT / "capellactl" / "config" / "disks.yaml"), "capellactl/config")]
datas += [(str(p), "capellactl/help") for p in sorted((ROOT / "capellactl" / "help").glob("*.md"))]
# Licence and notices, inside the executable as well as next to it in the release (CAP-044, AC7).
datas += [(str(ROOT / name), ".") for name in ("LICENSE", "NOTICE", "THIRD_PARTY_NOTICES.md", "BINARY_NOTICES.md")]
Expand Down
Loading
Loading