Skip to content
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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Binary file added main/guides/orchestration/assets/docker-kube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Here, we will walk through installing the Orchestration-Basics demo project onto
- [Setting Up the Local Environment](#setting-up-the-local-environment)
- [Overriding the Chain Registry for use with `agoric-sdk/multichain-testing`](#overriding-the-chain-registry-for-use-with-agoric-sdkmultichain-testing)
- [Multichain-Testing Makefile Helpers](#multichain-testing-makefile-helpers)
- [Troubleshooting Docker](#troubleshooting-docker)
- [Disable Kubernetes](#disable-kubernetes)
- [Increasing resources allocated to docker](#increasing-resources-allocated-to-docker)
- [Adding a New Address](#adding-a-new-address)
- [Funding the Account](#funding-the-account)
- [Building \& Deploying the dApp](#building--deploying-the-dapp)
Expand Down Expand Up @@ -106,6 +109,19 @@ If you need to restart your environment for any reason, use the following comman
make teardown ; make stop; make stop-forward; make clean; make; make port-forward
Copy link
Member

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

Suggested change
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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me.

```

## Troubleshooting Docker
Copy link
Contributor

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!

Copy link
Contributor

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

During setting up the environment, you may run into a few issues with docker. Here are two common setup requirements.

### Disable Kubernetes
Copy link
Contributor

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.

Copy link
Contributor

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

Inside of "settings", navigate to the "kubernetes" section. Here, you want to ensure that you deselect the "Enable Kubernetes" checkbox
<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.
Copy link
Contributor

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.

Copy link
Member

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.

Suggested change
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.


<img src="../../assets/docker-resources.png" width="100%" />


## Adding a New Address
Copy link
Contributor

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?


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:
Expand Down
Loading