-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev/orch dapp walkthrough documentation #1169
base: main
Are you sure you want to change the base?
Conversation
Deploying documentation with Cloudflare Pages
|
Cloudflare deployment logs are available here |
## Troubleshooting Docker | ||
During setting up the environment, you may run into a few issues with docker. Here are two common setup requirements. | ||
|
||
### Disable Kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we have to enable it, not disable it. That's what I had to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we should recommend somewhere to click the "reset k8s cluster" button before spinning it up
<img src="../../assets/docker-kube.png" width="100%" /> | ||
|
||
### Increasing resources allocated to docker | ||
From inside of "settings", navigate to the "Resources" section. By default docker doesn't optimize the resources allocated for running resource-intensive environments. For this environment, we want to ensure our `CPU limit`, `Memory Limit`, and `Swap` are all bumped up to 75% their max. You can always increase/decrease after you get everything setup, and determine how much resources are needed for your machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the % depends on your machine. For me, 10GB memory worked, while 8GB did not. My swap was at 1GB in both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed this by following the guide myself and ran into a few confusions. Couldn't go past a point in the docs (mentioned below) so this only a partial review up till that point.
**Check Agoric Daemon Status** | ||
Verify that the Agoric daemon is running with the following command: | ||
```bash | ||
agd status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither the agoric-sdk
README nor anywhere here do we mention anything remotely related to setting up the agd
CLI. I followed the steps in this doc to set it up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mujahidkay and I wrote it in this document after learning it firsthand from @Jovonni :-)
But you are right this needs to go somewhere. Maybe @mujahidkay can find an appropriate place in docs to insert this information, and then we can link it here?
Run the following commands from the `agoric-sdk/multichain-testing/` directory: | ||
|
||
```bash | ||
make override-chain-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Restart the Environment** | ||
If you need to restart your environment for any reason, use the following command from `agoric-sdk/multichain-testing`: | ||
```bash | ||
make teardown ; make stop; make stop-forward; make clean; make; make port-forward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a) targets are run sequentially afaik so we can use it like this
make teardown ; make stop; make stop-forward; make clean; make; make port-forward | |
make teardown stop stop-forward clean setup port-forward |
b) better yet, thoughts on adding a restart target in the Makefile helpers above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me.
During setting up the environment, you may run into a few issues with docker. Here are two common setup requirements. | ||
|
||
### Enabling Kubernetes | ||
Inside of "settings", navigate to the "kubernetes" section. Here, you want to ensure that you select the "Enable Kubernetes" checkbox. You will have to restart docker to make these changes take effect. This is something to keep this in mind if you have any containers that are currently running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside of "settings", navigate to the "kubernetes" section. Here, you want to ensure that you select the "Enable Kubernetes" checkbox. You will have to restart docker to make these changes take effect. This is something to keep this in mind if you have any containers that are currently running. | |
Inside of "Settings", navigate to the "Kubernetes" section. Here, you want to ensure that you select the "Enable Kubernetes" checkbox. You will have to restart docker to make these changes take effect. This is something to keep in mind if you have any containers that are currently running. |
<img src="../../assets/docker-kube.png" width="100%" /> | ||
|
||
### Increasing resources allocated to docker | ||
From inside of "settings", navigate to the "Resources" section. By default docker doesn't optimize the resources allocated for running resource-intensive environments. For this environment, we want to ensure our `CPU limit`, `Memory Limit`, and `Swap` are all bumped up to 75% their max. You can always increase/decrease after you get everything setup, and determine how much resources are needed for your machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think this number will be different for different people. I had to bump up my memory to 15GB for the pods to be up and running under 15 minutes.
From inside of "settings", navigate to the "Resources" section. By default docker doesn't optimize the resources allocated for running resource-intensive environments. For this environment, we want to ensure our `CPU limit`, `Memory Limit`, and `Swap` are all bumped up to 75% their max. You can always increase/decrease after you get everything setup, and determine how much resources are needed for your machine. | |
From inside of "Settings", navigate to the "Resources" section. By default, docker doesn't optimize the resources allocated for running resource-intensive environments. For this environment, we want to ensure our `CPU limit`, `Memory Limit`, and `Swap` are all bumped up to 75% their max. You can always increase/decrease after you get everything setup, and determine how much resources are needed for your machine. |
Before deploying the contract, we want to generate a new address using the keyring inside of the localchain environment. To add a new address to the keychain inside the Kubernetes pod, run the following command from the top-level directory: | ||
|
||
```bash | ||
make add-address | ||
``` | ||
|
||
Now, inside of `contract/`, paste the resulting `agoric1` prefixed address into the `Makefile` under the `ADDR`variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very confusing due to the last line. My initial thoughts were that we need to run Also, note that there is no make add-address
in dapp-orchestration-basics
root workspace but the absence of a Makefile there redirected me to consider agoric-sdk
folder since it says top-level directory. But that's not the case either. We can make the following changes to clear up that confusion.ADDR
variable in that Makefile - did you mean ACCT_ADDR
?
Edit: I was using the wrong branch to test the setup.
To now fund the account we just generated, we run the following command from the top-level directory. | ||
|
||
```bash | ||
make fund | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unable to proceed past this step. Which Makefile has this fund
target? I can only see fund-wallet
under multichain-testing
and fund-acct
under dapp-orchestration-basics/contract
Edit: I was using the wrong branch to test the setup. orca-v1 does have the targets, thanks @amessbee for unblocking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good q @mujahidkay , this is from dapp-orchestration-basics
top-level directory:
https://github.com/Agoric/dapp-orchestration-basics/blob/d43ebe67012a85ac404d76687bf91f9571b10594/Makefile#L9
which is just calling:
yarn workspace dapp-agoric-orca-contract fund
which then just calls the fund as convenience:
https://github.com/Agoric/dapp-orchestration-basics/blob/d43ebe67012a85ac404d76687bf91f9571b10594/contract/package.json#L26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added few general comments but great work man - kudos!
# Agoric Orchestration Basics Installation Guide | ||
Here, we will walk through installing the Orchestration-Basics demo project onto your local machine. | ||
|
||
## Table of Contents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, remove this table as there is a default one in the right side panel? What do you think?
- an Osmosis node | ||
- an Agoric <-> Gaia hermes relayer | ||
- an Agoric <-> Osmosis hermes relayer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- a Gaia <-> Osmosis hermes relayer | |
- chain registry node |
``` | ||
|
||
## Multichain-Testing Makefile Helpers | ||
To streamline your workflow, you can add the following commands to the bottom of your `multichain-testing/Makefile`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a PR in agoric-sdk to update Makefile there rather than asking devs to do it locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally yes. we did capture it in this issue here @amessbee:
Agoric/agoric-sdk#9856
make teardown ; make stop; make stop-forward; make clean; make; make port-forward | ||
``` | ||
|
||
## Troubleshooting Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is absolutely necessary - thanks for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably have a separate page for troubleshooting and not just for Docker, that can be updated more frequently than this page? What are your thoughts on this? @Jovonni
<img src="../../assets/docker-resources.png" width="100%" /> | ||
|
||
|
||
## Adding a New Address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A line or two about the reasoning behind would be very appreciated by devs IMO. To answer questions like: why are we doing this? what/where is this new address needed for?
documentation for orchestration-basics walkthrough: