Commit Graph

468 Commits (4aa3cdddd960fa76387b55a95780ff70f77103d1)

Author SHA1 Message Date
Dustin f250e00a17 roles/named: Provide default for named_keys
For hosts that do not have any TSIG keys, the `named_keys` variable
still must be defined (to an empty iterable) in order for the template
to expand properly.
2018-08-12 18:06:14 -05:00
Dustin 59dbe232e3 dch-network: Update DNS servers
All networks should now be using *dns0.pyrocufflink.blue* (4) and
*dns1.pyrocufflink.blue* (3) as the recursive DNS servers.
2018-08-12 17:30:14 -05:00
Dustin 07a23267c6 hosts: Add dns1.pyrocufflink.blue
To avoid having a single point of failure, a second recursive DNS server
is necessary. This will be useful in cases where the VM hosts must both
be taken offline, but Internet access is still required.

The new server, *dns1.pyrocufflink.blue*, has all the same zones defined
as the original. It forwards the *pyrocufflink.blue* zone and
corresponding reverse zones to the domain controllers, and acts as a
slave for the *pyrocufflink.red* zone.
2018-08-12 17:24:37 -05:00
Dustin d36e0d5a0a pyrocufflink-dns: Split named_zones definition
In order to support adding a second DNS server, the BIND zone
configuration needs to be partially modularized. While the forwarder
definitions for *pyrocufflink.blue*, etc. will remain the same, the
*pyrocufflink.red* zone will be different, as it will be a slave zone on
the second server. This commit breaks up the definition of the
`named_zones` variable into two parts:

* `pyrocufflink_red_zones`: This is a list of zone objects for
  *pyrocufflink.red* and its corresponding reverse zone. On
  *dns1.pyrocufflink.blue*, these are master zones. On the new server,
  these will be slaves.
* `pyrocufflink_common_zones`: This is a list of zone objects for the
  zones that are the same on both servers, since they are all forwarding
  zones.

Similarly, the `named_keys` variable only needs to be defined on the
master, since DHCP will only send updates there.
2018-08-12 17:23:34 -05:00
Dustin 26f3637bfa hosts: Add proxy0.pyrocufflink.blue
As its name suggests, *proxy0.pyrocufflink.blue* acts as an HTTP proxy
server running Squid.
2018-08-12 16:00:53 -05:00
Dustin b86ecb99fd squid: Add role and PB to deploy Squid 2018-08-12 16:00:32 -05:00
Dustin 00b04179b1 hosts: Remove smtp0.p.b
Now that the SMTP relay has been moved to *smtp1.pyrocufflink.blue*,
*smtp0* is no longer needed.
2018-08-12 15:23:08 -05:00
Dustin 72b148bd0e hosts: Add smtp1.p.b
*smtp1.pyrocufflink.blue* is a VM that will replace
*smtp0.pyrocufflink.blue*, a Raspberry Pi.

I decided that there is little use in having the availability guarantee of
a discreet machine for the SMTP relay. The only system that would NEED
to send mail if the VM host fails is Zabbix, which operates as its own
relay anyway. As such, the main relay can be a VM, and the Raspberry Pi
can be repurposed as a recursive DNS server.
2018-08-12 15:22:31 -05:00
Dustin 76b7db421c dch-network: Forward syncthing port to file0
*file0.pyrocufflink.blue* hosts syncthing. Forwarding the transport is
not strictly required, as syncthing can use relays to encapsulate
traffic in HTTPS, but allowing direct access improves performance.
2018-08-12 15:22:30 -05:00
Dustin 0b972da789 ci: Add pipeline for Koji 2018-08-12 10:27:20 -05:00
Dustin 18ed14f376 Add SSH host keys for burp0.p.b 2018-08-12 10:27:20 -05:00
Dustin 4e8bd8995b hosts: Add koji0.pyrocufflink.blue
*koji0.pyrocufflink.blue* hosts the Koji ecosystem, including a builder.
2018-08-12 10:27:20 -05:00
Dustin f9cba30582 koji: Add playbooks for Koji
The `koji.yml` playbook can be used to deploy an entire Koji ecosystem.
It is composed of three smaller playbooks:

