Skip to content

Commit 9b2aafc

Browse files
authored
Merge pull request #118 from ObolNetwork/app-install
Created app install/sync/list/delete flow
2 parents 56cb567 + 69f7958 commit 9b2aafc

File tree

6 files changed

+1077
-93
lines changed

6 files changed

+1077
-93
lines changed

README.md

Lines changed: 167 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,27 @@ obol stack up
109109
obol network install ethereum
110110
# This creates a deployment like: ethereum-nervous-otter
111111

112+
# Deploy the network to the cluster
113+
obol network sync ethereum/nervous-otter
114+
112115
# Install another network configuration
113116
obol network install ethereum --network=holesky
114117
# This creates a separate deployment like: ethereum-happy-panda
115118

119+
# Deploy the second network
120+
obol network sync ethereum/happy-panda
121+
116122
# View cluster resources (opens interactive terminal UI)
117123
obol k9s
118124
```
119125

120126
The stack will create a local Kubernetes cluster. Each network installation creates a uniquely-namespaced deployment instance, allowing you to run multiple configurations simultaneously.
121127

122128
> [!TIP]
123-
> Use `obol network list` to see all available networks. Customize installations with flags (e.g., `obol network install ethereum --network=holesky --execution-client=geth`) to create different deployment configurations.
129+
> Use `obol network list` to see all available networks. Customize installations with flags (e.g., `obol network install ethereum --network=holesky --execution-client=geth`) to create different deployment configurations. After installation, deploy to the cluster with `obol network sync <network>/<id>`.
130+
131+
> [!TIP]
132+
> You can also install arbitrary Helm charts as applications using `obol app install <chart>`. Find charts at [Artifact Hub](https://artifacthub.io).
124133
125134
## Managing Networks
126135

@@ -159,25 +168,51 @@ obol network install ethereum
159168

160169
Each network installation creates a **unique deployment instance** with:
161170
1. Network configuration templated and saved to `~/.config/obol/networks/ethereum/<namespace>/`
162-
2. Resources deployed to a unique Kubernetes namespace (e.g., `ethereum-nervous-otter`)
171+
2. Configuration files ready to be deployed to the cluster
163172
3. Isolated persistent storage for blockchain data
164173

174+
### Sync a Network
175+
176+
After installing a network configuration, deploy it to the cluster:
177+
178+
```bash
179+
# Deploy the network to the cluster
180+
obol network sync ethereum/<namespace>
181+
182+
# Or use the namespace format
183+
obol network sync ethereum-nervous-otter
184+
```
185+
186+
The sync command:
187+
- Reads the configuration from `~/.config/obol/networks/<network>/<namespace>/`
188+
- Executes helmfile to deploy resources to a unique Kubernetes namespace
189+
- Creates isolated persistent storage for blockchain data
190+
165191
**Multiple deployments:**
166192

167193
You can install the same network type multiple times with different configurations. Each deployment is isolated in its own namespace:
168194

169195
```bash
170196
# Install mainnet with Geth + Prysm
171197
obol network install ethereum --network=mainnet --execution-client=geth --consensus-client=prysm
172-
# Creates: ethereum-nervous-otter namespace
198+
# Creates configuration: ethereum-nervous-otter
199+
200+
# Deploy to cluster
201+
obol network sync ethereum/nervous-otter
173202

174203
# Install Holesky testnet with Reth + Lighthouse
175204
obol network install ethereum --network=holesky --execution-client=reth --consensus-client=lighthouse
176-
# Creates: ethereum-laughing-elephant namespace
205+
# Creates configuration: ethereum-laughing-elephant
206+
207+
# Deploy Holesky to cluster
208+
obol network sync ethereum/laughing-elephant
177209

