diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json index 297680ad2..399531b46 100644 --- a/docs/pages/_meta.json +++ b/docs/pages/_meta.json @@ -3,6 +3,6 @@ "get-started": "Get Started", "config": "Configuration", "cli": "CLI", - "tests": "E2E Tests", - "advanced": "Advanced Usage" + "advanced": "Advanced Usage", + "development": "Development" } diff --git a/docs/pages/advanced/index.mdx b/docs/pages/advanced/index.mdx deleted file mode 100644 index 335648726..000000000 --- a/docs/pages/advanced/index.mdx +++ /dev/null @@ -1,9 +0,0 @@ -# Advance Usage - -We will go over how to be a Starship power user! -We will cover: - -1. Using kubectl to get logs -2. SSH into a running chain container -3. Using k9s to visualize the cluster -4. Run Starship in gh-action on Kubernetes cluster diff --git a/docs/pages/development/_meta.json b/docs/pages/development/_meta.json new file mode 100644 index 000000000..bd3cf05a2 --- /dev/null +++ b/docs/pages/development/_meta.json @@ -0,0 +1,4 @@ +{ + "index": "Introduction", + "add-new-chain": "Add new chain to Starship" +} \ No newline at end of file diff --git a/docs/pages/development/add-new-chain.md b/docs/pages/development/add-new-chain.md new file mode 100644 index 000000000..5cfc5c318 --- /dev/null +++ b/docs/pages/development/add-new-chain.md @@ -0,0 +1,153 @@ +## 🚀 Adding a New Chain to Starship + +Welcome, brave dev! Whether you're integrating a Cosmos SDK chain or +a custom chain into the Starship testing environment, this guide has +your back. We'll walk through setting up Docker images, Helm configuration, +and end-to-end testing—warp speed style. + +### 🧱 Step 1: Build Your Docker Image +Starship launches testnets using Docker, so each chain needs a compatible image. + +#### ✅ Required Dependencies +The Docker image must include: +* Your chain binary +* Standard Starship utilities: + * `bash` + * `curl` + * `make` + * `jq` + * `sed` + +You can either use Starship's Docker build system or maintain your own. + +#### ✨ Option A: Use the Starship Docker System +Update [`starship/docker/chains/version.yaml`](https://github.com/hyperweb-io/starship/blob/main/starship/docker/chains/versions.yaml) with your chain: +```yaml +- name: mychain + base: # Used as base image from which chain binary are installed from `/bin` and `/lib` dir + tags: + - +``` + +Want to use a custom Dockerfile? Add the file field: + +```yaml +- name: mychain + base: + file: starship/docker/chains/mychain.Dockerfile + tags: + - v1.0.0 +``` + +The default build script is [`build-docker-chains.sh`](https://github.com/hyperweb-io/starship/blob/main/starship/docker/chains/build-docker-chains.sh). +Once your PR is merged, GitHub Actions will automatically build and push the image to [Starship’s GHCR registry](https://github.com/orgs/hyperweb-io/packages?repo_name=starship). + + +#### 🛠️ Option B: Bring Your Own Docker Image +You can also build and host the Docker image yourself. Just make sure: +* It's public or accessible from the Starship test environment. +* It includes the required Starship dependencies. + +### ⚙️ Step 2: Add Chain to Helm Chart +Update the chain config in [`starship/charts/defaults.yaml`](https://github.com/hyperweb-io/starship/blob/main/starship/charts/defaults.yaml) +under `defaultChains`. + +Example: Adding Cosmos Hub +```yaml +defaultChains: + ## add new chain to section + ## ... + cosmoshub: + image: ghcr.io/cosmology-tech/starship/gaia:v18.0.0 + home: /root/.gaia + binary: gaiad + prefix: cosmos + denom: uatom + prettyName: Cosmos Hub + coins: 100000000000000uatom + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/gaia + assets: + - base: uatom + description: "The native staking and governance token of the Cosmos Hub." + name: Cosmos Hub Atom + display: atom + symbol: ATOM + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.svg" + denom_units: + - denom: uatom + exponent: 0 + - denom: atom + exponent: 6 + coingecko_id: atom +``` + +#### Optional: Custom Scripts +Need special handling for genesis/config/validator etc? + +Override default scripts like this: +```yaml +scripts: + createGenesis: + file: scripts/mychain/create-genesis.sh +``` + +Place them under: +`starship/charts/scripts//