Multi-Cloud Deployment (#1)

* Introduce instances list to scale bots and add config templating

* Use env var for wallet address if not provided as path param

* Expose SOL price as metric

* Update docs

* Add auto-swap

* Add Panopticon

* implement backoff stategy in autoswap

* Add retry logic for withdraw and swap

* bump drift-sdk, update ctl.sh and docs

* Update filler bot, add tx metrics

* Add user-metrics

* Update build and dashboard
This commit is contained in:
Patrick Balsiger
2024-04-28 07:25:08 +02:00
committed by GitHub
parent 6bd2c3367b
commit f05fac48ca
58 changed files with 9783 additions and 319 deletions

View File

@@ -0,0 +1,71 @@
#cloud-config
groups:
- ubuntu: [root,sys]
- docker
- bot
users:
- default
- name: keeper
gecos: keeper
shell: /bin/bash
primary_group: bot
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin, docker
lock_passwd: false
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- chrony
- docker.io
- docker-compose
ntp:
enabled: true
ntp_client: chrony
servers:
- ${ntp_server}
runcmd:
- systemctl stop snapd && systemctl disable snapd
- git clone -b feature/scaling https://github.com/0x1d/drift-keeper /app/bot
- cp -rT /transfer /app/bot && rm -rf /transfer
- chown -R keeper:bot /app/bot
- cd /app/bot && sudo -u keeper -g bot -- docker-compose up -d
write_files:
- path: /transfer/.env
encoding: b64
owner: root:root
permissions: '0750'
content: ${env_file}
- path: /transfer/.env.monitoring
encoding: b64
owner: root:root
permissions: '0750'
content: ${env_monitoring_file}
- path: /transfer/config.yaml
encoding: b64
owner: root:root
permissions: '0750'
content: ${config_file}
- path: /transfer/prometheus/prometheus.yml
encoding: b64
owner: root:root
permissions: '0750'
content: ${prometheus_config_file}
- path: /transfer/prometheus/web.yml
encoding: b64
owner: root:root
permissions: '0750'
content: ${prometheus_web_file}
- path: /transfer/docker-compose.yaml
encoding: b64
owner: root:root
permissions: '0750'
content: ${docker_compose_file}