Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion infrastructure/bicep/container-groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ Container Instances are:

- hb-deuro-usdt: Hummingbot (dEURO/USDT)
- hb-deps-usdt: Hummingbot (dEPS/USDT)
- rk: RangeKeeper Liquidity Bot

### Fileshare

Each Container Instance uses its own fileshare, which is mounted to `/mnt/hummingbot`.
Each Container Instance uses its own fileshare:

- Hummingbot instances: mounted to `/mnt/hummingbot`
- RangeKeeper: mounted to `/app/data` (contains `.env` with sensitive config and `state.json` for persistence)

### Entrypoint

Expand Down
3 changes: 2 additions & 1 deletion infrastructure/bicep/container-groups/deploy.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ environmentOptions=("loc" "dev" "prd")

# "hb-deuro-usdt": Hummingbot (dEURO/USDT)
# "hb-deps-usdt": Hummingbot (dEPS/USDT)
instanceNameOptions=("hb-deuro-usdt" "hb-deps-usdt")
# "rk": RangeKeeper Liquidity Bot
instanceNameOptions=("hb-deuro-usdt" "hb-deps-usdt" "rk")

# --- ARGUMENTS --- #
DOCKER_USERNAME=
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/bicep/container-groups/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ param containerEnv array
@description('Command of the container')
param containerCommand array

@description('Container CPU resource')
param containerCPU int
@description('Container CPU resource (supports decimal, e.g. 0.5)')
param containerCPU string

@description('Container memory resource')
param containerMemory int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ param containerEnv array
param containerCommand array

@description('Container CPU resource')
param containerCPU int
param containerCPU string

@description('Container memory resource')
param containerMemory int
Expand Down Expand Up @@ -66,7 +66,7 @@ resource containerGroup 'Microsoft.ContainerInstance/containerGroups@2023-05-01'
image: containerImage
resources: {
requests: {
cpu: containerCPU
cpu: json(containerCPU)
memoryInGB: containerMemory
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:beta"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": 0.5
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deps-usdt-dev"
},
{
"name": "STRATEGY_FILE",
"value": "deps-usdt-conf_pure_mm.yml"
}
]
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:beta"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": "0.5"
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deps-usdt-dev"
},
"containerCommand": {
"value": []
{
"name": "STRATEGY_FILE",
"value": "deps-usdt-conf_pure_mm.yml"
}
]
},
"containerCommand": {
"value": []
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:beta"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": 0.5
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deuro-usdt-dev"
},
{
"name": "STRATEGY_FILE",
"value": "deuro-usdt-conf_pure_mm.yml"
}
]
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:beta"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": "0.5"
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deuro-usdt-dev"
},
"containerCommand": {
"value": []
{
"name": "STRATEGY_FILE",
"value": "deuro-usdt-conf_pure_mm.yml"
}
]
},
"containerCommand": {
"value": []
}
}
}
}
38 changes: 38 additions & 0 deletions infrastructure/bicep/container-groups/parameters/dev-rk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/rangekeeper:beta"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/app/data",
"readOnly": false
}
]
},
"containerCPU": {
"value": "0.5"
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "DEPLOY_INFO",
"value": ""
}
]
},
"containerCommand": {
"value": []
}
}
}
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:latest"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": 0.5
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deps-usdt"
},
{
"name": "STRATEGY_FILE",
"value": "deps-usdt-conf_pure_mm.yml"
}
]
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"fileShareQuota": {
"value": 100
},
"containerImage": {
"value": "dfxswiss/hummingbot:latest"
},
"containerVolumeMounts": {
"value": [
{
"name": "volume",
"mountPath": "/mnt/hummingbot",
"readOnly": false
}
]
},
"containerCPU": {
"value": "0.5"
},
"containerMemory": {
"value": 1
},
"containerEnv": {
"value": [
{
"name": "BOT_DIR",
"value": "deps-usdt"
},
"containerCommand": {
"value": []
{
"name": "STRATEGY_FILE",
"value": "deps-usdt-conf_pure_mm.yml"
}
]
},
"containerCommand": {
"value": []
}
}
}
}
Loading
Loading