An open API service indexing awesome lists of open source software.

https://github.com/trianalab/jesse-chart

A Kubernetes Helm chart for Jesse trading bot
https://github.com/trianalab/jesse-chart

algo-trading bitcoin bot chart crypto cryptocurrency helm helm-chart helm-charts jesse jesse-ai jesse-framework kubernetes trade trading-algorithms trading-strategies

Last synced: 9 months ago
JSON representation

A Kubernetes Helm chart for Jesse trading bot

Awesome Lists containing this project

README

          

# jesse

A Helm chart for Jesse trade bot.

![Version: 0.0.40](https://img.shields.io/badge/Version-0.0.40-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.4](https://img.shields.io/badge/AppVersion-1.10.4-informational?style=flat-square) [![DOI](https://zenodo.org/badge/909500081.svg)](https://doi.org/10.5281/zenodo.14587093) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/jesse-chart)](https://artifacthub.io/packages/helm/jesse-chart/jesse)

# Index
- [Usage](#usage)
- [Prerequisites](#prerequisites)
- [Deployment](#deployment)
- [Step 1 (optional): create a Kind cluster](#step-1-optional-create-a-kind-cluster)
- [Step 2: configure Jesse](#step-2-configure-jesse)
- [Step 3: Install the Helm chart](#step-3-install-the-helm-chart)
- [Step 4: Verify the deployment](#step-4-verify-the-deployment)
- [Step 5: Expose the service](#step-5-expose-the-service)
- [Cleanup](#cleanup)
- [Additional information](#additional-information)
- [Configuration](#configuration)
- [Requirements](#requirements)
- [Values](#values)
- [ARM64 support](#arm64-support)
- [License](#license)
- [Support](#support)
- [Contributions](#contributions)
- [Acknowledgments](#acknowledgments)


# Usage

This document provides a comprehensive guide for deploying the [Jesse](https://jesse.trade/) trade bot using the Helm chart provided in this repository.

## Prerequisites

1. Kubernetes cluster: you can use a local cluster like [kind](https://kind.sigs.k8s.io/) for testing purposes.

2. [Helm](https://helm.sh/docs/intro/install/) installed.

## Deployment

### Step 1 (optional): create a Kind cluster

For testing purposes, you can create a kind cluster:

```bash
kind create cluster --name jesse-cluster
```

### Step 2: configure Jesse

Pull the values file:
```bash
helm show values oci://ghcr.io/trianalab/jesse-chart/jesse --version 0.0.40 > values.yaml
```
Add the `LICENSE_API_TOKEN` within the `config` field in the `values.yaml` file according to Jesse's [documentation](https://docs.jesse.trade/docs/configuration#environment-variables).

### Step 3: Install the Helm chart

```bash
helm install jesse oci://ghcr.io/trianalab/jesse-chart/jesse --version 0.0.40 --namespace jesse-namespace --create-namespace -f values.yaml
```

### Step 4: Verify the deployment

Wait for the deployment to be ready (it can take up to a minute):

```bash
kubectl wait --for=condition=available --namespace jesse-namespace deployment/jesse --timeout=300s
```

Ensure all the pods, services, and ingress resources are created and running as expected:

```bash
kubectl get all --namespace jesse-namespace
```

### Step 5: Expose the service

The service is exposed as a `ClusterIP` by default. To access it externally, you can use port forwarding or an ingress resource. The Helm chart's `NOTES.txt` provides details on accessing the service.

## Cleanup

To remove the deployment, run the following commands:

```bash
helm uninstall jesse --namespace jesse-namespace
kubectl delete namespace jesse-namespace
```

## Additional information

- For troubleshooting or additional configuration, consult the `NOTES.txt` generated by the Helm chart or refer to the official [Jesse documentation](https://jesse.trade/).
- Advanced users can modify the `values.yaml` file to fit specific deployment needs.


# Configuration

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | postgresql | 16.4.9 |
| https://charts.bitnami.com/bitnami | redis | 20.7.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | affinity expands nodeSelectors, more information can be found [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). |
| autoscaling.enabled | bool | `false` | autoscaling.enabled is for enabling horizontal autoscaling, more information can be found [here](https://kubernetes.io/docs/concepts/workloads/autoscaling/) |
| autoscaling.maxReplicas | int | `10` | autoscaling.maxReplicas sets the maximum number of replicas. |
| autoscaling.minReplicas | int | `1` | autoscaling.minReplicas sets the minimum number of replicas. |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | autoscaling.targetCPUUtilizationPercentage sets CPU threshold that triggers the autoscaling. |
| config | string | `"PASSWORD=test\nAPP_PORT=9000\n\nPOSTGRES_HOST=postgresql\nPOSTGRES_NAME=jesse_db\nPOSTGRES_PORT=5432\nPOSTGRES_USERNAME=jesse_user\nPOSTGRES_PASSWORD=pg-password\n\nREDIS_HOST=redis-master\nREDIS_PORT=6379\nREDIS_PASSWORD=redis-password\n\nLICENSE_API_TOKEN="` | config contains all the configuration variables for Jesse, more information can be found [here](https://docs.jesse.trade/docs/configuration#environment-variables). |
| fullnameOverride | string | `""` | fullnameOverride is to fully override the chart name. |
| image.command | string | `""` | image.command overrides the default command to run in the jesse container. |
| image.pullPolicy | string | `"IfNotPresent"` | image.pullPolicy sets the pull policy for images. |
| image.repository | string | `"salehmir/jesse"` | image.repository sets the container image more information can be found [here](https://kubernetes.io/docs/concepts/containers/images/). |
| image.tag | string | `""` | image.tag overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | imagePullSecrets is for the secretes for pulling an image from a private repository more information can be found [here](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). |
| ingress.annotations | object | `{}` | ingress.annotations is for setting Kubernetes Annotations to the Ingress, more information can be found [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). |
| ingress.className | string | `""` | ingress.className sets the ingress class, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). |
| ingress.enabled | bool | `false` | ingress.enabled is for setting up the ingress, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/ingress/). |
| ingress.hosts | list | `[]` | ingress.hosts is a list of ingress hosts. |
| ingress.tls | list | `[]` | ingress.tls is the secret holding the TLS key and secret, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls). |
| nameOverride | string | `""` | nameOverride is to override the chart name. |
| nodeSelector | object | `{}` | nodeSelector constrains a pod to be scheduled on a particular node, more information can be found [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). |
| podAnnotations | object | `{}` | podAnnotations is for setting Kubernetes Annotations to a Pod, more information can be found [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). |
| podLabels | object | `{}` | podLabels is for setting Kubernetes Labels to a Pod, more information can be found [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). |
| podSecurityContext | object | `{}` | podSecurityContext defines privilege and access control settings for a pod, more information can be found [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). |
| postgresql.auth.database | string | `"jesse_db"` | postgresql.database is the database used by Jesse. |
| postgresql.auth.password | string | `"pg-password"` | postgresql.password is the database password used by Jesse. |
| postgresql.auth.username | string | `"jesse_user"` | postgresql.username is the database username used by Jesse. |
| redis.auth.password | string | `"redis-password"` | redis.auth.password is the redis password used by Jesse. |
| replicaCount | int | `1` | replicaCount will set the replicaset count more information can be found [here](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/). |
| resources | object | `{}` | resources sets the amount of resources the container needs, more information can be found [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). |
| securityContext | object | `{}` | securityContext defines privilege and access control settings for a container, more information can be found [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). |
| service.annotations | object | `{}` | service.annotations is for setting Kubernetes Annotations to a Service, more information can be found [here](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/). |
| service.nodePort | int | `30443` | service.nodePort sets a specific node port when service.type is set to `NodePort`, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport-custom-port). |
| service.port | int | `9000` | service.port sets the port, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports). |
| service.type | string | `"ClusterIP"` | service.type sets the service type, more information can be found [here](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). |
| serviceAccount.annotations | object | `{}` | serviceAccount.annotations to add to the service account. |
| serviceAccount.automount | bool | `true` | serviceAccount.automount automatically mounts ServiceAccount's API credentials. |
| serviceAccount.create | bool | `true` | serviceAccount.create specifies whether a service account should be created, more information can be found [here](https://kubernetes.io/docs/concepts/security/service-accounts/). |
| serviceAccount.name | string | `""` | serviceAccount.name is the name of the service account to use. If not set and create is true, a name is generated using the fullname template. |
| tolerations | list | `[]` | tolerations allow the scheduler to schedule pods with matching taints, more information can be found [here](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/). |
| volumeMounts | list | `[]` | volumeMounts is a list of additional volumeMounts on the output Deployment definition. |
| volumes | list | `[]` | volumes is a list of additional volumes on the output Deployment definition. |


# ARM64 support

This project also builds a [linux/arm64](https://github.com/TrianaLab/jesse-chart/pkgs/container/jesse-arm64) version of the [official Jesse image](https://hub.docker.com/r/salehmir/jesse), which is for linux/amd64. It does not include the [live-trade](https://docs.jesse.trade/docs/livetrade#live-trade) plugin due to libraries limitations, but for the moment it can be used for backtesting in linux arm64 devices.


# License
This repository is licensed under the GNU Affero General Public License v3.0 (AGPLv3).

By using this project, you agree to comply with the terms of the AGPLv3 license. See the [LICENSE](LICENSE.md) file for details.

This project also includes third-party dependencies that are subject to their respective licenses. See the [NOTICES.md](NOTICES.md) file for attribution.


# Support
If you encounter any issues, feel free to open an issue.


# Contributions
Contributions are welcome! Please follow these steps:

1. Fork this repository.
2. Make your changes.
3. Submit a pull request with a detailed description of your changes.


# Acknowledgments
This project builds upon the incredible work of:

* The [Jesse](https://github.com/jesse-ai/jesse) team.
* [Bitnami](https://bitnami.com/) for their Redis and PostgreSQL Helm charts.