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

#369 - Make it easy to deploy manage multiple predictoor bots #570

Merged
Show file tree
Hide file tree
Changes from 154 commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
0698896
Agent deployer gitignore
trizin Jan 24, 2024
03df6ba
Add new file agent-deploy/deployer/__init__.py
trizin Jan 24, 2024
fefac6d
Add k8s.py file with get_k8s_predictor_template function
trizin Jan 24, 2024
c835f64
Add pm2.py deployer script
trizin Jan 24, 2024
5105a36
Add KEY_FILE constant
trizin Jan 24, 2024
2d411e7
Add Docker Compose template function
trizin Jan 24, 2024
e4aea7f
Add wallet functionality to deployer module
trizin Jan 24, 2024
bab0b19
Add SingleAgentConfig model
trizin Jan 24, 2024
6568882
Add PredictoorAgentConfig model
trizin Jan 24, 2024
e1db1ef
Add AgentDeployConfig model
trizin Jan 24, 2024
7306ff0
Add DeployFile class to handle deployment files
trizin Jan 24, 2024
6a73d9c
Add DeploymentMethod class for managing deployment methods
trizin Jan 24, 2024
1fc8223
Add DeploymentInfo class to handle deployment information
trizin Jan 24, 2024
9c8adc1
Add DeployConfig class
trizin Jan 24, 2024
f111f69
Add config parsing function to deployer module
trizin Jan 24, 2024
4739b39
Add deployer.py script for generating and managing deployments
trizin Jan 24, 2024
bc70b68
Refactor deployment template generation code
trizin Jan 24, 2024
56ff113
Refactor parse_config function to support multiple config types
trizin Jan 24, 2024
0ccc028
Refactor DeployConfig to use agent_config
trizin Jan 24, 2024
0905c11
Refactor private key generation in deployer.py
trizin Jan 24, 2024
383eeb5
Fix config type check in parse_config function
trizin Jan 24, 2024
e7b28f6
Add initial readme
trizin Jan 24, 2024
4b5bea2
Move to templates folder
trizin Jan 24, 2024
b3980d4
Update import statements in DeployConfig.py
trizin Jan 24, 2024
9d0b605
Fix issue with reading keys from JSON file
trizin Jan 25, 2024
2a81a00
Handle config types
trizin Jan 25, 2024
e2f4072
Formatting
trizin Jan 25, 2024
16d5e89
Add 'type' attribute to AgentsDeployConfig class
trizin Jan 25, 2024
5b4bb3e
Formatting
trizin Jan 25, 2024
3e907b1
Formatting
trizin Jan 25, 2024
6c4d97c
Refactor parse_config function in config.py
trizin Jan 25, 2024
38f505b
Refactored agent deployment configuration
trizin Jan 25, 2024
b9cf3cf
Add example deployment config
trizin Jan 25, 2024
c395e1f
Remove unnecessary files from .gitignore
trizin Jan 25, 2024
e61bea1
Move agent deployment tool documentation to a separate folder
trizin Jan 25, 2024
4d2e1f1
Refactor wallet.py to read keys based on config
trizin Jan 25, 2024
06fad9b
Replace forward slashes with hyphens in full_name variable
trizin Jan 25, 2024
3d2c2c0
Refactor DeploymentInfo class to add read method
trizin Jan 25, 2024
4fe5493
Update DeploymentMethod for K8S
trizin Jan 25, 2024
8625599
Fix argument escaping in k8s.py template
trizin Jan 25, 2024
9a051f4
predictoor_deployment -> testnet_predictoor_deployment
trizin Jan 25, 2024
61e16d6
Remove pdr_backend_image_source from PredictoorAgentConfig
trizin Jan 25, 2024
7826f8a
Add cloud module and run_command
trizin Jan 25, 2024
78d3049
Add abstract methods to CloudProvider class
trizin Jan 25, 2024
27dd4c4
Add sanitize_name function to replace underscores with dashes
trizin Jan 25, 2024
bb7ca04
Add GCPProvider class and functions
trizin Jan 25, 2024
bc0016d
Add AzureProvider class and functions
trizin Jan 25, 2024
a657d25
Add check_requirements function to verify installation of required tools
trizin Jan 25, 2024
d2fad3b
Add check for docker installation in image build requirements
trizin Jan 25, 2024
3559643
Add build_and_push_docker_image function to cloud.py
trizin Jan 25, 2024
f74fae8
Add function to deploy agents to Kubernetes
trizin Jan 25, 2024
19fb397
Add deploy_cluster function to deploy Kubernetes cluster
trizin Jan 25, 2024
8f92bca
Add deploy_registry function
trizin Jan 25, 2024
be9fb99
Add cloud provider K8S deployment functionality
trizin Jan 25, 2024
a35b26b
Refactor docker image build and push functions
trizin Jan 26, 2024
ad83146
Add destroy_cluster function to cloud.py
trizin Jan 26, 2024
f1debd3
Add functions to delete all pods and get cluster logs
trizin Jan 26, 2024
4e164dc
Add parsers for deploy, destroy, logs, build, and push commands
trizin Jan 26, 2024
e812903
Move under pdr_backend
trizin Jan 26, 2024
bfc6aac
AWS Functions and formatting
trizin Jan 26, 2024
bafe692
Formatting
trizin Jan 26, 2024
b4f2657
Add image_name and image_tag arguments to build and push commands
trizin Jan 29, 2024
f4e27f0
Add command to run pdr executable in Kubernetes template
trizin Jan 29, 2024
3712bff
Refactor run_command_args in get_k8s_predictoor_template function
trizin Jan 29, 2024
42b0b92
Refactor PredictoorAgentConfig to use single quotes for string values
trizin Jan 29, 2024
f0d678b
Add from_json methods to CloudProvider subclasses
trizin Jan 29, 2024
d7f07d9
Add default value for deployments in DeploymentInfo.py
trizin Jan 29, 2024
0839cfe
Refactor deployment functions and update deployment info
trizin Jan 29, 2024
ecbeec7
Fix formatting in run_command_args variable
trizin Jan 29, 2024
7b2dba6
Update deployment command in DeploymentMethod.py
trizin Jan 29, 2024
5c7d698
Formatting
trizin Jan 29, 2024
668f77c
Add deployer command to CLI arguments
trizin Jan 29, 2024
07bf315
Add do_deployer function to cli_module.py
trizin Jan 29, 2024
e47dce9
Refactor - move to pdr
trizin Jan 29, 2024
1ab5b2a
Refactor PredictoorAgentConfig.py to use single quotes for string lit…
trizin Jan 29, 2024
da4789a
Formatting
trizin Jan 29, 2024
a0d97ea
Refactor PredictoorAgentConfig get_run_command method
trizin Jan 29, 2024
37b48d8
Black
trizin Jan 29, 2024
c350131
Add delete_registry function to cloud.py
trizin Jan 29, 2024
1e5d06f
Add deploy_registry and destroy_registry subcommands to main function
trizin Jan 29, 2024
e77636a
Add methods for printing registry URL and authenticating to the registry
trizin Jan 29, 2024
081dc78
Add registry deployment and destruction functionality
trizin Jan 29, 2024
91fb6e4
Add remote registry functionality to CLI arguments
trizin Jan 29, 2024
e1c0bd2
Add new actions to deployer.py
trizin Jan 29, 2024
ea46ec9
Deployment module and pm2 & compose support
trizin Jan 30, 2024
b984e41
Linter
trizin Jan 30, 2024
abe0298
Refactor deployment module
trizin Jan 30, 2024
7aa289a
Add error checking and improve subprocess.run calls
trizin Jan 30, 2024
3c45a78
Linter
trizin Jan 30, 2024
f9714dd
Linter
trizin Jan 30, 2024
843d604
Update provider argument to be optional
trizin Jan 30, 2024
62e4727
Refactor DeployConfig class to improve code readability and maintaina…
trizin Jan 30, 2024
8371895
Linter
trizin Jan 30, 2024
7ce0560
Add private key parameter to PredictoorAgentConfig constructor
trizin Jan 30, 2024
454e934
Move PK to single agent config
trizin Jan 30, 2024
315ddb8
Formatting
trizin Jan 30, 2024
36fa301
Fix path
trizin Jan 30, 2024
7cd343a
Fix path
trizin Jan 30, 2024
420717b
Refactor deployment methods and add support for custom config names
trizin Jan 30, 2024
9a7ca34
Update agent-deployer.md with new commands
trizin Jan 30, 2024
d49b81c
Formatting
trizin Jan 30, 2024
70553d5
Know your hashtag count
trizin Jan 30, 2024
fd0e331
Update deploy command in deployer.py
trizin Jan 30, 2024
6c5ef25
Refactor run_command method to deploy_command
trizin Jan 30, 2024
7c78895
Add json property to CloudProvider class
trizin Jan 30, 2024
a1d4b97
Cpu and mem optional
trizin Jan 30, 2024
6911b2e
Update DeployConfig to require agent_config
trizin Jan 30, 2024
a689fd5
Linter
trizin Jan 30, 2024
2228b01
Update deploy_command arguments
trizin Jan 30, 2024
2edaf42
Refactor get_provider function to handle multiple deployment configur…
trizin Jan 30, 2024
c2d6224
Remove checks
trizin Jan 30, 2024
336ffca
Add optional type hinting for cloud_provider parameter
trizin Jan 30, 2024
b0c68e4
Add auth_kubernetes_cluster method to CloudProvider subclasses
trizin Jan 30, 2024
3347e3d
Refactor deployment functions and add namespace support
trizin Jan 30, 2024
1bf3ef9
Black
trizin Jan 30, 2024
96f2bc4
Update README with examples for PM2 and K8S with GCP
trizin Jan 30, 2024
ce5351a
Update command line arguments in agent-deployer.md
trizin Jan 30, 2024
e640984
Linter
trizin Jan 30, 2024
fa4605d
Mypy
trizin Jan 30, 2024
796db26
Skip deployer argument in test_arg_parser()
trizin Jan 30, 2024
75e568f
Update stake amounts for BTC/USDT and ETH/USDT pairs
trizin Jan 30, 2024
a46425c
update predictoor readme Run Many Bots at Once section
trizin Jan 30, 2024
571cc0b
Update s_until_epoch_end value in ppss.yaml
trizin Jan 30, 2024
9adf0e7
`deployer` correction
trizin Jan 30, 2024
9f308c6
Formatting
trizin Jan 30, 2024
0bedeab
Remove PM2 support
trizin Jan 30, 2024
84f5a5f
Add numbers to all sections and subsections update table of contents
trizin Jan 31, 2024
70cedaa
Ditch docker-compose from deployer
trizin Jan 31, 2024
b2a62a7
Deployment module unit tests
trizin Jan 31, 2024
b46f0d2
Add unit tests for wallet module
trizin Jan 31, 2024
c9cc4e2
Fix function names
trizin Jan 31, 2024
dc8b94d
Remove pylint disable
trizin Jan 31, 2024
8cef262
Add tests for cloud module
trizin Jan 31, 2024
b4b6e94
Merge branch 'main' into issue369-epic-pdr-bot-make-it-easy-to-deploy…
trizin Jan 31, 2024
785dcd4
Formatting
trizin Jan 31, 2024
86f354d
Remove more docker-compose stuff
trizin Jan 31, 2024
8a50d53
Agent deployer config class tests
trizin Jan 31, 2024
9ce5ede
Predictoor agent config class tests
trizin Jan 31, 2024
22ee2f9
Test deploy config
trizin Feb 2, 2024
a56212d
Test deploy file
trizin Feb 2, 2024
2460299
Test deployment info
trizin Feb 2, 2024
e3d7060
Test deployment method
trizin Feb 2, 2024
8e4ef5b
Test single agent config
trizin Feb 2, 2024
a63b6b7
Test config parser
trizin Feb 2, 2024
70893f2
Move gen_templates to util
trizin Feb 2, 2024
875f376
Remove gen_templates from deployer
trizin Feb 2, 2024
0acb2a8
Add tests for gen_templates
trizin Feb 2, 2024
674cd4b
Add tests for deployer
trizin Feb 2, 2024
172c483
Formatting
trizin Feb 2, 2024
dfa24a2
Add missing import
trizin Feb 2, 2024
2267d04
Fix linter issues
trizin Feb 2, 2024
e6bc36c
Fix fs issues
trizin Feb 2, 2024
d9dc937
Update test_wallet.py
trizin Feb 2, 2024
7507043
Update test_wallet.py
trizin Feb 2, 2024
eeb522d
Optional check_return_code param
trizin Feb 5, 2024
9513b1c
Update create_namespace function to disable check status code
trizin Feb 5, 2024
80937f7
Merge branch 'main' into issue369-epic-pdr-bot-make-it-easy-to-deploy…
trizin Feb 12, 2024
b1189be
Update test_deployment.py
trizin Feb 12, 2024
3b528be
Black
trizin Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,7 @@ parquet_data/

