Skip to main content

Environment Files

Environment files define Director topology, clustering, and access control for self-managed deployments. Located in config/environments/. Files containing .example. or .sample. in their name are templates only and are not loaded by the system.

For the vmetric.yml service settings that accompany these files, see Service Configuration.

Standalone Director

Minimal configuration for a single Director instance. The node name must match the director.id from vmetric.yml.

environments:
- name: "1"
status: true
nodes:
- name: "1"
status: true

Clustered Director

Clustered configurations define a cluster with multiple nodes for high availability. See Clusters for operational details.

cluster: "{cluster-id}"
environments:
- name: "{cluster-id}"
description: "Production Cluster"
status: true
clusters:
- name: "{cluster-id}"
description: "Primary Cluster"
status: true
type: director
properties:
address: "10.0.0.1"
port: 6222
authentication:
username: ""
password: ""
token: ""
tls:
status: false
cert_name: "cert.pem"
key_name: "key.pem"
ca_name: ""
verify: false
nodes:
- name: "{node-1-id}"
status: true
properties:
address: "10.0.0.1"
port: 4222
cluster:
address: "10.0.0.1"
port: 6222
authentication:
token: ""
tls:
status: false

ACL

ACL rules can be applied at the cluster or node level within environment files.

FieldYAML PathTypeDefaultDescription
Allowed IPsacl.allowed_ips[]string--IP allowlist (individual IPs, ranges "ip1 - ip2", or CIDR notation)
Access Tokensacl.allowed_tokens[]string--Valid access tokens for API authentication
Rate Limit Maxacl.rate_limit_max_requestsint100Maximum requests per rate limit window
Rate Limit Windowacl.rate_limit_windowint60Rate limit window in seconds
Update Intervalacl.update_intervalint20ACL configuration refresh interval in seconds

TLS

TLS settings for inter-node and cluster communication.

FieldYAML PathTypeDefaultDescription
Statustls.statusboolfalseEnable TLS
Cert Nametls.cert_namestringcert.pemTLS certificate filename
Key Nametls.key_namestringkey.pemTLS key filename
CA Nametls.ca_namestring--CA certificate filename
Verifytls.verifyboolfalseEnable certificate verification

Node Properties

FieldYAML PathTypeDefaultDescription
Addressproperties.addressstring--Node bind address
Portproperties.portint4222Node NATS port
Cluster Addressproperties.cluster.addressstring--Cluster communication address
Cluster Portproperties.cluster.portint6222Cluster communication port

VIP (Virtual IP) Configuration

VIP enables high-availability failover for clustered Directors. Configured within cluster properties in the environment file.

FieldYAML PathTypeDefaultDescription
Use VIPvip.use_vipboolfalseEnable VIP management
Bind VIPvip.bind_vipboolfalseBind VIP on startup
VIP Addressvip.vip_addressstring--Virtual IP address
VIP Netmaskvip.vip_netmaskstring--VIP subnet mask
VIP Gatewayvip.vip_gatewaystring--VIP gateway address
VIP Interfacevip.vip_interfacestring--Network interface for VIP
VIP Monitor Intervalvip.vip_monitor_intervalint--Health check interval in seconds
Is NATS Clustervip.is_nats_clusterboolfalseWhether this is a NATS cluster (affects VIP binding logic)