Commit Graph

79 Commits (0f73b09e09625cefb3c1f74723e0430fc4bf248d)

Author SHA1 Message Date
Dustin 0f73b09e09 hosts: Add hassdb0.p.b
*hassdb0.pyrocufflink.blue* hosts the PostgreSQL database for Home
Assistant.
2020-07-14 11:38:44 -05:00
Dustin f1b4598601 roles/hassdb: Deploy Home Assistant database
Normally, Home Assistant uses a SQLite database for storing state
history.  On a Raspberry Pi with only an SD card for storage like
*hass1.pyrocufflink.blue*, this can become extremely slow, especially
for large data sets.  To speed up features like history and logbook,
Home Assistant supports using an external database engine such as
PostgreSQL or MariaDB.

The *hassdb* role and corresponding `hassdb.yml` playbook deploys a
PostgreSQL server for Home Assistant to use.  It needs only to create
the role and database, as Home Assistant manages its own schema.
2020-07-14 11:38:30 -05:00
Dustin 3dcc0aeacd hosts: Add ARM builders to *jenkins-slave* group
The *build1-aarch64.pyrocufflink.blue* and
*build2-armv7hl.pyrocufflink.blue* machines are now configured as
Jenkins nodes.
2020-07-04 14:35:26 -05:00
Dustin 7a4b46b455 Merge branch 'hass1' 2020-07-04 14:26:13 -05:00
Dustin 0a3ff65a8c hosts: Add hass1.p.b
*hass1.pyrocufflink.blue* is the new host for Home Assistant.  I
migrated from using a virtual machine to using a Raspberry Pi to avoid
having to deal with USB passthrough for the Z-Wave USB stick.
2020-07-04 13:49:08 -05:00
Dustin 3addbc8ea7 hosts: remove hass0.p.b 2020-05-10 16:30:04 -05:00
Dustin a828bbe56b hosts: remove proxy0.p.b 2020-05-10 16:20:13 -05:00
Dustin 1d0786f46b hosts: Add build2-armv7hl.p.b
*build2-armv7hl.pyrocufflink.blue* is a Raspberry Pi 3 running Fedora
ARM.  It will be used to build software and OS images for other ARM
machines.
2020-03-21 12:42:27 -05:00
Dustin d1a8c1db84 hosts: Add build1-aarch64.p.b
*build1-aarch64* is a Raspberry Pi 3 B+ running Fedora aarch64.  It is
intended to be used to build software and operating system images for
other aarch64 machines.
2020-03-21 12:42:27 -05:00
Dustin 66c9581d7b hosts: Decommission rprx0.p.b
*rprx0.pyrocufflink.blue* is no longer in operation.
*web0.pyrocufflink.blue* handles incoming HTTP/HTTPS requests directly,
proxying to Bitwarden, OpenVPN, etc. as needed.
2020-03-17 08:45:34 -05:00
Dustin 4c661478b2 hosts: bw0: Use Lego cert 2020-03-17 08:45:34 -05:00
Dustin 0694594445 websites/pyrocufflink.net: Use lego certificate
This commit updates the configuration for *pyrocufflink.net* to use the
wildcard certificate managed by *lego* instead of an unique certificate
managed by *certbot*.
2020-03-16 14:16:34 -05:00
Dustin b09bf84a3b nextcloud: Deploy Nextcloud w/ Apache+PHP-FPM
The *nextcloud* role installs Nextcloud from the specified release
archive, downloading it to the control machine first if necessary, and
configures Apache and PHP-FPM to serve it.

The `nextcloud.yml` playbook uses the *cert* role to install the X.509
certificate for the Nextcloud server, sets up Apache HTTPD with the
*apache* role, and installs Nextcloud using the *nextcloud* role.

The host *cloud0.pyrocufflink.blue* is the Nextcloud server for
Pyrocufflink.
2020-03-09 20:18:07 -05:00
Dustin cd1cf38774 hosts: git0: Switch to Lego wildcard cert 2020-02-22 16:43:46 -06:00
Dustin 7543815e9b hosts: Add burp1.p.b
*burp1.pyrocufflink.blue* will replace *burp0.pyrocufflink.blue* as the
BURP server for Pyrocufflink.  It is a physical machine (Fitlet), making
it simpler to manage the USB drives.  The old virtual machine will be
decommissioned soon.
2020-01-25 13:57:04 -06:00
Dustin b2cc467581 hosts: Add build0-amd64
*build0-amd64.securepassage.com* is a Jenkins agent that runs Docker,
allowing pipeline jobs to run inside containers.
2019-09-19 19:50:35 -05:00
Dustin 43deb1f89e hosts: Remove references to zabbix-server
Having an empty (therefore undefined) group as the child of another
group causes Ansible to emit a "warning" (really an error) indicating
that it cannot parse the inventory file:

    [WARNING]:  * Failed to parse
    /var/lib/jenkins/workspace/CfgMgmt/pyrocufflink/hosts with ini plugin:
    /var/lib/jenkins/workspace/CfgMgmt/pyrocufflink/hosts:60: Section
    [smtp- relay:children] includes undefined group: zabbix-server
