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
41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Obol Stack

A repository for distributing and running decentralised applications, powered by Kubernetes and Helm.
![Obol Logo](https://obol.tech/obolnetwork.png)
<h1 align="center">The Obol Stack: Decentralised Applications For Ethereum</h1>

## Overview

The Obol Stack is a framework to make it easier to distribute dApps, and easier to install them. The stack is built on Kubernetes, with Helm as a package management system.
The Obol Stack is a framework to make it easier to distribute decentralised applications (dApps), and easier to install and run them locally. The stack is built on [Kubernetes](https://kubernetes.io), with [Helm](https://helm.sh/) as a package management system.

## Getting Started

The easiest way to get started is to use download the `obolup` installer. `obolup` keeps your stack running the latest versions of its software.
> [!IMPORTANT]
> The Obol Stack is alpha software. It is not complete, and it may not be working smoothly. If you encounter an issue that does not appear to be documented, please open a [github issue](http://github.com/obolNetwork/obol-stack/issues) if an appropriate one is not already present.
>
> See [here](./obolup/README.md#supported-architectures) for the latest on OS and architectures supported.

### Pre-requisites

Running the Obol Stack locally requires a [Docker](https://www.docker.com/) engine. Install Docker for Linux using one of the options [here](https://docs.docker.com/engine/install/). Install Docker Desktop for Other Operating Systems [here](https://docs.docker.com/desktop/).

> [!TIP]
> If you use Docker Desktop, be sure to go to the settings section, resources tab, and allocate most or all of your CPUs and most of your disk space. The stack won't sync a local L1 node if there is not enough available disk space.

Once you have Docker installed, the easiest way to bootstrap the stack is to use the `obolup` installer. `obolup` keeps your stack running the latest versions of its software.

```sh
# This mode of installation is not yet live, please use the repo clone approach until this message is removed

# Add the `obolup` program to your path
curl -L https://stack.obol.org | sudo bash

Expand All @@ -26,6 +39,16 @@ sudo chmod u+x ./obolup/obolup
./obolup/obolup
```

More advanced usage of `obolup` will be documented [here](./obolup/README.md).

## Stack Overview

The default installation of the Stack configures an Ethereum L1 light client (using [Helios](https://github.com/a16z/helios)) and also attempts to sync an L1 full node ([Erigon](https://github.com/erigontech/erigon)). Both sit behind a specialised load balancer called [eRPC](https://erpc.cloud/). The stack aims to provide a high quality L1 RPC for all dApps installed on the stack. The default address for this RPC is:
```bash
# Obol Stack L1 JSON-RPC API
http://l1-rpc-erpc.l1.cluster.svc.local
```

### Installing an Obol App (Helm Chart)

Here's an example of adding on a popular Ethereum sidecar called contributoor, built by the EthPandaOps team, which streams data from your full node to their backend for analysis and visualisation.
Expand Down Expand Up @@ -53,11 +76,17 @@ Each Obol App has a `values.yaml` file with default values. You can customize th
obol install <app-store-name>/<chart-name> --values custom-values.yaml
```

### Using advanced tooling

The `obol` CLI is intended to be a simple command-line user interface to simplify the use of the Obol Stack for non-developers, it is a work in progress, and does not cover many advanced use cases that Kubernetes and Helm can offer. If you are an experienced Kubernetes user, `obolup` also installs [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) and [`helm`](https://helm.sh/docs/helm/helm/), such that you can manage your stack with the tooling you are used to.

If you encounter node management requirements that an end-user might need but cannot achieve with the Obol CLI, instead needing to use `kubectl` or `helm`, consider opening a feature request issue on the [obol-cli](https://github.com/ObolNetwork/obol-cli/issues) repo.

## Project Status

This project is currently in alpha, and should not be used in production.

The stack aims to support all popular Kubernetes backends, with a developer experience designed to be useful for local app development, through to production deployment and management.
The stack aims to support all popular Kubernetes backends and all Ethereum client types, with a developer experience designed to be useful for local app development, through to production deployment and management.

## Contributing

Expand Down
16 changes: 16 additions & 0 deletions obolup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# `obolup`

`obolup` is a script for launching (and updating) the Obol Stack. It is in early Alpha, and subject to breaking changes. It is not yet recommended as a production runtime.

## Supported Architectures

| Operating System | Architecture | Supported |
|------------------|--------------|-----------|
| Linux | amd64 | 🚧 |
| Linux | arm64 | 🚧 |
| macOS | amd64 | ❌ |
| macOS | arm64 | 🚧 |
| Windows | amd64 | ❌ |
| Windows | arm64 | ❌ |
| FreeBSD | amd64 | ❌ |
| FreeBSD | arm64 | ❌ |
34 changes: 20 additions & 14 deletions obolup/obolup
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,18 @@ install_helm() {
log_info "helm in not installed."
log_info "Installing helm..."
# Download the latest release
ensure curl -sSLo helm.tar.gz "https://get.helm.sh/helm-$LATEST_RELEASE-$PLATFORM-$ARCHITECTURE.tar.gz"
ensure curl -sSL -O "https://get.helm.sh/helm-$LATEST_RELEASE-$PLATFORM-$ARCHITECTURE.tar.gz"

# Validate the binary (optional)
ensure curl -sSLo helm.tar.gz.sha256sum "https://get.helm.sh/helm-$LATEST_RELEASE-$PLATFORM-$ARCHITECTURE.tar.gz.sha256sum"
echo "$(cat helm.tar.gz.sha256sum) helm.tar.gz" | sha256sum --check || log_error "helm checksum validation failed. helm installation failed."
echo "$(cat helm.tar.gz.sha256sum)" | sha256sum --check --status || log_error "helm checksum validation failed. helm installation failed."

# Proceed to install
tar -xzf helm.tar.gz
chmod +x helm
sudo mv helm /usr/local/bin/
rm helm.tar.gz helm.tar.gz.sha256sum
ensure tar -xzf helm-$LATEST_RELEASE-$PLATFORM-$ARCHITECTURE.tar.gz
ensure chmod +x ./$PLATFORM-$ARCHITECTURE/helm
ensure sudo mv ./$PLATFORM-$ARCHITECTURE/helm /usr/local/bin/
rm helm-$LATEST_RELEASE-$PLATFORM-$ARCHITECTURE.tar.gz helm.tar.gz.sha256sum
rm -r ./$PLATFORM-$ARCHITECTURE

log_info "helm installed successfully."
fi
Expand Down Expand Up @@ -240,14 +241,20 @@ EOF
#ensure helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/

# Update helm repos
obol repo update
helm repo update

# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
#helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard

log_info "Configuring the Obol Stack Ethereum client..."
ensure helm upgrade --install helios obol/helios
ensure helm upgrade --install erpc ethereum/erpc --values ./values/erpc.yaml
ensure helm upgrade --namespace l1 --create-namespace --hide-notes --install l1-light-client obol/helios
ensure helm upgrade --namespace l1 --create-namespace --install l1-rpc ethereum/erpc --values ./values/erpc.yaml

ensure helm upgrade --namespace l1 --create-namespace --install l1-erigon ethereum/erigon --values ./values/erigon.yaml

# Todo(Oisin): EthpandaOps/ethereum-node not flexible enough just yet, installing clients directly with their dedicated chart
#ensure helm upgrade --namespace l1 --create-namespace --install --set erigon.enabled=true l1-erigon ethereum/ethereum-node
# Todo(Oisin): Blockscout segfaulting, unclear why
# ensure obol install ethereum/blockscout --values ./values/blockscout.yaml

# Check stack health
Expand Down Expand Up @@ -275,14 +282,13 @@ main() {
install_helm
#install_obol_cli
#check_obolup_update
launch_stack

if [[ "$1" == "update" ]]; then
log_info "Updating Obol Stack..."
if [[ "$1" == "clean" ]]; then
log_info "Clean command specified, deleting and recreating Obol Stack resources..."
kind delete cluster --name "$STACK_NAME"
launch_stack
fi

launch_stack

log_info "Obol Stack is up and running!"
}

Expand Down
2 changes: 1 addition & 1 deletion values/blockscout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ config:
SECRET_KEY_BASE: RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5
ECTO_USE_SSL: "false"
ETHEREUM_JSONRPC_VARIANT: geth
ETHEREUM_JSONRPC_HTTP_URL: http://erpc.default.svc.cluster.local:4000
ETHEREUM_JSONRPC_HTTP_URL: http://l1-rpc-erpc.l1.svc.cluster.local
#ETHEREUM_JSONRPC_WS_URL: ws://geth:8546
#ETHEREUM_JSONRPC_TRACE_URL: http://geth:8545
NETWORK: Ethereum
Expand Down
Loading