HAProxy route endpoints¶
The Landscape Server charm exposes six HTTP route endpoints using the haproxy-route interface and two optional TCP/gRPC route endpoints using haproxy-route-tcp. Integrate the HTTP endpoints with the HAProxy charm (2.8/stable). The TCP/gRPC endpoints are needed only when the corresponding optional service is enabled.
Relation endpoints¶
Endpoint |
Service |
URL paths |
Protocol |
Default backend port(s) |
|---|---|---|---|---|
|
Landscape app server |
|
HTTP |
|
|
Ping server |
|
HTTP |
|
|
Message server |
|
HTTP |
|
|
REST API |
|
HTTP |
|
|
Package upload |
|
HTTP |
|
|
Repository mirror |
|
HTTP |
|
|
Host agent gRPC messenger |
(gRPC) |
gRPC |
|
|
Ubuntu Installer Attach |
(gRPC) |
gRPC |
|
Backend ports are configurable via the charm config options shown above (e.g. juju config landscape-server appserver_base_port=8080). For multi-worker services (appserver, pingserver, message-server, api), the charm allocates one port per worker starting at the base port — e.g., with worker_counts=2 and appserver_base_port=8080, ports 8080 and 8081 are used. Metrics paths (e.g. /ping/metrics, /api/metrics) are denied on all endpoints.
Integration¶
Integrate the six HTTP endpoints with the HAProxy charm:
juju integrate landscape-server:appserver-haproxy-route haproxy:haproxy-route
juju integrate landscape-server:pingserver-haproxy-route haproxy:haproxy-route
juju integrate landscape-server:message-server-haproxy-route haproxy:haproxy-route
juju integrate landscape-server:api-haproxy-route haproxy:haproxy-route
juju integrate landscape-server:package-upload-haproxy-route haproxy:haproxy-route
juju integrate landscape-server:repository-haproxy-route haproxy:haproxy-route
The Hostagent Messenger and Ubuntu Installer Attach services are optional and disabled by default. If you enable either service, integrate its TCP/gRPC endpoint with HAProxy’s haproxy-route-tcp endpoint:
juju integrate landscape-server:hostagent-messenger-haproxy-route haproxy:haproxy-route-tcp
juju integrate landscape-server:ubuntu-installer-attach-haproxy-route haproxy:haproxy-route-tcp
HTTP redirect behaviour and redirect_https¶
The redirect_https charm configuration option controls whether HTTP traffic is redirected to HTTPS:
|
|
|
|---|---|---|
|
HTTP redirected to HTTPS |
HTTP allowed |
|
HTTP allowed |
HTTP allowed |
|
HTTP redirected to HTTPS |
HTTP redirected to HTTPS |
pingserver and repository always allow plain HTTP under default and none because Landscape Clients and mirrors use HTTP for those paths.
External gRPC ports¶
Endpoint |
External port |
|---|---|
|
|
|
|