diff --git a/zato/hooks/init b/zato/hooks/init index 2937600..1123a45 100755 --- a/zato/hooks/init +++ b/zato/hooks/init @@ -32,6 +32,7 @@ init-config-add " $SERVICE_NAME: environment: Zato_Log_Env_Details: \"True\" + Zato_Dashboard_Debug_Enabled: \"True\" Zato_SSH_Password: \"$ssh_password\" Zato_Dashboard_Password: \"$dashboard_password\" Zato_IDE_Password: \"$ide_password\" diff --git a/zato/metadata.yml b/zato/metadata.yml index 4296f31..f801ddb 100644 --- a/zato/metadata.yml +++ b/zato/metadata.yml @@ -2,12 +2,20 @@ docker-image: ghcr.io/zatosource/zato-3.2-quickstart:latest docker-compose: ports: - "22022:22" - - "8183:8183" - - "17010:17010" + #- "8183:8183" + - "21223:21223" -data-resources: +data-resources: ## /srv/datastore/data/$SERVICE_NAME/ - /opt/hot-deploy/ +charm-resources: ## $CHARM_STORE/resources/ + - /opt/zato/env/qs-1/load-balancer/config/repo/zato.config + +requires: + web-publishing-directory: + interface: publish-dir + scope: container + uses: web-proxy: #constraint: required | recommended | optional diff --git a/zato/resources/opt/zato/env/qs-1/load-balancer/config/repo/zato.config b/zato/resources/opt/zato/env/qs-1/load-balancer/config/repo/zato.config new file mode 100644 index 0000000..9aca153 --- /dev/null +++ b/zato/resources/opt/zato/env/qs-1/load-balancer/config/repo/zato.config @@ -0,0 +1,68 @@ + +# ############################################################################## + +global + log 127.0.0.1:514 local0 debug # ZATO global:log + stats socket /opt/zato/env/qs-1/load-balancer/haproxy-stat.sock # ZATO global:stats_socket + +# ############################################################################## + +defaults + log global + option httpclose + + stats uri /zato-lb-stats # ZATO defaults:stats uri + + timeout connect 15000 # ZATO defaults:timeout connect + timeout client 15000 # ZATO defaults:timeout client + timeout server 15000 # ZATO defaults:timeout server + + errorfile 503 /opt/zato/env/qs-1/load-balancer/config/repo/503.http + + stats enable + stats realm Haproxy\ Statistics + + # Note: The password below is a UUID4 written in plain-text. + stats auth admin1:8ecbddd3bebe474b93ae43b353a917ff + + stats refresh 5s + +# ############################################################################## + +backend bck_http_plain + mode http + balance roundrobin + +# ZATO begin backend bck_http_plain + + + server http_plain--server1 127.0.0.1:17010 check inter 2s rise 2 fall 2 # ZATO backend bck_http_plain:server--server1 + + +# ZATO end backend bck_http_plain + +# ############################################################################## + +frontend front_http_plain + + mode http + default_backend bck_http_plain + + option forwardfor + option httplog # ZATO frontend front_http_plain:option log-http-requests + bind 0.0.0.0:11223 # ZATO frontend front_http_plain:bind + maxconn 200 # ZATO frontend front_http_plain:maxconn + + monitor-uri /zato-lb-alive # ZATO frontend front_http_plain:monitor-uri + +frontend front_tls_no_client_certs + + mode http + default_backend bck_http_plain + option forwardfor + reqadd X-Forwarded-Proto:\ https + + acl has_x_forwarded_proto req.fhdr(X-Forwarded-Proto) -m found + http-request deny if has_x_forwarded_proto + + bind 0.0.0.0:21223 ssl crt /opt/hot-deploy/cert/letsencrypt-fullchain.pem