2019-09-19 19:50:35 -05:00
Dustin 6e57abfe2e bitwarden_rs: Configure BURP client
This commit configures *bw0.pyrocufflink.blue* as a BURP client, so that
the Bitwarden data can be backed up.  A pre-backup script is used to
take a consistent snapshot of the SQLite database before copying it to
the BURP server.
2019-09-19 19:27:30 -05:00
Dustin 9306252e75 hosts: Add bw0.p.b
*bw0.pyrocufflink.blue* runs Bitwarden_rs via Docker.
2019-09-19 19:27:30 -05:00
Dustin 14cb924ba7 bitwarden_rs: Deploy Bitwarden_rs using Docker
The *bitwarden_rs* role sets up the Bitwarden_rs server using its
official Docker container.  It sets up Apache as a reverse proxy for TLS
support.
2019-09-19 19:27:29 -05:00
Dustin 1f535e980f roles/docker: Install and set up Docker daemon
The *docker* role configures the Docker daemon on the managed machine.
2019-09-19 19:27:12 -05:00
Dustin e7ad80d173 hosts: Remove Zabbix
At this point, it's unlikely that I will ever fix the Zabbix server.
Let's remove it from the inventory so the CI jobs will stop failing.
2019-08-23 08:51:04 -05:00
Dustin 9bce245f05 hosts: Remove cm0.p.b
*cm0.pyrocufflink.blue* has been deprecated and shut down.
Configuration Management jobs now run on regular Jenkins nodes, and are
serialized using "lockable resources" instead of a single executor.
2019-05-08 10:49:59 -05:00
Dustin d6a5439057 hosts: Decommission dns1.p.b
*dns1.pyrocufflink.blue* has been decommissioned.  Having a second DNS
server never really worked correctly for some reason, and the
maintenance overhead of the Raspberry Pi is just not worth it right now.
The DHCP service has been moved to *dns0.pyrocufflink.blue*.
2019-05-02 10:29:43 -05:00
Dustin c8d6bae093 wheelhost: Publish wheels built by Jenkins
The point of the "wheel host" is to serve as a repository of Python
packages (wheels) built by Jenkins for consumption by `pip` et al. For
applications and libraries that do not provide all of their dependencies
as binary packages, this makes a convenient way to install them without
requiring all of the build tools and dependencies on the destination
machine.

The idea here is that a Jenkins job runs `pip wheel` for a distribution
package name or `requirements.txt` file and then uploads the resulting
wheel files using `rsync`. Apache is configured to serve the upload
directory with an index compatible with `pip`'s `--find-links`.
2019-03-22 10:19:27 -05:00
Dustin 1a62a780ca hosts: Add taiga0.pyrocufflink.blue 2019-03-22 09:29:56 -05:00
Dustin 7211028f4d hosts: Add hass0.pyrocufflink.blue
*hass0.pyrocufflink.blue* is a virtual machine that runs Home Assistant.
It is dual-homed on the *pyrocufflink.blue* network and the isolated IoT
network.
2019-03-05 18:31:42 -06:00
Dustin 5571ee704b hosts: Remove dc1.pyrocufflink.blue
*dc1.pyrocufflink.blue* has been decommissioned after the failed Samba
update.
2019-02-16 10:11:59 -06:00
Dustin 50396c88d4 hosts: Mark vmhost0 offline
*vmhost0.pyrocufflink.blue* is currently offline for maintenance. To
avoid the unending stream of failed continuous enforcement Jenkins jobs,
it has been removed from the main inventory file and moved to "offline"
inventory.
2018-11-13 23:54:45 -06:00
Dustin 9be2c2ac92 hosts: Remove gw0
Now that the USG is fully operational, *gw0* has been decommissioned.
2018-10-13 12:05:40 -05:00
Dustin a1ca06a3c5 Move VPN server to dedicated VM
The VPN capability of the UniFi Security Gateway is extremely limited.
It does not support road-warrior IPsec/IKEv2 configuration, and its
OpenVPN configuration is inflexible. As with DHCP, the best solution is
to simply move service to another machine.

To that end, I created a new VM, *vpn0.pyrocufflink.blue*, to host both
strongSwan and OpenVPN. For this to work, the necessary TCP/UDP ports
need to be forwarded, of course, and all of the remote subnets need
static routes on the gateway, specifying this machine as the next hop.
Additionally, ICMP redirects need to be disabled, to prevent confusing
the routing tables of devices on the same subnet as the VPN gateway.
2018-10-07 21:42:18 -05:00
Dustin 9f32f94780 Move DHCP service to dns1.p.b
The DHCP server on the UniFi Security Gateway is pretty limited; it
cannot manage static leases (reservations), and does not offer any way
to build dynamic values for e.g. hostname or boot filename. Rather than
give up these features, I decided to just move the DHCP server to one of
the Raspberry Pis; the DNS server made the most sense.

To facilitate this move, I created the *pyrocufflink-dhcp* host group,
and moved the DHCP configuration variables there. Thus, it was a simple
matter of adding *dns1.pyrocufflink.blue* to this group to relocate the
service.

Of course, to serve clients on the other subnets, the gateway needs to
have DHCP relay enabled and pointing to the new server.
2018-10-07 21:42:18 -05:00
Dustin 88dd80e6fd aria2: Deploy aria2 download manager
The *aria2* role installs the *aria2* download manager and sets it up to
run as a system service with RPC enabled. It also sets up the web UI,
though that must be installed manually from an archive, for now.
2018-08-19 14:17:48 -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 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 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 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 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 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 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 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 11dc40bc76 hosts: Add vmhost{0,1}.p.b 2018-07-23 17:35:10 -05:00
Dustin a8dd2e9ec3 vmhost: PB to set up VM hosts 2018-07-23 17:35:10 -05:00