Skip to content

Commit db477c5

Browse files
authored
feat: add HAProxy and FlowProxy config to BuilderHub and forward HAProxy ports from buildernet VM (#376)
1 parent 8db4bcc commit db477c5

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

custom-recipes/buildernet/mkosi/start.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ RAM=32G
1616
SSH_PORT=2222
1717
OPERATOR_API_PORT=13535
1818
RBUILDER_RPC_PORT=18645
19+
HAPROXY_HTTP_PORT=10080
20+
HAPROXY_HTTPS_PORT=10443
1921

2022
if [[ ! -f "${VM_IMAGE}" ]]; then
2123
echo "Error: VM image not found. Run ./prepare.sh first."
@@ -31,6 +33,8 @@ echo "Starting VM..."
3133
echo " SSH: localhost:${SSH_PORT}"
3234
echo " Operator API: localhost:${OPERATOR_API_PORT}"
3335
echo " rbuilder RPC: localhost:${RBUILDER_RPC_PORT}"
36+
echo " HAProxy HTTP: localhost:${HAPROXY_HTTP_PORT}"
37+
echo " HAProxy HTTPS: localhost:${HAPROXY_HTTPS_PORT}"
3438
echo " Console log: ${CONSOLE_LOG}"
3539
echo " Console socket: ${CONSOLE_SOCK}"
3640

@@ -50,7 +54,7 @@ qemu-system-x86_64 \
5054
-drive file="${VM_DATA_DISK}",format=raw,if=none,id=datadisk \
5155
-device nvme,id=nvme0,serial=nvme-data \
5256
-device nvme-ns,drive=datadisk,bus=nvme0,nsid=12 \
53-
-nic user,model=virtio-net-pci,hostfwd=tcp:127.0.0.1:${SSH_PORT}-:40192,hostfwd=tcp:127.0.0.1:${OPERATOR_API_PORT}-:3535,hostfwd=tcp:127.0.0.1:${RBUILDER_RPC_PORT}-:8645 \
57+
-nic user,model=virtio-net-pci,hostfwd=tcp:127.0.0.1:${SSH_PORT}-:40192,hostfwd=tcp:127.0.0.1:${OPERATOR_API_PORT}-:3535,hostfwd=tcp:127.0.0.1:${RBUILDER_RPC_PORT}-:8645,hostfwd=tcp:127.0.0.1:${HAPROXY_HTTP_PORT}-:80,hostfwd=tcp:127.0.0.1:${HAPROXY_HTTPS_PORT}-:443 \
5458
-chardev socket,id=virtcon,path="${CONSOLE_SOCK}",server=on,wait=off \
5559
-device virtio-serial-pci \
5660
-device virtconsole,chardev=virtcon,name=org.qemu.console.0

playground/utils/builderhub-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,31 @@ rbuilder:
5050
url = "ws://10.0.2.2:5555"
5151
auth_header = ""
5252
53+
flowproxy:
54+
builderhub_endpoint: http://127.0.0.1:7937
55+
builder_endpoint: http://127.0.0.1:8645
56+
# Uncomment to enable ClickHouse:
57+
# clickhouse_host: https://your-clickhouse-host:port
58+
# clickhouse_username: your_username
59+
# clickhouse_password: your_password
60+
# clickhouse_database: db_name
61+
# clickhouse_bundles_table_name: table_name
62+
flashbots_orderflow_signing_address: "0x0000000000000000000000000000000000000000"
63+
system_listen_addr: 127.0.0.1:5542
64+
user_listen_addr: 127.0.0.1:5543
65+
66+
haproxy:
67+
rate_limit_privileged_ips:
68+
- 10.0.2.2
69+
rate_limit_conn_rate_regular: "1000"
70+
rate_limit_conn_rate_privileged: "100000"
71+
rate_limit_total_conn_regular: "1000"
72+
rate_limit_total_conn_privileged: "100000"
73+
rate_limit_bytes_in_rate_regular: "10000000000"
74+
rate_limit_bytes_in_rate_privileged: "100000000000"
75+
rate_limit_http_req_rate_regular: "10000"
76+
rate_limit_http_req_rate_privileged: "1000000"
77+
5378
disk_encryption:
5479
key: 5d7052c0c3aff5834f45e3f33aca0a55ef9f43ca9cf6c5c8e8375ab82564ddb6 # playground value
5580
# Must match builder_id below (dashes become underscores via config-watchdog)

0 commit comments

Comments
 (0)