Skip to content

Commit

Permalink
feat: make start single command start
Browse files Browse the repository at this point in the history
- closes: #9855
  • Loading branch information
0xpatrickdev committed Sep 3, 2024
1 parent 7050f00 commit d42b502
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 19 deletions.
12 changes: 12 additions & 0 deletions multichain-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,15 @@ provision-smart-wallet:
# view agoric swingset logs from slog file, until we can set `DEBUG=SwingSet:vat,SwingSet:ls`
tail-slog:
kubectl exec -i agoriclocal-genesis-0 -c validator -- tail -f slog.slog

###############################################################################
### Start All ###
###############################################################################

.PHONY: wait-for-pods
wait-for-pods:
node_modules/.bin/tsx scripts/pod-readiness.ts

.PHONY: start
start: install wait-for-pods port-forward fund-provision-pool override-chain-registry

48 changes: 29 additions & 19 deletions multichain-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

End-to-end testing environment for fully simulated chains, powered by [Starship](https://docs.cosmology.zone/starship).


## Configuration

The current commands will read from [`config.yaml`](./config.yaml) to build a multi-chain teting environment. Currently, the image includes `agoric`, `osmosis`, and `cosmos-hub` chains and a hermes relayer between each.
The current commands will read from [`config.yaml`](./config.yaml) to build a multi-chain testing environment. Currently, the image includes `agoric`, `osmosis`, and `cosmoshub` chains and a hermes relayer between each.

The `agoric` software revision includes the vats necessary for building and testing orchestration applications:
- vat-network
Expand All @@ -24,27 +23,39 @@ yarn install

Ensure you have Kubernetes available. See https://docs.cosmology.zone/starship/get-started/step-2.

The following will install `kubectl`, `kind`, `helm`, and `yq` as needed.
The following will install `kubectl`, `kind`, `helm`, and `yq` as needed:

```sh
make clean setup
```

## Getting Started

You can start everything with a single command:

```sh
make start
```

This command will:
1. Install the Helm chart and start the Starship service
2. Wait for all pods to be ready
3. Set up port forwarding
4. Fund the provision pool
5. Override the chain registry

The process may take 7-12 minutes to complete. You'll see status updates as the pods come online.

Alternatively, you can run the steps individually:

```sh
# install helm chart and start starship service
make install

# wait for all pods to spin up
watch kubectl get pods
```

**Wait 10-12** minutes. It takes some time for the above to finish setting up. The watch command should show a table in which the STATUS of every pod is Running.
make wait-for-pods


```bash
# expose ports on your local machine. useful for testing dapps
# expose ports on your local machine (useful for testing dapps)
make port-forward

# set up Agoric testing environment
Expand All @@ -53,7 +64,7 @@ make fund-provision-pool override-chain-registry

If you get an error like "connection refused", you need to wait longer, until all the pods are Running.

# Cleanup
## Cleanup

```sh
# stop the containers and port-forwarding
Expand All @@ -63,10 +74,9 @@ make stop
make clean
```


## Logs

You can use the following commmands to view logs:
You can use the following commands to view logs:

```sh
# agoric slogfile
Expand Down Expand Up @@ -98,12 +108,12 @@ make fund-wallet COIN=20000000ubld ADDR=$ADDR
make provision-smart-wallet ADDR=$ADDR
```

# Chain Registry
## Chain Registry

These only work if you've done `make port-forward`.

http://localhost:8081/chains/agoriclocal
http://localhost:8081/chains/osmosislocal
http://localhost:8081/chains/gaialocal
http://localhost:8081/chains/agoriclocal/keys
http://localhost:8081/ibc
- http://localhost:8081/chains/agoriclocal
- http://localhost:8081/chains/osmosislocal
- http://localhost:8081/chains/gaialocal
- http://localhost:8081/chains/agoriclocal/keys
- http://localhost:8081/ibc

0 comments on commit d42b502

Please sign in to comment.