Code Monkey home page Code Monkey logo

hummingbot-kubernetes's People

Contributors

stalkopat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hummingbot-kubernetes's Issues

Example-StatefulSet-BTC-USDT.yaml no longer functioning?

I set up a k8s cluster using https://k3s.io/ - all seems fine so far, I have run other pods on it successfully.

Downloaded Example-StatefulSet-BTC-USDT.yaml and ran it with

# kubectl apply -f ./Example-StatefulSet-BTC-USDT.yaml

# kubectl get pods
NAME                          READY   STATUS             RESTARTS        AGE
btc-usdt-0                    0/1     CrashLoopBackOff   6 (2m29s ago) 8m22s

and the logs:

# kubectl logs btc-usdt-0
Traceback (most recent call last):
  File "bin/hummingbot_quickstart.py", line 152, in <module>
    fork_and_start(main)
  File "/home/hummingbot/bin/docker_connection.py", line 137, in fork_and_start
    main_function()
  File "bin/hummingbot_quickstart.py", line 148, in main
    asyncio.get_event_loop().run_until_complete(quick_start(args, secrets_manager))
  File "/home/hummingbot/miniconda3/envs/hummingbot/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "bin/hummingbot_quickstart.py", line 83, in quick_start
    if not Security.login(secrets_manager):
  File "/home/hummingbot/hummingbot/client/config/security.py", line 42, in login
    if not validate_password(secrets_manager):
  File "/home/hummingbot/hummingbot/client/config/config_crypt.py", line 72, in validate_password
    with open(PASSWORD_VERIFICATION_PATH, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hummingbot/conf/.password_verification'

I have tried updating the example my own password, and with .password_verification before the quickstart.yml:

data:
.password_verification: |
7b226.....0337d
quickstart.yml: |

But then regardless of what I try, the best I can manage is:

:
  File "/home/hummingbot/hummingbot/client/config/config_crypt.py", line 75, in validate_password
    decrypted_word = secrets_manager.decrypt_secret_value(PASSWORD_VERIFICATION_WORD, encrypted_word)
  File "/home/hummingbot/hummingbot/client/config/config_crypt.py", line 59, in decrypt_secret_value
    value = binascii.unhexlify(value)
binascii.Error: Odd-length string

I can't get a shell into the pod to check exactly what is being created.

Has something changed with using this image in the 8 months since the example.yaml was posted, or am I doing something wrong here?

PersistentVolumeClaim

Hi stalkopat
I have been working with this for a while, but in order to persist the storage (so that when the pods are restarted for any reason, HB can recover the existing orders), I cannot find the way to build the yaml file.
Example:


apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ku-pmm-avax-usdt-11-sc
provisioner: kubernetes.io/gce-pd
volumeBindingMode: Immediate
allowVolumeExpansion: true
reclaimPolicy: Retain
parameters:
type: pd-standard
fstype: ext4
replication-type: none

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ku-pmm-avax-usdt-11-pv-c
namespace: hummingbot
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: ku-pmm-avax-usdt-11-sc

...
...

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ku-pmm-avax-usdt-11
namespace: hummingbot
spec:
replicas: 1
serviceName: ku-pmm-avax-usdt-11
selector:
matchLabels:
app: ku-pmm-avax-usdt-11-hummingbot
template:
metadata:
labels:
app: ku-pmm-avax-usdt-11-hummingbot
spec:
serviceAccountName: ku-pmm-avax-usdt-11-sa
containers:
- name: ku-pmm-avax-usdt-11
image: bgtcapital/hummingbot_pg:latest
resources:
limits:
cpu: 250m
memory: 512Mi
requests:
cpu: 250m
memory: 512Mi
imagePullPolicy: Always
tty: true
stdin: true
command: [ /bin/bash ]
args:
- -c
- >
cp /readonly-conf/.password_verification /conf; cp /readonly-conf/conf_client.yml /conf ; cp /readonly-conf/conf_fee_overrides.yml /conf ; cp /readonly-conf/hummingbot_logs.yml /conf ; cp /readonly-conf/kucoin.yml /conf/connectors; cp /readonly-conf/ku-pmm-avax-usdt-11.yml /conf/strategies ; cp /readonly-conf/spreads_adjusted_on_volatility_script.py /pmm_scripts ; /home/hummingbot/miniconda3/envs/$(head -1 setup/environment-linux.yml | cut -d' ' -f2)/bin/python3
bin/hummingbot_quickstart.py
-p Whitehole001
-f ku-pmm-avax-usdt-11.yml
--auto-set-permissions $(id -u hummingbot):$(id -g hummingbot)
volumeMounts:
- name: hb
mountPath: "/home"
- name: config
mountPath: "/readonly-conf"
volumes:
- name: hb
persistentVolumeClaim:
claimName: ku-pmm-avax-usdt-11-pv-c
readOnly: false
- name: config
configMap:
name: ku-pmm-avax-usdt-11-config

To me it looks as if the mountPath is wrong
volumeMounts:
- name: hb
mountPath: "/home"

Do you have experience adding persistent Volume to the pod, so that orders can be automatically recover ?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.