From 2a110d7abad3f28601930c48dc3929497e9d752d Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 23 Aug 2024 20:44:29 -0500 Subject: [PATCH] hosts: Deploy haproxy0 _haproxy0.pyrocufflink.blue_ is a Fedora Linux VM that runs HAProxy to provide reverse proxy, exposing web sites and applications to the Internet. It has a static MAC address because it will need a static IP address, at least initially, in order for DNAT to work. --- deploy/haproxy0.sh | 28 ++++++++++++++++++++++++++++ hosts | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 deploy/haproxy0.sh diff --git a/deploy/haproxy0.sh b/deploy/haproxy0.sh new file mode 100644 index 0000000..038aaca --- /dev/null +++ b/deploy/haproxy0.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# vim: set ts=4 : + +if ! virsh list --all --name | grep -qF haproxy0; then + ./newvm.sh haproxy0 \ + --fedora 40 \ + --memory 2048 \ + --vcpus 2 \ + --network network=prod,mac=52:54:00:69:e9:a7 \ + --no-console \ + -- \ + || exit + sleep 15 +fi + +ANSIBLE_HOST_KEY_CHECKING=false \ +ansible-playbook \ + -l haproxy0.pyrocufflink.blue \ + wait-for-host.yml \ + bootstrap.yml \ + pyrocufflink.yml \ + collectd.yml \ + promtail.yml \ + dch-proxy.yml \ + -u root \ + -e ansible_host=haproxy0.local \ + -e @join.creds \ + || exit diff --git a/hosts b/hosts index 3606a66..1c0f809 100644 --- a/hosts +++ b/hosts @@ -34,6 +34,7 @@ vm-hosts nvr2.pyrocufflink.blue [dch-proxy] +haproxy0.pyrocufflink.blue [dch-vpn] @@ -130,6 +131,7 @@ dc-grumbly.pyrocufflink.blue dc-headphone.pyrocufflink.blue file0.pyrocufflink.blue git0.pyrocufflink.blue +haproxy0.pyrocufflink.blue k8s-ctrl0.pyrocufflink.blue matrix0.pyrocufflink.blue nvr2.pyrocufflink.blue