Files
git.stella-ops.org/docs/21_INSTALL_GUIDE.md

197 lines
7.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 21 · Installation & QuickStart Guide — **StellaOps**
*(v2.0  12Jul2025 · supersedes v1.1)*
> **Scope** — Docker Compose or Kubernetes deployment of the **opensource Core** (backend+Redis).
> For Plus/Pro features (CryptoPro TLS, LDAP, OUK, Enforcement) see the private *Commercial Install Guide*.
---
## 0Contents
0. Audience & prerequisites
1. Decide: Compose or Kubernetes
2. Quick start (Compose, 5min)
3. Verifying image signatures & SBOMs
4. First login & API token creation
5. Optional TLS & reverseproxy patterns
6. Kubernetes helmchart primer (beta)
7. Configuration cheatsheet
8. Upgrades & rollbacks
9. Uninstall / data wipe
10. Troubleshooting matrix
11. Getting help
12. Change log
---
## 0Audience & prerequisites
| Item | Minimum | Notes |
| --------- | ---------------------- | ------------------------------ |
| OS | Ubuntu22.04 or Alma9 | x8664 or ARM64 |
| CPU / RAM | 2vCPU / 2GB | Devlaptop baseline |
| Disk | 10GB SSD | SBOM + Trivy cache |
| Docker | Engine24+Composev2 | `dockerv` |
| Network | HTTPS 443 open | Optional LetsEncrypt HTTP01 |
---
## 1Choose your path
| Path | When to pick | Doc section |
| --------------------- | ----------------------------- | ----------- |
| **DockerCompose** | Single VM, PoC, laptop | §2 |
| **Kubernetes (Helm)** | Existing K3s, RKE2, EKS, etc. | §6 |
---
## 2Quick start — DockerCompose (5minutes)
### 2.1Download stack files (signed)
```bash
curl -LO https://get.stellaops.org/compose-core.yml
curl -LO https://get.stellaops.org/compose-core.yml.sig
cosign verify-blob \
--key https://stella-ops.org/keys/cosign.pub \
--signature compose-core.yml.sig \
compose-core.yml
```
### 2.2Set secrets
```bash
export REDIS_PASS=$(openssl rand -base64 18)
echo "REDIS_PASS=$REDIS_PASS" >> .env
```
### 2.3Launch
```bash
docker compose --env-file .env -f compose-core.yml pull
docker compose --env-file .env -f compose-core.yml up -d
```
Containers pulled started in <60s:
ghcr.io/stellaops/backend:1.5.0
redis:7.2-alpine
### 2.4Health check
```bash
curl -k https://localhost:8080/health
# → {"redis":"OK","version":"1.5.0","commit":"5a1b7d3"}
```
Open <https://localhost:8080> (accept selfsigned cert).
## 3Verify image provenance (optional but recommended)
```bash
BACKEND_DIGEST=sha256:… # copy from `docker images --digests`
cosign verify \
ghcr.io/stellaops/backend@$BACKEND_DIGEST \
--key https://stella-ops.org/keys/cosign.pub
```
SBOM lives in /usr/share/stellaops/sbom.spdx.json inside the image; auditors may ingest it directly.
##4Understanding the Freetier quota (333scans /UTC day)
StellaOps Core is completely free to use, but to prevent abuse the backend enforces a **daily quota of 333 scans per API token**.
* At **200 scans** a **yellow dashboard banner** reminds you of the limit (≈60% usage).
* Between **333363** scans the `/scan` endpoint responds **`429 Too Many Requests`** and a **`RetryAfter: 5`** header.
* Beyond **363** calls the server imposes a **hard 60s waitwall** (`RetryAfter: 60`).
* The counter resets at **UTC midnight**; no manual action required.
* Upgrade paths:
* **Selfhosted Core** with a second API token (still 333/day).
* **Plus / Pro licences** (unlimited).
If you script CI pipelines, honour the `RetryAfter` header to avoid unnecessary retries.
## 6First login & API token
1. Sign in with default **admin / changeme**.
2. Navigate **SettingsAPI TokensGenerate**.
3. **Each token inherits the 333scan quota** by default.
4. Store the token securely in your CI secret vault.
## 7TLS & reverseproxy options
| Scenario | Command / config |
| ------------ | --------------------------------------------------------------------------------------------------- |
| Dev l | aptop Keep backend selfsigned. |
| Public | VM + LetsEncrypt Install Caddy: caddy reverseproxy --from stella.example.com --to localhost:8080 |
| Corporate CA | Replace /certs/cert.pem + /certs/key.pem, set TLSPROVIDER=None. |
## 8Kubernetes (Helm chart β)
```bash
helm repo add stella https://charts.stella-ops.org
helm install stella-core stella/core \
--set redis.password=$REDIS_PASS \
--set ingress.host=stella.example.com
```
Resources: 300m CPU / 512Mi backend, 128Mi Redis.
NetworkPolicy, PodSecurity & CosignVerify admission controller included.
## 9Configuration cheatsheet (appsettings.json or envvars)
| Key | Default | Example |
| ------------------- | ----------- | ---------------------------- |
| ScannerPool.Workers | 1 | SCANNERPOOL__WORKERS=4 |
| FeedMerger.Cron | 0 1 ** * | FEEDMERGER__CRON="30 2 ** *" |
| Redis.Password | — | REDIS__PASSWORD=$REDIS_PASS |
| TlsProvider | OpenSslGost | TLSPROVIDER=None |
## 10Upgrades & rollbacks
```bash
# pin digest before prod rollout
docker pull ghcr.io/stellaops/backend@sha256:<NEW_DIGEST>
docker compose up -d
# rollback
docker compose up -d backend@sha256:<OLD_DIGEST>
```
Minor (Y) upgrades are nonbreaking; major (X) may change CLI flags.
## 11 Uninstall
```bash
docker compose -f compose-core.yml down -v
docker volume prune -f
rm compose-core.yml .env
```
## 12Troubleshooting matrix
| Symptom | Likely cause | Remedy |
| -------------------- | -------------------------------------- | ----------------------------------------------------------------- |
| 502 via Nginx | Backend selfsigned cert not trusted | proxy_ssl_verify off; or use proper CA |
| Feed age banner red | Cron blocked by systemd timezone skew | Run: docker exec backend dotnet Stella.Backend feed merge |
| Scan >10s | Cold Trivy DB | Second run should drop to <5s; else raise CPU / use remote mode |
## 13Getting help
* Install issues: ops@stellaops.org (rolebased mailbox).
* Security reports: security@stellaops.org (GPG key available).
* Community chat: Telegram @stellaopsxw.
* Docs index: <https://stellaops.org/docs>.
## 14Change log
| Version | Date | Notes |
| ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------- |
| v2.0 | 20250712 | Signed download, Cosign verification, secrets primer, TLS patterns, Helm chart, rollback steps, rolebased support addresses. |
| v1.1 | 20250711 | Original Core guide. |
(End of Install Guide v2.0 — Core Edition)