178210
# Install another Holesky instance for testing
179211
obol network install ethereum --network=holesky
180-
# Creates: ethereum-happy-panda namespace
212+
# Creates configuration: ethereum-happy-panda
213+
214+
# Deploy second Holesky instance
215+
obol network sync ethereum/happy-panda
181216
```
182217

183218
**Ethereum configuration options:**
@@ -203,10 +238,11 @@ Each network installation creates an isolated deployment with a unique namespace
203238
- **Persistent volumes**: Blockchain data stored in `~/.local/share/obol/<cluster-id>/networks/<network>_<namespace>/`
204239
- **Service endpoints**: Internal cluster DNS per deployment (e.g., `ethereum-rpc.ethereum-nervous-otter.svc.cluster.local`)
205240

206-
**Two-stage templating:**
207-
1. CLI flags template the helmfile values section with your configuration
208-
2. Helmfile processes the template and deploys to the cluster
209-
3. Configuration is saved locally for future updates and management
241+
**Install and Sync workflow:**
242+
1. **Install**: `obol network install` generates configuration files locally from CLI flags
243+
2. **Customize**: Edit values and templates in `~/.config/obol/networks/<network>/<id>/` (optional)
244+
3. **Sync**: `obol network sync` deploys the configuration to the cluster using helmfile
245+
4. **Update**: Modify configuration and re-sync to update the deployment
210246

211247
### Delete a Network Deployment
212248

@@ -234,6 +270,106 @@ This command will:
234270
> [!NOTE]
235271
> You can have multiple deployments of the same network type. Deleting one deployment (e.g., `ethereum-nervous-otter`) does not affect other deployments (e.g., `ethereum-happy-panda`).
236272
273+
## Managing Applications
274+
275+
The Obol Stack supports installing arbitrary Helm charts as managed applications. Each application installation creates an isolated deployment with its own namespace, similar to network deployments.
276+
277+
### Install an Application
278+
279+
Install any Helm chart using one of the supported reference formats:
280+
281+
```bash
282+
# Install using repo/chart format (resolved via ArtifactHub)
283+
obol app install bitnami/redis
284+
obol app install bitnami/[email protected]
285+
286+
# Install using direct URL
287+
obol app install https://charts.bitnami.com/bitnami/redis-19.0.0.tgz
288+
289+
# Install with custom name and ID
290+
obol app install bitnami/postgresql --name mydb --id production
291+
```
292+
293+
Find charts at [Artifact Hub](https://artifacthub.io).
294+
295+
**Supported chart reference formats:**
296+
- `repo/chart` - Resolved via ArtifactHub (e.g., `bitnami/redis`)
297+
- `repo/chart@version` - Specific version (e.g., `bitnami/[email protected]`)
298+
- `https://.../*.tgz` - Direct URL to chart archive
299+
300+
**What happens during installation:**
301+
1. Resolves the chart reference (via ArtifactHub for repo/chart format)
302+
2. Fetches default values from the chart
303+
3. Generates helmfile.yaml that references the chart remotely
304+
4. Saves configuration to `~/.config/obol/applications/<app>/<id>/`
305+
306+
**Installation options:**
307+
- `--name`: Application name (defaults to chart name)
308+
- `--version`: Chart version (defaults to latest)
309+
- `--id`: Deployment ID (defaults to generated petname)
310+
- `--force` or `-f`: Overwrite existing deployment
311+
312+
### Sync an Application
313+
314+
After installing an application, deploy it to the cluster:
315+
316+
```bash
317+
# Deploy the application
318+
obol app sync postgresql/eager-fox
319+
320+
# Check status
321+
obol kubectl get all -n postgresql-eager-fox
322+
```
323+
324+
The sync command:
325+
- Reads configuration from `~/.config/obol/applications/<app>/<id>/`
326+
- Executes helmfile to deploy resources
327+
- Creates unique namespace: `<app>-<id>`
328+
329+
### List Applications
330+
331+
View all installed applications:
332+
333+
```bash
334+
# Simple list
335+
obol app list
336+
337+
# Detailed information
338+
obol app list --verbose
339+
```
340+
341+
### Delete an Application
342+
343+
Remove an application deployment and its cluster resources:
344+
345+
```bash
346+
# Delete with confirmation prompt
347+
obol app delete postgresql/eager-fox
348+
349+
# Skip confirmation
350+
obol app delete postgresql/eager-fox --force
351+
```
352+
353+
This command will:
354+
- Remove the Kubernetes namespace and all deployed resources
355+
- Delete the configuration directory and chart files
356+
357+
### Customize Applications
358+
359+
After installation, you can modify the values file to customize your deployment:
360+
361+
```bash
362+
# Edit application values
363+
$EDITOR ~/.config/obol/applications/postgresql/eager-fox/values.yaml
364+
365+
# Re-deploy with changes
366+
obol app sync postgresql/eager-fox
367+
```
368+
369+
**Local files:**
370+
- `helmfile.yaml`: Deployment configuration (references chart remotely)
371+
- `values.yaml`: Configuration values (edit to customize)
372+
237373
### Managing the Stack
238374

239375
**Start the stack:**
@@ -354,12 +490,19 @@ The Obol Stack follows the [XDG Base Directory](https://specifications.freedeskt
354490
│ ├── helmfile.yaml # Base stack configuration
355491
│ ├── base/ # Base Kubernetes resources
356492
│ └── values/ # Configuration templates (ERPC, frontend)
357-
└── networks/ # Installed network deployments
358-
├── ethereum/ # Ethereum network deployments
359-
│ ├── <namespace-1>/ # First deployment instance
360-
│ └── <namespace-2>/ # Second deployment instance
361-
├── helios/ # Helios network deployments
362-
└── aztec/ # Aztec network deployments
493+
├── networks/ # Installed network deployments
494+
│ ├── ethereum/ # Ethereum network deployments
495+
│ │ ├── <namespace-1>/ # First deployment instance
496+
│ │ └── <namespace-2>/ # Second deployment instance
497+
│ ├── helios/ # Helios network deployments
498+
│ └── aztec/ # Aztec network deployments
499+
└── applications/ # Installed application deployments
500+
├── redis/ # Redis deployments
501+
│ └── <id>/ # Deployment instance
502+
│ ├── helmfile.yaml # Deployment configuration
503+
│ └── values.yaml # Configuration values
504+
└── postgresql/ # PostgreSQL deployments
505+
└── <id>/ # Deployment instance
363506
```
364507
365508
**Data directory structure:**
@@ -453,12 +596,15 @@ If you're contributing to the Obol Stack or want to run it from source, you can
453596
│ │ ├── helmfile.yaml
454597
│ │ ├── base/
455598
│ │ └── values/
456-
│ └── networks/ # Installed network deployments
457-
│ ├── ethereum/ # Ethereum network deployments
458-
│ │ ├── <namespace-1>/ # First deployment instance
459-
│ │ └── <namespace-2>/ # Second deployment instance
460-
│ ├── helios/
461-
│ └── aztec/
599+
│ ├── networks/ # Installed network deployments
600+
│ │ ├── ethereum/ # Ethereum network deployments
601+
│ │ │ ├── <namespace-1>/ # First deployment instance
602+
│ │ │ └── <namespace-2>/ # Second deployment instance
603+
│ │ ├── helios/
604+
│ │ └── aztec/
605+
│ └── applications/ # Installed application deployments
606+
│ ├── redis/
607+
│ └── postgresql/
462608
└── data/ # Persistent volumes (network data)
463609
```
464610

0 commit comments

Comments
 (0)