* `koji-hub.yml`: Deploys the Koji hub, GC, and Kojira
* `koji-web.yml`: Deploys the Koji Web GUI
* `koji-builder.yml`: Deploys the Koji builder
2018-08-12 10:14:25 -05:00
Dustin a0dd911a63 roles/koji-builder: Deploy the Koji builder
The *koji-builder* role installs and configures the Koji builder
(*kojid*). It supports configuring an HTTP proxy, if required.
2018-08-12 10:14:25 -05:00
Dustin da4ec1612c roles/koji-web: Deploy the Koji Web UI
The *koji-web* role installs and configures the Koji Web GUI front-end
for Koji. It requires Apache and mod_wsgi. A client certificate is
required for authentication to the hub, and must be placed in the
host-specific subdirectory of `certs/koji`.
2018-08-12 10:08:01 -05:00
Dustin 6341d972f6 roles/koji-client: Configure the koji client
The *koji-client* role is a generic role that can be used to configure
the Koji client library/`koji` CLI tool. By default, it manages the
default configuration at `/etc/koji`, but by using the
`koji_client_dir`, `koji_client_user`, and `koji_client_id` variables,
it can be used to configure per-user client configuration as well.
2018-08-12 10:05:56 -05:00
Dustin aed2776e27 roles/kojira: Deploy the Koji repository agent
The *kojira* role sets up the Koji repository agent to manage
repository metadata for build tags. It runs as a daemon, usually on the
same machine as the Koji hub. A client certificate is required for
authentication, and must be supplied by placing it in the
`certs/koji/{{ inventory_hostname }}` directory.
2018-08-12 10:04:23 -05:00
Dustin 1a8d7ce29a roles/koji-gc: Deploy the Koji garbage collector
The *koji-gc* role sets up the Koji garbage collector utility to run
periodically. It uses cron for scheduling. A client certificate is
required for authentication, and must be supplied by placing it in the
`certs/koji/{{ inventory_hostname }}` directory.
2018-08-12 09:58:56 -05:00
Dustin 760d3f4aec roles/koji-hub: Deploy the Koji Hub
The *koji-hub* role installs and configures the Koji Hub. It requires
Apache and mod_wsgi. Management of client certificates must be done
externally.
2018-08-12 09:33:08 -05:00
Dustin 943cdddc23 dch-gw: dhcpd: Update unifi0 MAC address
The UniFi controller has been moved to a different Raspberry Pi device.
2018-08-12 09:18:42 -05:00
Dustin 997951d59e hosts: Add file0.p.b to burp-client
Adding *file0.pyrocufflink.blue* to enable automatic backups. The
`/home` and `/srv/cifs/Downloads` paths are backed up.
2018-08-08 22:07:32 -05:00
Dustin a810e9c691 roles/cronie: Install cronie
The minimal Fedora installation does not include a cron implementation.
The *cronie* role can be applied to hosts installed in this way to
ensure that cron is available for task scheduling.
2018-08-08 21:38:56 -05:00
Dustin 47999302cf roles/dch-vpn-server: Update remote access DNS
This commit updates the DNS server addresses pushed to remote access VPN
clients to use the new DNS server on the *pyrocufflink.blue* network.
2018-08-08 21:37:30 -05:00
Dustin 06b2d3163b hosts: Add burp0.p.b
The machine *burp0.pyrocufflink.blue* runs a BURP server.
2018-08-08 20:14:40 -05:00
Dustin 7ebc2bdfa2 burp-{client,server}: PBs to deploy BURP
The `burp-client.yml` and `burp-server.yml` playbooks apply the
*burp-client* and *burp-server* roles to BURP clients and servers,
respectively. The server playbook also applies the *postfix* role to
ensure that SMTP is configured and backup notifications can be sent.
2018-08-08 20:14:25 -05:00
Dustin b7fafa6734 roles/burp-client: Deploy BURP client
The *burp-client* role installs and configures a BURP client. It should
support RHEL/CentOS/Fedora and Gentoo.

To manage the client password and other server-mandated configuration,
the role uses Ansible's delegation feature to generate a configuration
file in the "clientconfdir" on the BURP server.

An hourly cron task is scheduled that runs `burp -a t` every hour. This
allows the server to configure backup timebands and intervals.
2018-08-08 20:11:46 -05:00
Dustin ddd7031624 roles/burp-server: Deploy BURP server
The *burp-server* role installs and configures a BURP server. It is
adapted from a previous iteration, and should support CentOS/RHEL/Fedora
and Gentoo, as well as both BURP 1.x and 2.x (depending on which version
gets installed by the system package manager).

To manage the certificate authority, the *burp-server* role uses the
`burp_ca` command. This has the advantage of not requiring any external
certificate management, but effectively binds the CA to a specific
machine.
2018-08-08 20:08:16 -05:00
Dustin 241f9d6afa all: Set SMTP relay
All machines (except the relay itself of course) should use the
*mail.pyrocufflink.blue* SMTP relay to send email.
2018-08-07 20:04:09 -05:00
Dustin 0a975ae4af roles/postfix: Vary shlib directory by arch
The value of the `shlib_directory` is dependent the system architecture.
Specifically, x86_64 machines use `/usr/lib64/postfix`, while everything
else uses `/usr/lib/postfix`. This role was originally deployed on a
Raspberry Pi, so the original path was correct. Attempting to deploy it
on an x86_64 machine revealed the error.

