|
| 1 | +apiVersion: v1 |
| 2 | +kind: Namespace |
| 3 | +metadata: |
| 4 | + name: web |
| 5 | + |
| 6 | +--- |
| 7 | +apiVersion: v1 |
| 8 | +kind: ConfigMap |
| 9 | +metadata: |
| 10 | + name: simple-html |
| 11 | + namespace: web |
| 12 | +data: |
| 13 | + index.html: | |
| 14 | + <!DOCTYPE html> |
| 15 | + <html lang="en"> |
| 16 | + <head> |
| 17 | + <meta charset="UTF-8"> |
| 18 | + <title>Obol Stack</title> |
| 19 | + <style> |
| 20 | + body { font-family: sans-serif; max-width: 900px; margin: 2rem auto; line-height: 1.6; padding: 0 1rem; } |
| 21 | + h1, h2, h3 { color: #222; } |
| 22 | + code, pre { background: #f4f4f4; padding: 0.2em 0.4em; border-radius: 4px; font-family: monospace; } |
| 23 | + pre { padding: 1em; overflow-x: auto; } |
| 24 | + blockquote { background: #e9f5ff; padding: 0.5em 1em; border-left: 5px solid #007acc; margin: 1em 0; } |
| 25 | + img { max-width: 150px; display: block; margin: 1rem auto; } |
| 26 | + hr { margin: 2em 0; } |
| 27 | + </style> |
| 28 | + </head> |
| 29 | + <body> |
| 30 | +
|
| 31 | + <img src="https://obol.tech/obolnetwork.png" alt="Obol Logo" style="width: 100%; height: auto; max-width: none;"> |
| 32 | + <h1 align="center">The Obol Stack: Decentralised Applications For Ethereum</h1> |
| 33 | +
|
| 34 | + <h2>Overview</h2> |
| 35 | + <p>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 <a href="https://kubernetes.io">Kubernetes</a>, with <a href="https://helm.sh/">Helm</a> as a package management system.</p> |
| 36 | +
|
| 37 | + <h2>Getting Started</h2> |
| 38 | + <blockquote> |
| 39 | + <strong>IMPORTANT:</strong> 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 <a href="http://github.com/obolNetwork/obol-stack/issues">GitHub issue</a> if an appropriate one is not already present.<br> |
| 40 | + See <a href="https://github.com/ObolNetwork/obol-stack/tree/main/obolup/README.md#supported-architectures">here</a> for the latest on OS and architectures supported. |
| 41 | + </blockquote> |
| 42 | +
|
| 43 | + <p>The default installation of the Stack configures Ethereum L1 RPCs. The default addresses for these RPCs are:</p> |
| 44 | +
|
| 45 | + <pre><code># Mainnet |
| 46 | + http://obol.stack/rpc/mainnet |
| 47 | +
|
| 48 | + # Hoodi |
| 49 | + http://obol.stack/rpc/hoodi |
| 50 | +
|
| 51 | + # Test they are working with |
| 52 | + curl -s -X POST http://obol.stack/rpc/mainnet -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' |
| 53 | + curl -s -X POST http://obol.stack/rpc/hoodi -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' |
| 54 | + </code></pre> |
| 55 | +
|
| 56 | + Try adding them to your metamask. |
| 57 | + |
| 58 | + <div style="margin: 1em 0;"> |
| 59 | + <button id="add-mainnet" style="background: #037DD6; color: white; padding: 0.5em 1em; border: none; border-radius: 4px; cursor: pointer; margin-right: 1em;">Add Mainnet to MetaMask</button> |
| 60 | + <button id="add-hoodi" style="background: #037DD6; color: white; padding: 0.5em 1em; border: none; border-radius: 4px; cursor: pointer;">Add Hoodi to MetaMask</button> |
| 61 | + </div> |
| 62 | + |
| 63 | + <script> |
| 64 | + document.getElementById('add-mainnet').addEventListener('click', async () => { |
| 65 | + if (typeof window.ethereum !== 'undefined') { |
| 66 | + try { |
| 67 | + await window.ethereum.request({ |
| 68 | + method: 'wallet_addEthereumChain', |
| 69 | + params: [{ |
| 70 | + chainId: '0x1', |
| 71 | + chainName: 'Ethereum Mainnet (Obol Stack)', |
| 72 | + nativeCurrency: { |
| 73 | + name: 'Ether', |
| 74 | + symbol: 'ETH', |
| 75 | + decimals: 18 |
| 76 | + }, |
| 77 | + rpcUrls: ['http://obol.stack/rpc/mainnet'], |
| 78 | + blockExplorerUrls: ['https://etherscan.io'] |
| 79 | + }] |
| 80 | + }); |
| 81 | + } catch (error) {} |
| 82 | + } |
| 83 | + }); |
| 84 | + |
| 85 | + document.getElementById('add-hoodi').addEventListener('click', async () => { |
| 86 | + if (typeof window.ethereum !== 'undefined') { |
| 87 | + try { |
| 88 | + await window.ethereum.request({ |
| 89 | + method: 'wallet_addEthereumChain', |
| 90 | + params: [{ |
| 91 | + chainId: '0x44787', |
| 92 | + chainName: 'Hoodi Testnet (Obol Stack)', |
| 93 | + nativeCurrency: { |
| 94 | + name: 'Hoodi Ether', |
| 95 | + symbol: 'ETH', |
| 96 | + decimals: 18 |
| 97 | + }, |
| 98 | + rpcUrls: ['http://obol.stack/rpc/hoodi'], |
| 99 | + blockExplorerUrls: ['https://hoodi.etherscan.io'] |
| 100 | + }] |
| 101 | + }); |
| 102 | + } catch (error) {} |
| 103 | + } |
| 104 | + }); |
| 105 | + </script> |
| 106 | +
|
| 107 | + <h3>Installing an Obol App (Helm Chart)</h3> |
| 108 | + <p>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.</p> |
| 109 | +
|
| 110 | + <pre><code>obol install ethereum/contributooor |
| 111 | + </code></pre> |
| 112 | +
|
| 113 | + <h3>Adding another Obol App Store</h3> |
| 114 | + <p>The Obol Stack is built on Helm, you can add your own Helm Chart repository easily.</p> |
| 115 | +
|
| 116 | + <pre><code># Add a repository of Helm Charts |
| 117 | + obol repo add ithaca https://github.com/ithacaxyz/obol-charts |
| 118 | +
|
| 119 | + # Install a chart from the new 'App Store' |
| 120 | + obol install ithaca/op-reth |
| 121 | + </code></pre> |
| 122 | +
|
| 123 | + <h3>Custom deployments</h3> |
| 124 | + <p>Each Obol App has a <code>values.yaml</code> file with default values. You can customize these values by creating your own values file and passing it to the install command:</p> |
| 125 | +
|
| 126 | + <pre><code>obol install <app-store-name>/<chart-name> --values custom-values.yaml |
| 127 | + </code></pre> |
| 128 | +
|
| 129 | + <h3>Using advanced tooling</h3> |
| 130 | + <p>The <code>obol</code> 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, <code>obolup</code> also installs <a href="https://kubernetes.io/docs/reference/kubectl/">kubectl</a> and <a href="https://helm.sh/docs/helm/helm/">helm</a>, such that you can manage your stack with the tooling you are used to.</p> |
| 131 | +
|
| 132 | + <p>If you encounter node management requirements that an end-user might need but cannot achieve with the Obol CLI, instead needing to use <code>kubectl</code> or <code>helm</code>, consider opening a feature request issue on the <a href="https://github.com/ObolNetwork/obol-cli/issues">obol-cli</a> repo.</p> |
| 133 | +
|
| 134 | + <h2>Project Status</h2> |
| 135 | + <p>This project is currently in alpha, and should not be used in production.</p> |
| 136 | + <p>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.</p> |
| 137 | +
|
| 138 | + <h2>Contributing</h2> |
| 139 | + <p>Please see <a href="CONTRIBUTING.md">CONTRIBUTING.md</a> for details.</p> |
| 140 | +
|
| 141 | + <h2>License</h2> |
| 142 | + <p>This project is licensed under the <a href="LICENSE">Apache License 2.0</a>.</p> |
| 143 | +
|
| 144 | + </body> |
| 145 | + </html> |
| 146 | +
|
| 147 | +--- |
| 148 | +apiVersion: apps/v1 |
| 149 | +kind: Deployment |
| 150 | +metadata: |
| 151 | + name: html-server |
| 152 | + namespace: web |
| 153 | +spec: |
| 154 | + replicas: 1 |
| 155 | + selector: |
| 156 | + matchLabels: |
| 157 | + app: html-server |
| 158 | + template: |
| 159 | + metadata: |
| 160 | + labels: |
| 161 | + app: html-server |
| 162 | + spec: |
| 163 | + containers: |
| 164 | + - name: nginx |
| 165 | + image: nginx:alpine |
| 166 | + volumeMounts: |
| 167 | + - name: html |
| 168 | + mountPath: /usr/share/nginx/html |
| 169 | + volumes: |
| 170 | + - name: html |
| 171 | + configMap: |
| 172 | + name: simple-html |
| 173 | + |
| 174 | +--- |
| 175 | +apiVersion: v1 |
| 176 | +kind: Service |
| 177 | +metadata: |
| 178 | + name: html-service |
| 179 | + namespace: web |
| 180 | +spec: |
| 181 | + selector: |
| 182 | + app: html-server |
| 183 | + ports: |
| 184 | + - port: 80 |
| 185 | + targetPort: 80 |
| 186 | + |
| 187 | +--- |
| 188 | +apiVersion: networking.k8s.io/v1 |
| 189 | +kind: Ingress |
| 190 | +metadata: |
| 191 | + name: html-ingress |
| 192 | + namespace: web |
| 193 | + annotations: |
| 194 | + nginx.ingress.kubernetes.io/rewrite-target: / |
| 195 | +spec: |
| 196 | + ingressClassName: nginx |
| 197 | + rules: |
| 198 | + - host: obol.stack |
| 199 | + http: |
| 200 | + paths: |
| 201 | + - path: / |
| 202 | + pathType: Prefix |
| 203 | + backend: |
| 204 | + service: |
| 205 | + name: html-service |
| 206 | + port: |
| 207 | + number: 80 |
0 commit comments