Gebruikershulpmiddelen

Site-hulpmiddelen


installatie_handleidingen:mikrotik:ha-proxy

Verschillen

Dit geeft de verschillen weer tussen de geselecteerde revisie en de huidige revisie van de pagina.

Link naar deze vergelijking

Beide kanten vorige revisie Vorige revisie
Volgende revisie
Vorige revisie
installatie_handleidingen:mikrotik:ha-proxy [2025/09/21 13:04]
abel [network connections]
installatie_handleidingen:mikrotik:ha-proxy [2025/09/21 17:12] (huidige)
abel [Persistent volumes location]
Regel 9: Regel 9:
 follow the instructions to create a [[installatie_handleidingen:mikrotik:virtual-container-network|virtual network interface]] with IP and connection to the desired VLAN. follow the instructions to create a [[installatie_handleidingen:mikrotik:virtual-container-network|virtual network interface]] with IP and connection to the desired VLAN.
  
 +===== Persistent volumes location =====
 +For the persistent volume of the container we create a directory
 +<code>
 +/file 
 +add type=directory name=/usb1/persistent-volumes/haproxy/config-dir
 +
 +</code>
 +
 +===== configuration file =====
 +Start by creating the config file on your workstation, ''vi haproxy.cfg'', add the following content for a test to the website at 10.100.10.103
 +
 +<code>
 +global
 +    daemon
 +    maxconn 256
 +
 +defaults
 +    mode http
 +    timeout connect 5s
 +    timeout client  50s
 +    timeout server  50s
 +
 +frontend http_in
 +    bind *:80
 +    default_backend web_servers
 +
 +backend web_servers
 +    balance roundrobin
 +    server srv1 10.100.10.103:80 check
 +</code>
 +
 +upload this config file to the preveously crated location.
 +<code>
 +scp haproxy.cfg styx:/usb1/persistent-volumes/haproxy/config-dir
 +</code>
 +
 +===== set container mount =====
 +Now set the volume with the config file as a persistent volume mount in the container:
 +<code>
 +/container/mounts
 +add name=HAPROXY_CONF dst=/usr/local/etc/haproxy src=/usb1/persistent-volumes/haproxy/config-dir
 +</code>
 +
 +===== deploy the container =====
 +<code>
 +/container
 +add remote-image=library/haproxy:latest interface=veth-haproxy root-dir=usb1/persistent-volumes/haproxy/root-dir mounts=HAPROXY_CONF name=haproxy
 +</code>
 +
 +zoek het nummer van de containerdefinitie op: ''/container/print''
 +en start dat nummer (in ons geval 0)
 +<code>
 +/container
 +start number=0
 +</code>
  
  
installatie_handleidingen/mikrotik/ha-proxy.1758452664.txt.gz ยท Laatst gewijzigd: 2025/09/21 13:04 door abel