11# Cloud Starter
22
3- A transparent learning project to practice Product Ownership and disciplined delivery.
4-
3+ A transparent learning project to practice Product Ownership and disciplined delivery.
54** Product Goal:** Enable developers to self-serve a few on-demand servers for tests within minutes.
65
76---
87
98## Sprint 2 — MVP
109
11- ** Sprint Goal:** Deliver an ** installable ` spin ` CLI** (` pip install -e . ` ) that exposes
12- ` up | status | down ` (dry-run only) and define a deterministic tag model for upcoming AWS calls.
10+ ** Sprint Goal:** Deliver an ** installable ` spin ` CLI** (` pip install -e . ` ) that exposes ` up | status | down ` .
11+ By default the CLI is ** dry-run** and ** does not contact AWS** . Live calls only happen if ** both** :
12+ 1 ) you pass ` --apply ` , ** and**
13+ 2 ) the environment has ` SPIN_LIVE=1 ` .
14+
15+ This gives us a safe “seatbelt” while we learn.
1316
14- ** Scope (this sprint)**
15- - Single provider: ** AWS** (no live API calls yet)
16- - Commands: ` spin up --count X ` , ` spin status ` , ` spin down ` (all ** dry-run ** output)
17- - Deterministic tags for future resources:
17+ ### Scope (this sprint)
18+ - Single provider: ** AWS**
19+ - Commands: ` spin up --count X ` , ` spin status ` , ` spin down `
20+ - Deterministic tag model for future resources:
1821 - ` Project=cloud-starter `
1922 - ` ManagedBy=spin `
20- - ` Owner=<github -handle> `
23+ - ` Owner=<your -handle> ` (required)
2124 - ` SpinGroup=<id> `
2225
23- ** Non-goals (not in this sprint)**
26+ ### Non-goals (not in this sprint)
2427- Multi-cloud (Azure/GCP), Terraform/IaC
2528- SSH/provisioners, IAM hardening
2629- Autoscaling, budgets/policies beyond basic teardown
2730- Monitoring/alerts
28- - Real instance lifecycle (that starts next)
31+ - Real instance lifecycle beyond the minimal demo
2932
3033---
3134
3235## Prerequisites
3336
3437- Python ** >= 3.11**
35- - (For later sprints) AWS credentials & region configured (` AWS_PROFILE ` or envs / ` ~/.aws ` )
36- - Default region used by ` spin ` : ** eu-north-1** (override with ` --region ` or ` SPIN_REGION ` )
37-
38- ---
39-
40- ## Run tests
41- ```
42- pytest -q
43- ```
38+ - ** Owner is required:** set ` SPIN_OWNER ` to your handle/email
39+ - Default region: ** eu-north-1** (override with ` SPIN_REGION ` or ` --region ` )
40+ - For live calls (later): configure AWS credentials (` AWS_PROFILE ` or ` ~/.aws ` )
4441
4542---
4643
4744## Quick start (dev)
4845
49- Install in a virtual environment using editable mode:
50-
5146``` bash
5247python -m venv .venv
5348# Windows: .venv\Scripts\activate
@@ -57,9 +52,10 @@ python -m pip install -U pip
5752pip install -e .
5853````
5954
60- Verify the CLI and try the dry-run commands :
55+ Check the CLI and try dry-run:
6156
6257` ` ` bash
58+ export SPIN_OWNER=@yourhandle
6359spin --help
6460spin up --count 2
6561spin status
@@ -68,12 +64,42 @@ spin down
6864
6965** Notes**
7066
71- * All commands are ** dry-run** in Sprint 2 (they print what would happen).
72- * Environment overrides:
67+ * With no ` --apply` or without ` SPIN_LIVE=1` , output is JSON previews and ** no AWS calls** are made.
68+ * ` spin down` requires ` --group` for destructive actions (override via ` SPIN_ALLOW_GLOBAL_DOWN=1` only if you really mean it).
69+
70+ ---
71+
72+ # # Live operations (guarded; optional)
73+
74+ Only when you’re ready and have credentials:
75+
76+ ` ` ` bash
77+ export SPIN_OWNER=@yourhandle
78+ export SPIN_LIVE=1
79+ spin up --count 1 --apply # touches AWS
80+ spin status
81+ spin down --group <id> --apply
82+ ` ` `
83+
84+ ---
85+
86+ # # Environment variables
87+
88+ * ` SPIN_OWNER` (required): logical owner tag.
89+ * ` SPIN_REGION` (optional): default region (falls back to ` AWS_DEFAULT_REGION` then ` eu-north-1` ).
90+ * ` SPIN_DRY_RUN` (default ` 1` ): when ` 1` , ` status` also avoids AWS.
91+ * ` SPIN_LIVE` (default ` 0` ): must be ` 1` ** and** you must pass ` --apply` to perform live actions.
92+ * ` SPIN_ALLOW_GLOBAL_DOWN` (default ` 0` ): allow ` down` without ` --group` (dangerous; owner-scoped still).
93+
94+ ---
95+
96+ # # Run tests
97+
98+ ` ` ` bash
99+ pytest -q
100+ ` ` `
73101
74- * ` SPIN_REGION` (default ` eu-north-1` )
75- * ` AWS_PROFILE` (optional; used in later sprints)
76- * ` SPIN_GROUP` (default ` dev` ) — used in tags to group resources
102+ Tests cover dry-run behavior and a safe “live” flow under ` moto` .
77103
78104---
79105
@@ -91,11 +117,11 @@ spin down
91117
92118# # Roadmap (high level)
93119
94- * ** Sprint 2 (this sprint):** installable CLI, dry-run commands, tag model
95- * ** Next:** wire minimal AWS calls in ` eu-north-1` using the tag schema ; ` status` lists instances; safe ` down`
120+ * ** Sprint 2 (this sprint):** installable CLI, dry-run commands, tag model, safety interlocks
121+ * ** Next:** wire minimal AWS calls in ` eu-north-1` ; ` status` lists instances; safe ` down`
96122
97123---
98124
99125# # License
100126
101- MIT
127+ MIT
0 commit comments