Skip to content

Commit

Permalink
docs(upgrade-test): revert whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Oct 6, 2023
1 parent 81201cc commit bd27f48
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions packages/deployment/upgrade-test/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ a specific build:
```shell
DEST_IMAGE=docker pull ghcr.io/agoric/agoric-sdk:20230515033839-e56ae7
```

To use a build based on local changes:

```shell
# build ghcr.io/agoric/agoric-sdk:latest
make local_sdk build
Expand All @@ -45,12 +43,11 @@ This will start a container with the output of chain start.

To get a shell: `make shell`

For more info: https://phase2.github.io/devtools/common-tasks/ssh-into-a-container/
For more info: https://phase2.github.io/devtools/common-tasks/ssh-into-a-container/

The container and chain will halt once you detach from the session.

### Troubleshooting

If you get an error about port 26656 already in use, you have a local chain running on your OS.

If you run into other problems, you might have a local `agoric-sdk:latest` that
Expand All @@ -65,8 +62,8 @@ TARGET=agoric-upgrade-10 make build run

This will put you in `/usr/src/agoric-sdk`. You'll run commands from here. `upgrade-test-scripts` is copied here with only the test scripts for the current image.

If you lose the connection and want to get back,

If you lose the connection and want to get back,
```sh
# find the container id
docker ps
Expand All @@ -89,17 +86,16 @@ through.
You can point your local CLI tools to the chain running in Docker. Our Docker config binds on the same port (26656) as running a local chain. So you can use the agoric-cli commands on the Docker chain the same way. But note that the Cosmos account keys will be different from in your dev keyring.

If when reattaching you get a log tail, you need to start a new TTY (with the container name).

```sh
docker exec -it sweet_edison bash
```

or just use this helper,

```
make shell
```


**To test GUI**

To make the wallet ui talk to your local chain, set the network config to
Expand All @@ -114,11 +110,9 @@ To make the wallet ui talk to your local chain, set the network config to
5. Make directory for ugprade (e.g. `propose-agoric-upgrade-12` with a `.keep`)
6. Update the UPGRADE/DEST pair to be your new upgrade (THIS_NAME matching the upgrade handler string in app.go)
7. Update the `Makefile`

- the two targets to `Makefile` (e.g. `propose-agoric-upgrade-12` and `agoric-upgrade-12`)
- set the default TARGET (e.g. `agoric-upgrade-12`)
- add the DEST target to the `.phony` in `Makefile`

- the two targets to `Makefile` (e.g. `propose-agoric-upgrade-12` and `agoric-upgrade-12`)
- set the default TARGET (e.g. `agoric-upgrade-12`)
- add the DEST target to the `.phony` in `Makefile`
7. Test with `make local_sdk build run`

## Development
Expand All @@ -130,7 +124,6 @@ By default targets that use "agoric-sdk:latest" will source from CI builds. To u
```shell
make local_sdk
```

Builds an image: ghcr.io/agoric/agoric-sdk:latest that will be used by all your builds.

That will produce the an image tagged agoric-sdk:latest in your local resolution. (Then run `make build run` again.)
Expand All @@ -143,7 +136,6 @@ Some IDEs support connecting to a running container. For VS Code you can use [De
Note that whatever changes you make within the running container will be lost when you terminate it. Use this just for iterating and be sure to copy any changes you want back to your real workspace.

# TODO

- [x] make the Docker test environment log verbosely (agd start is just printing "block N" begin, commit)
- [ ] a target like `local_sdk` that just copies the local filesystem, without a full rebuild
- [ ] alternately, mount the local agoric-sdk in the container
Expand Down

0 comments on commit bd27f48

Please sign in to comment.