You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #7 from dnks0/feature/dbx-proxy
* multi instance support
* haproxy maxconn override and automatic default calculation (conservative)
* introduced deployment-modes in terraform stack: bootstrap, proxy-only
* dbx-proxy now uses arm based compute
# Example: forward TCP/443 to a private target in your VPC
@@ -58,6 +58,8 @@ More details about the Terraform module and configurations can be found [here](t
58
58
59
59
You will still need to configure the Databricks-side objects like NCC, private endpoint rules and accept the connection on your endpoint-service.
60
60
61
+
By default the module runs in `deployment_mode = "bootstrap"` and can create networking and the NLB/endpoint service. If you already have networking use `deployment_mode = "bootstrap"` and provide `vpc_id`, and `subnet_ids`. If you already have networking/NLB, set `deployment_mode = "proxy-only"` and provide `vpc_id`, `subnet_ids`, and `nlb_arn` (see Terraform docs for details).
62
+
61
63
### Troubleshooting
62
64
63
65
To validate that the proxy is up and reachable,run the following from a serverless notebook:
After apply, use the output `vpc_endpoint_service_name` when creating Databricks private endpoint rules (see Databricks guide linked above).
65
+
After apply, use the output `load_balancer.vpc_endpoint_service_name` when creating Databricks private endpoint rules (see Databricks guide linked above).
61
66
Also, make sure to add a domain of your choice as private endpoint rule on your NCC that you could use for [troubleshooting](../README.md#troubleshooting) purposes.
62
67
63
68
---
@@ -72,9 +77,11 @@ These variables define what the proxy should do (listeners, health port, image t
72
77
73
78
| Variable | Type | Default | Description |
74
79
|---|---:|---:|---|
75
-
|`dbx_proxy_image_version`|`string`|`"0.1.0"`| Docker image tag/version of `dbx-proxy` to deploy. |
80
+
|`dbx_proxy_image_version`|`string`|`"0.2.0"`| Docker image tag/version of `dbx-proxy` to deploy. |
76
81
|`dbx_proxy_health_port`|`number`|`8080`| Health port exposed by `dbx-proxy` (HTTP `GET /status`). Also used for NLB target group health checks. |
82
+
|`dbx_proxy_max_connections`|`number`|`null`| Optional HAProxy `maxconn` override. If unset, the AWS module derives a value from vCPU and memory of the selected instance-type. |
77
83
|`dbx_proxy_listener`|`list(object)`|`[]`| Listener configuration (ports/modes/routes/destinations). See **Listener configuration** below. |
84
+
|`deployment_mode`|`string`|`"bootstrap"`| Controls whether the module bootstraps networking/NLB (`bootstrap`) or attaches to existing infrastructure (`proxy-only`). See **Deployment mode behavior** below. |
78
85
79
86
#### AWS-specific variables (`terraform/aws`)
80
87
@@ -83,26 +90,54 @@ These variables define what the proxy should do (listeners, health port, image t
83
90
|`region`|`string`| (required) | AWS region to deploy to. |
84
91
|`prefix`|`string`|`null`| Optional naming prefix. A randomized suffix is always appended to avoid collisions. |
85
92
|`tags`|`map(string)`|`{}`| Extra tags applied to AWS resources (also used as provider default tags). |
86
-
|`instance_type`|`string`|`"t3.medium"`| EC2 instance type for proxy nodes. |
87
-
|`vpc_id`|`string`|`null`| Existing VPC ID. If `null`, the module bootstraps a VPC. |
88
-
|`subnet_ids`|`list(string)`|`[]`| Existing private subnet IDs for the NLB + ASG. If empty, subnets are created. |
89
-
|`vpc_cidr`|`string`|`"10.0.0.0/16"`| VPC CIDR (only used when creating a VPC). |
90
-
|`subnet_cidrs`|`list(string)`|`["10.0.1.0/24","10.0.2.0/24"]`| Private subnet CIDRs (only used when creating subnets). |
91
-
|`enable_nat_gateway`|`bool`|`true`| Whether to create NAT (and related IGW/public subnet) for outbound internet access (only when creating networking). |
92
-
|`public_subnet_cidr`|`string`|`"10.0.0.0/24"`| Public subnet CIDR for the NAT gateway (only used when creating networking). |
93
+
|`instance_type`|`string`|`"t4g.medium"`| EC2 instance type for proxy instances. |
94
+
|`min_capacity`|`number`|`1`| Minimum number of dbx-proxy instances. |
95
+
|`max_capacity`|`number`|`1`| Maximum number of dbx-proxy instances. |
96
+
|`vpc_id`|`string`|`null`| Existing VPC ID. Required for `proxy-only` mode. If `null`, a VPC can be bootstrapped in `bootstrap` mode. |
97
+
|`subnet_ids`|`list(string)`|`[]`| Existing private subnet IDs for the NLB + ASG. Required for `proxy-only` mode. If empty, subnets can be created in `bootstrap` mode. |
98
+
|`vpc_cidr`|`string`|`"10.0.0.0/16"`| VPC CIDR (only used when creating a VPC in `bootstrap`). |
99
+
|`subnet_cidrs`|`list(string)`|`["10.0.1.0/24","10.0.2.0/24"]`| Private subnet CIDRs (only used when creating subnets in `bootstrap` mode). |
100
+
|`enable_nat_gateway`|`bool`|`true`| Whether to create IGW + NAT for outbound internet access (only when creating networking in `bootstrap` mode). |
101
+
|`nat_subnet_cidr`|`string`|`"10.0.0.0/24"`| Public subnet CIDR for the NAT gateway (only used when creating networking in `bootstrap` mode). |
102
+
|`nlb_arn`|`string`|`null`| Existing NLB ARN to attach listeners/target groups to in `proxy-only` mode. |
103
+
104
+
#### Deployment mode behavior
105
+
106
+
-**`bootstrap`** (default)
107
+
- Creates an internal NLB and a PrivateLink endpoint service.
108
+
- If **`vpc_id` + `subnet_ids` are provided**, the module uses existing networking.
109
+
- If **`vpc_id` and `subnet_ids` are not provided**, the module creates a VPC + subnets (and optionally IGW/NAT based on `enable_nat_gateway`).
110
+
-**`proxy-only`**
111
+
- Requires **`vpc_id` + `subnet_ids`** and **`nlb_arn`**.
112
+
- Does **not** create a new NLB or PrivateLink endpoint service; it attaches listeners/target groups to the existing NLB and deploys the proxy only (ec2, security-group, NLB listener & target-groups)
93
113
94
114
---
95
115
96
116
### Outputs (AWS)
97
117
98
-
-`nlb_arn`: ARN of the internal NLB
99
-
-`vpc_endpoint_service_name`: **input** for Databricks private endpoint rules
100
-
-`vpc_endpoint_service_arn`: ARN of the endpoint service
101
-
-`nlb_dns_name`: internal NLB DNS name
102
-
-`nlb_zone_id`: Route53 hosted zone id for NLB aliases
103
-
-`autoscaling_group_name`: ASG name
104
-
-`security_group_id`: Security group ID attached to the proxy instances
105
-
-`target_group_arns`: listener target groups keyed by listener name
0 commit comments