This commit adds a new task that loads a variables file based on the
architecture. Each option defines an `arch_libdir` variable, which can
be expanded in the `postfix_shlib_directory` variable as needed.
2018-08-07 19:51:09 -05:00
Dustin ee6523faf6 pyrocufflink-dns: Correct IPv6 reverse zones
The zone names and forwarder addresses for IPv6 reverse lookups were
incorrect. This caused long timeouts when resolving IPv6 addresses, e.g.
for SSH.
2018-08-07 18:46:43 -05:00
Dustin 171edd72d9 hosts: Move vmhost1.p.b to hosts.offline
Because *vmhost1.pyrocufflink.blue* is usually sleeping, continuous
enforcement jobs always fail. By keeping it in a separate inventory
file, configuration policy can still be applied to it manually, but it
will be ignored by continuous enforcement.
2018-08-04 11:31:40 -05:00
Dustin b415c0403e dch-gw: Forward port 22 to file0 2018-08-03 00:27:44 -05:00
Dustin 4d45d727cb roles/dch-proxy: Remove backend myala
*myala.pyrocufflink.jazz* no longer hosts any public-facing websites,
and is in fact shut down. To prevent HAproxy from failing to start
because it cannot resolve the name, this backend needs to be removed.
2018-08-03 00:27:32 -05:00
Dustin cff7789862 dch-gw: Add DHCP lease for file0.p.b
It is necessary for the file server to have a static address in order
for port forwarding for SSH to work.
2018-08-02 20:42:33 -05:00
Dustin a58b0f6523 Add SSH host key for web0 2018-08-01 22:29:40 -05:00
Dustin 507eec6565 ci: dch-gw: Limit dhcpcd PB to dch-gw
To avoid applying configuration to hosts besides the gateway, the
`dhcpcd.yml` playbook needs to be limited.
2018-08-01 22:13:53 -05:00
Dustin b4bcb12750 Add SSH host keys for vmhost0, vmhost1 2018-08-01 22:11:40 -05:00
Dustin 69a7e869b4 hosts: Add file0.p.b 2018-08-01 22:11:40 -05:00
Dustin 155cb091f4 fileserver: PB to deploy fileserver role 2018-08-01 22:08:24 -05:00
Dustin 4aded1e75c pyrocufflink: Ensure Samba security is correct
Usually, the *samba* role is deployed as a dependency of the *winbind*
role, which explicitly sets `samba_security` to `ads`. The new
*fileserver* role also depends on the *samba* role, but it does NOT sett
that variable. This can cause `smb.conf` to be rewritten with a
different value whenever one or the other role is applied.

Explicitly setting the `samba_security` variable at the group level
ensures that the value is consistent no matter how the *samba* role is
applied. Since all domain member machines need the same value,
regardless of what function they perform, this is safe.
2018-08-01 22:05:18 -05:00
Dustin 84a5d66b7a roles/fileserver: Deploy Samba file server
The *fileserver* role configures Samba as a file sharing server. It uses
the *samba* role to handle cross-distribution installation of Samba
itself, and is focused primarily on configuring shared folders.
2018-08-01 22:04:07 -05:00
Dustin f078522d97 roles/vmhost: Open libvirt migration firewall port 2018-07-29 10:39:36 -05:00
Dustin da79e8482c vmhost1: Update net-ifaces script 2018-07-29 10:39:12 -05:00
Dustin a95937d111 roles/dch-storage-net: Add After device dependency
This commit adds an *after* ordering dependency on the network device
unit to the *wait-global-address@.service* template unit. Without this
dependency, the service will wait forever for a global address if the
device does not exist. With the dependency, though, if the device does
not appear within the default timeout, the wait service will never
start, causing all dependent services to fail, but allowing the boot
process to continue.
2018-07-29 10:14:00 -05:00
Dustin 131c872d32 Merge remote-tracking branch 'refs/remotes/origin/master' 2018-07-29 10:02:28 -05:00
Dustin 9bf2a911c6 roles/dch-proxy: Switch default backend to web0.p.b
The public-facing websites are now hosted by *web0.pyrocufflink.blue*
and *myala.pyrocufflink.jazz* has been decommissioned.
2018-07-29 09:41:10 -05:00
Dustin 67fc5c8c05 hosts: Add web0.p.b
*web0.pyrocufflink.blue* hosts the public-facing websites
2018-07-29 09:39:02 -05:00
Dustin 2d8418c7a7 websites: PB to deploy public-facing websites 2018-07-29 09:37:47 -05:00
Dustin 33ee3bf08d websites: Add role for darkchestofwonders.us
The *websites/darkchestofwonders.us* role prepares a machine to host
http://darkchestofwonders.us/. The website itself is published via rsync
by Jenkins.
2018-07-29 09:34:41 -05:00
Dustin 1f16b4c3e4 websites: Add role for nratonpass.com
The *websites/nratonpass.com* role prepares a machine to host
http://nratonpass.com/. The website itself is published via rsync by
Jenkins.
2018-07-29 09:34:21 -05:00