# pdr_backend accuracy output
pdr_backend/accuracy/output/*.json

# agent deployer
.keys.json
.deployments/
180 changes: 180 additions & 0 deletions READMEs/agent-deployer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Agent Deployment Tool

`deployer` is a streamlined command-line utility designed for efficiently generating and managing Predictoor agent deployments.

## Usage

### Agent Configurations
Firstly, you need to set up your agents configuration. This is done by creating a config entry under `deployment_configs` in `ppss.yaml` file.

Here is an example structure for your reference:

```yaml
deployment_configs:
testnet_predictoor_deployment:
cpu: '1'
memory: '512Mi'
source: "binance"
type: "predictoor"
approach: 3
network: "sapphire-testnet"
s_until_epoch_end: 20
pdr_backend_image_source: "oceanprotocol/pdr-backend:latest"
agents:
- pair: 'BTC/USDT'
stake_amt: 15
timeframe: 5m
approach: 1
- pair: 'ETH/USDT'
stake_amt: 20
timeframe: 1h
s_until_epoch_end: 60
```

*Tip: Specific agent settings (like source, timeframe) will override general settings if provided.*

### Private Keys

Create a `.keys.json` file and format it as follows:
```
{
"config_name": ["pk1", "pk2"...]
}
```

*Note: If you have fewer private keys than number of agents, the tool will create new wallets and update the .keys.json file.*

### Generate Templates

The `generate` command is used to create deployment template files based on a configuration file.

```
pdr deployer generate <config_path> <config_name> <deployment_method> <output_dir>
```

- `<config_path>`: Path to the yaml config file.
- `<config_name>`: Name of the config.
- `<deployment_method>`: Method of deployment (choices: "k8s").
- `<output_dir>`: Output directory for the generated files.

Take a note of the `config_name`, you will need it later!

### Deploy Config

The `deploy` command is used to deploy agents based on a specified config name.

```
pdr deployer deploy <config_name> [-p PROVIDER] [-r REGION] [--project_id PROJECT_ID] [--resource_group RESOURCE_GROUP] [--subscription_id SUBSCRIPTION_ID]
```

- `<config_name>`: Name of the config.
- -p, --provider: Cloud provider (optional, choices: "aws", "azure", "gcp"). (optional)
- -r, --region: Deployment zone/region (optional).
- --project_id: Google Cloud project id (optional).
- --resource_group: Azure resource group (optional).
- --subscription_id: Azure subscription id (optional).

### Destroy Config

The `destroy` command is used to destroy agents deployed based on a specified configuration.

```
pdr deployer destroy <config_name> [-p PROVIDER]
```

- `<config_name>`: Name of the config.
- -p, --provider: Cloud provider (optional, choices: "aws", "azure", "gcp"). (optional)

### Logs

The `logs` command is used to retrieve logs from deployed agents.

```
pdr deployer logs <config_name> [-p PROVIDER]
```

- `<config_name>`: Name of the config.
- -p, --provider: Cloud provider (optional, choices: "aws", "azure", "gcp"). (optional)


### Remote Container Registry

The `registry` command is used to manage remote registries for agent deployment.

```
pdr deployer registry <action> <registry_name> [-p PROVIDER] [-r REGION] [--project_id PROJECT_ID] [--resource_group RESOURCE_GROUP]
```

- `<action>`: Action (choices: "deploy", "destroy", "auth", "url").
- `<registry_name>`: Registry name.
- -p, --provider: Cloud provider (optional, choices: "aws", "azure", "gcp").
- -r, --region: Deployment zone/region (optional).
- --project_id: Google Cloud project id (optional).
- --resource_group: Azure resource group (optional).


### Build

The build command is used to build a container image.

```
pdr deployer build <image_name> <image_tag>
```

- `<image_name>`: Image name (default: "pdr_backend").
- `<image_tag>`: Image tag (default: "deployer").


#### Push

The `push` command is used to push container images to a remote registry.

```
pdr deployer push <registry_name> [<image_name>] [<image_tag>]
```

- `<registry_name>`: Registry name.
- `<image_name>`: Image name (default: "pdr_backend").
- `<image_tag>`: Image tag (default: "deployer").


## Examples

### K8S with GCP

Outputs are truncated for brevity.

```shell
$ pdr deployer generate ppss.yaml predictoors_cluster k8s ./predictoors_approach3
Generated k8s templates for predictoors_cluster
Output path: ./predictoor_approach3
Config name: predictoors_cluster
Deployment method: k8s
Number of agents: 2
To deploy: pdr deployer deploy predictoors_cluster
```

```shell
$ pdr deployer deploy predictoors_cluster -p gcp -r europe-west2 --project_id id_goes_here
Deploying predictoors_cluster...
Authenticating to Kubernetes cluster...
Fetching cluster endpoint and auth data.
kubeconfig entry generated for predictoors_cluster.
Cluster is ready, deploying the agents...
namespace/predictoors_cluster created
deployment.apps/pdr-predictoor1-3-btc-usdt-5m-binance created
deployment.apps/pdr-predictoor2-3-eth-usdt-5m-binance created
```

```shell
$ pdr deployer logs predictoors_cluster
Getting logs for predictoors_cluster...
Getting cluster logs...
NAME READY STATUS RESTARTS AGE
pdr-predictoor1-3-btc-usdt-5m-binance-1294c5aa3-fjc65 1/1 Running 0 91s
pdr-predictoor2-3-eth-usdt-5m-binance-21dfcf3bc4-b6nnk 1/1 Running 0 91s
-> Submit predict tx result: success.
====================================================================================================================================================================================
cur_epoch=5688716, cur_block_number=4658908, cur_timestamp=1706615099, next_slot=1706615100, target_slot=1706615400. 295 s left in epoch (predict if <= 30 s left). s_per_epoch=300
...
```
136 changes: 119 additions & 17 deletions READMEs/predictoor.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ SPDX-License-Identifier: Apache-2.0

This README shows how to earn $ by running a predictoor bot on mainnet.

1. **[Install](#install-pdr-backend-repo)**
1. **[Simulate modeling & trading](#simulate-modeling-and-trading)**
1. **[Run bot on testnet](#run-predictoor-bot-on-sapphire-testnet)**
1. **[Run bot on mainnet](#run-predictoor-bot-on-sapphire-mainnet)**
1. **[Claim payout](#claim-payout)**
1. **[Check performance](#check-performance)**


1. **[Install](#1-install-pdr-backend-repo)**
1. **[Simulate modeling & trading](#2-simulate-modeling-and-trading)**
1. **[Run bot on testnet](#3-run-predictoor-bot-on-sapphire-testnet)**
1. **[Run bot on mainnet](#4-run-predictoor-bot-on-sapphire-mainnet)**
1. **[Claim payout](#5-claim-payout)**
1. **[Go Beyond](#6-go-beyond)**
1. [Optimize Model](#61-optimize-model)
1. [Run Many Bots at Once](#62-run-many-bots-at-once)
1. [Private Keys](#621-private-keys)
1. [Generate Deployment Templates](#622-generate-deployment-templates)
1. [Deploy](#623-deploy)
1. [Monitoring logs](#624-monitoring-logs)
1. [Destroy](#625-destroy)
1. [Run Local Network](#63-run-local-network)
1. [Other READMEs](#64-other-readmes)

Then, you can [go beyond](#go-beyond): [optimize model](#optimize-model), [run >1 bots](#run-many-bots-at-once), and more.


## Install pdr-backend Repo
## 1. Install pdr-backend Repo

In a new console:

Expand All @@ -42,7 +53,7 @@ If you're running MacOS, then in console:
codesign --force --deep --sign - venv/sapphirepy_bin/sapphirewrapper-arm64.dylib
```

## Simulate Modeling and Trading
## 2. Simulate Modeling and Trading

Simulation allows us to quickly build intuition, and assess the performance of the data / predicting / trading strategy (backtest).

Expand Down Expand Up @@ -70,7 +81,7 @@ The baseline settings use a linear model inputting prices of the previous 10 epo

Profit isn't guaranteed: fees, slippage and more eats into them. Model accuracy makes a big difference too.

## Run Predictoor Bot on Sapphire Testnet
## 3. Run Predictoor Bot on Sapphire Testnet

Predictoor contracts run on [Oasis Sapphire](https://docs.oasis.io/dapp/sapphire/) testnet and mainnet. Sapphire is a privacy-preserving EVM-compatible L1 chain.

Expand Down Expand Up @@ -99,7 +110,7 @@ The CLI has a tool to track performance. Type `pdr get_predictoor_info -h` for d
You can track behavior at finer resolution by writing more logs to the [code](../pdr_backend/predictoor/approach3/predictoor_agent3.py), or [querying Predictoor subgraph](subgraph.md).


## Run Predictoor Bot on Sapphire Mainnet
## 4. Run Predictoor Bot on Sapphire Mainnet

Time to make it real: let's get our bot running on Sapphire _mainnet_.

Expand All @@ -121,36 +132,127 @@ This is where there's real $ at stake. Good luck!

Track performance, as in testnet.

## Claim Payout
## 5. Claim Payout

When running predictoors on mainnet, you have the potential to earn $.

**[Here](payout.md)** are instructions to claim your earnings.


# Go Beyond
# 6. Go Beyond

You've gone through all the essential steps to earn $ by running a predictoor bot on mainnet.

The next sections describe how to go beyond, by optimizing the model and more.

## Optimize Model
## 6.1 Optimize Model

Once you're familiar with the above, you can make your own model and optimize it for $. Here's how:
1. Fork `pdr-backend` repo.
1. Change predictoor approach3 modeling code as you wish, while iterating with simulation.
1. Bring your model as a Predictoor bot to testnet then mainnet.


## Run Bots Remotely
## 6.2 Run Many Bots at Once

`deployer` is a streamlined command-line utility designed for efficiently generating and managing agent deployments.

This section shows how to use `deployer` to deploy bots on testnet.

The config that will be deployed can be found in `ppss.yaml` under `deployment_configs` section. You can create your own config by copying the existing one and modifying it as you wish. For the sake of this example, the existing config will be used.

`ppss.yaml`:
```yaml
deployment_configs:
testnet_predictoor_deployment:
cpu: '1'
memory: '512Mi'
source: "binance"
type: "predictoor"
approach: 3
network: "sapphire-testnet"
s_until_epoch_end: 20
pdr_backend_image_source: "oceanprotocol/pdr-backend:latest"
agents:
- pair: 'BTC/USDT'
stake_amt: 0.1
timeframe: 5m
approach: 1
- pair: 'ETH/USDT'
stake_amt: 1
timeframe: 1h
s_until_epoch_end: 100
```

### 6.2.1. Private Keys
Create a `.keys.json` file and add the following:
```
{
"testnet_predictoor_deployment": ["pk1", "pk2"]
}
```

Each agent requires a private key. If you have fewer private keys than number of agents, the tool will create new wallets and update the `.keys.json` file. Make sure the wallets have enough ROSE and OCEAN to pay for gas and stake.


### 6.2.2. Generate Deployment Templates

The `generate` command is used to create deployment template files based on a configuration file.

Execute the following command to generate the deployment templates:
```
pdr deployer generate ppss.yaml testnet_predictoor_deployment k8s testnet_deployments
```

Where `ppss.yaml` is the config file, `testnet_predictoor_deployment` is the config name, `k8s` is the deployment method, and `testnet_deployments` is the output directory for the generated files.

Available deployment methods are `k8s`.

### 6.2.3. Deploy

The `deploy` command is used to deploy the generated templates.

Execute the following command to deploy the generated config:
```
pdr deployer deploy testnet_predictoor_deployment -p gcp -r europe-west2 --project-id
```

Where `testnet_predictoor_deployment` is the config name.

Since k8s is used as the deployment method, the following additional parameters are required:
- `-p` or `--provider`: The cloud provider to use. Available options are `gcp`, `aws`, and `azure`.
- `-r` or `--region`: The region to deploy to.
- `--project-id`: The cloud provider project id. Only required for GCP.
- `--resource-group`: The cloud provider resource group. Only required Azure.
- `--subscription-id`: The cloud provider subscription id. Only required for Azure.

### 6.2.4 Monitoring logs

The `logs` command is used to retrieve logs from deployed agents.

Execute the following command to retrieve logs from the deployed agents:
```
pdr deployer logs testnet_predictoor_deployment
```

Where `testnet_predictoor_deployment` is the config name.

### 6.2.5 Destroy

The `destroy` command is used to destroy agents deployed based on a specified configuration.

Execute the following command to destroy the deployed agents:
```
pdr deployer destroy testnet_predictoor_deployment
```

To scale up compute or run without tying up your local machine, you can run bots remotely. Get started [here](remotebot.md).
Where `testnet_predictoor_deployment` is the config name.

## Run Local Network
## 6.3 Run Local Network

To get extra-fast block iterations, you can run a local test network (with local bots). It does take a bit more up-front setup. Get started [here](barge.md).

## Other READMEs
## 6.4 Other READMEs

- [Root README](../README.md)

Expand Down
Loading
Loading