Step 3: Spin up Starship
In this step, we will spin up couple of cosmos chains and relayers between them.
By the end of this tutorial you should be able to have osmosis and gaia chain running on your machine.
3.1) Setup Starship Helm charts
We use helm as the package manager for starship.
Run
helm repo add starship https://cosmology-tech.github.io/starship/
helm repo update
helm search repo starship/devnet --version 0.2.0
3.2) Define the desired infrastructure
We will now define the infrastructure for our starship, specify the chains and relayers run between them.
We will run:
- Osmosis chain (single validator)
- Cosmos hub chain (single validator)
- Hermes relayer between osmosis and cosmos chain
- Opens transfer channel between osmosis and cosmos chain
- Ping Pub explorer for the chains (experimental feature)
Create a directory to play around in
mkdir getting-started
cd getting-started
touch starship.yaml
Add following content to starship.yaml
with the following content
chains:
- id: osmosis-1
name: osmosis
numValidators: 1
ports:
rest: 1313
rpc: 26653
- id: gaia-1
name: cosmos
numValidators: 1
ports:
rest: 1317
rpc: 26657
relayers:
- name: osmos-gaia
type: hermes
replicas: 1
chains:
- osmosis-1
- gaia-1
explorer:
enabled: true
ports:
rest: 8080
registry:
enabled: true
ports:
rest: 8081
Above configuration would use around 4 CPUs and 4GB of RAM.
If you are constrained on resources, checkout the next step for tiny-starship.yaml
(opens in a new tab)
Documentation has more details on the configuration options and how to reduce the resource usage. For the tutorial we will keep it simple.
3.3) Spin up the infrastructure
Spin up the infrastructure with
helm install -f starship.yaml tutorial starship/devnet --version 0.2.0
# Where
# -f starship.yaml: use the starship.yaml file as the configuration
# tutorial: name of the helm release
# starship/devnet: helm chart to use
# --version 0.1.45: version of the helm chart to use
This will take some time to spin up the infrastructure, you can check the status in another terminal with
kubectl get pods
# OR, to watch the pods
watch kubectl get pods
You would need to wait for the pods to be in Running
state.
This can take up to 2-5 minutes, depending on the underlying machine.