Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Nov 27, 2023
1 parent bcf6d4c commit 10a9733
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 47 deletions.
11 changes: 11 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
POOL=0
STORAGE_PRIV=""
REQUEST_BACKOFF=50
CACHE=jsonfile
METRICS=false
METRICS_PORT=8080
CHAIN_ID=kaon-1
RPC=https://rpc-eu-1.kaon.kyve.network
REST=https://api-eu-1.kaon.kyve.network
DEBUG=false
VALACCOUNT="<your 12 or 24 mnemonic>"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,7 @@ dist
.idea
/common/types/client/
/common/types/lcd/
# End of https://www.toptal.com/developers/gitignore/api/node
# End of https://www.toptal.com/developers/gitignore/api/node

# Ignore docker compose file
docker-compose.yml
56 changes: 10 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,57 +90,21 @@ The binaries can then be found in the `/out` folder

## Dockerized Execution

In the Kyve project, the binaries can now be easily executed within a Docker container. This allows for simplified deployment and consistent runtime environments. Before running the Kyve binaries in a Docker container, please ensure that you have set up a Docker network. If you haven't already, you can create a Docker network using the following command:
The easiest way to run a KYVE integration is by using the provided Docker images via docker compose.

```
docker network create --driver bridge kyve
```

**Building the Docker Image**

To build a Docker image for Kyve Core, you can use the provided Dockerfile. Use the following command to build the image, while being in the root directory:

```
docker build -t kyve-core -f Dockerfile .
```

**Running Kyve Core in a Docker Container**

Once you have built the Docker image, you can run Kyve Core in a Docker container. Below are the instructions for running Kyve Core as a node:

1. Set your recovery phrase as the VALACCOUNT environment variable:

```
export VALACCOUNT="<recovery phrase>"
```
**Prerequisites**
- Copy the `docker-compose.yml.template` as `docker-compose.yml` and fill in the required environment variables.
- Instead of environment variables, you can also provide a `.env` file in the root directory of the repository. Just copy the `.env.template` file as `.env` and fill in the required environment variables.

2. Run the Kyve Core container, replacing the placeholders with your specific parameters:

```
docker run --rm --name kyve-core --network kyve -e VALACCOUNT=$VALACCOUNT kyve-core ./kyve start --pool <pool id> --valaccount "$VALACCOUNT" --cache memory --rpc <rpc address> --rest <rest address> --chain-id=<chain id> --request-backoff 50 --debug
```bash
cp docker-compose.yml.template docker-compose.yml
cp .env.template .env
```
- `<recovery phrase>`: Replace this with your recovery phrase.
- `<pool id>`: Specify the pool ID you want to join.
- `<rpc address>`: Provide the RPC address of the network.
- `<rest address>`: Provide the REST API address.
- `<chain id>`: Specify the chain ID you want to interact with.

**Development and Testing**

For development and testing purposes, you can also run specific runtime methods in the Dockerized Kyve Core. Here's how to do it:

Run the Kyve Core container for a specific runtime method and arguments:
```
docker run --rm --name kyve-core --network kyve kyve-core ./kyve runtime <method> <args>
**Execution**
```bash
docker compose up # add -d to run in background; add --build to rebuild images
```
- `<method>`: Replace this with the name of the runtime method you want to test.
- `<args>`: Provide any required arguments for the runtime method.

By following these instructions, you can easily dockerize and run Kyve Core and perform testing and development tasks. The Dockerized runtime provides a convenient and isolated environment for your Kyve project.






## How to contribute
Expand Down

0 comments on commit 10a9733

Please sign in to comment.