From 05333e5ccdb0389135206015e5a03f7c2ee7d021 Mon Sep 17 00:00:00 2001
From: Matt Birkholz
+| = _|||_ @@ -144,8 +144,8 @@ with Apache2, spooling email with Postfix and serving it with Dovecot-IMAPd, and hosting a VPN with OpenVPN. --3.1. Install Emacs
++3.1. Install Emacs
-The monks of the abbey are masters of the staff (bo) and Emacs. @@ -711,7 +711,7 @@ certificate is a terminal session affair (with prompts and lines entered as shown below).
-+$ sudo apt install python3-certbot-apache $ sudo certbot --apache -d birchwood-abbey.net ... @@ -930,8 +930,8 @@ with Postfix and Dovecot, and providing essential localnet services: NTP, DNS and DHCP.--4.1. Include Abbey Variables
++4.1. Include Abbey Variables
In this abbey specific document, most abbey particulars are not @@ -1127,8 +1127,8 @@ The abbey uses the Apt-Cacher:TNG package cache on Core. The
-4.8. Use Cloister Apt Cache
++4.8. Use Cloister Apt Cache
-Core itself will benefit from using the package cache, but should @@ -1938,8 +1938,8 @@ hosts never roam, are not associated with a member, and so are ./abbey client campus new-host-name
--6.1. Use Cloister Apt Cache
++6.1. Use Cloister Apt Cache
The Apt-Cacher:TNG program does not work well on the frontier, so is @@ -2061,8 +2061,8 @@ them.
-6.4. Install Emacs
++6.4. Install Emacs
The monks of the abbey are masters of the staff and Emacs. @@ -2111,7 +2111,15 @@ entities which were organized into an "Abbey" dashboard.
+The abbey uses AgentDVR to record video from PoE IP HD security -cameras. The "download" button on iSpy's Download page +cameras. It is installed and configured as described here. +
+++8.1. AgentDVR Installation
+++AgentDVR is installed at the abbey according to the iSpy web site's +latest(?) instructions. The "download" button on iSpy's Download page (https://www.ispyconnect.com/download), when "Agent DVR - Linux/ macOS/ RPi" is chosen, suggests the following command lines (the second of which is broken across three lines). @@ -2126,29 +2134,97 @@ bash <(curl -s "https://raw.githubusercontent.com/\<
-Ansible assists by creating the system user
+agentdvr
and granting it -enoughsudo
latitude to run the installer as instructed above. -Though a system user, the account gets a home directory, -/home/agentdvr/in which to do the installation. The rest of the -DVR role, "phase two", waits until AgentDVR is installed. +Before executing these commands, Ansible is enlisted to make certain +preparations. +++8.1.1. AgentDVR Installation Preparation
++++AgentDVR runs in the abbey as a system user,
+ +agentdvr
, which +installs and runs the service. Though a system user, the account gets +a home directory,/home/agentdvr/in which to install AgentDVR, and +a login shell,/bin/bash. This much Ansible can do in preparation. ++./abbey config dvrs ++ + ++After the
+agentdvr
account is created, it is temporarily authorized +to run a handful of system commands (asroot
!). This small set is +sufficient if the offer to create the system service is declined. +The following commands create this authorization in~/01agentdvr, +validate and install it in/etc/sudoers.d/01agentdvr. Such caution +is taken because a syntax error anywhere in/etc/sudoers.d/can make +thesudo
command inoperative, cutting off access to all elevated +privileges until a "rescue" (involving a reboot) is performed.++echo "ALL ALL=(agentdvr) NOPASSWD: /bin/systemctl,/bin/apt-get,\ + /sbin/adduser,/sbin/usermod" >~/01agentdvr +sudo chown root:root ~/01agentdvr +sudo chmod 440 ~/01agentdvr +visudo --check --owner --perms ~/01agentdvr +sudo mv ~/01agentdvr /etc/sudoers.d/ ++++8.1.2. AgentDVR Installation Execution
++++With the above preparations, the system administrator can get a shell +session under the
+ +agentdvr
account to run iSpy's installation script +in the empty/home/agentdvr/directory. +++ +sudo apt-get install curl +sudo -u agentdvr <(curl -s "https:.../install.sh") +
++The script creates the
+/home/agentdvr/AgentDVR/directory, and +offers to install a system service. The offer is declined. Instead, +Ansible is run again. ++8.1.3. AgentDVR Installation Completion
++-AgentDVR is installed, after Ansible has set things up, by running the -command lines prescribed by iSpy while logged in as
+agentdvr
with -the current default directory/home/agentdvr/. The installer should -create the/home/agentdvr/AgentDVR/directory. Its offer to install -a system service is declined. +When Ansible is run a second time, after the installation script, it +sees the new/home/agentdvr/AgentDVR/directory and creates (and +starts) the new system service.+./abbey config dvrs ++ +-After AgentDVR is installed, when the
+ +/home/agentdvr/AgentDVR/-directory exists, Ansible is run again to install the system service. +Also after the installation, the system administrator revokes the +agentdvr
account's authorizations to modify packages and accounts.+sudo rm /etc/sudoers.d/01agentdvr ++--8.1. Create User
-agentdvr
+8.2. Create User
+agentdvr
AgentDVR runs as the system user
@@ -2184,28 +2260,6 @@ AgentDVR runs as the system useragentdvr
, which is created here.agentdvr
, which is created here.-8.2. Authorize User
-agentdvr
---The AgentDVR installer is also run by
- -agentdvr
, which is authorized -to run a handful of system commands. This small set is sufficient -if the offer to create the system service is declined. In that -case, the installer will run the program in the terminal. ---roles_t/abbey-dvr/tasks/main.yml-- name: Authorize agentdvr. - copy: - content: | - ALL ALL=(agentdvr) NOPASSWD: /bin/systemctl,/bin/apt-get,\ - /sbin/adduser,/sbin/usermod - dest: /etc/sudoers.d/agentdvr -
--8.3. Test For
AgentDVR/@@ -2482,8 +2536,8 @@ machine simply by adding it to thetvrs
group.-9.3. Include Abbey Variables
++-- 2.25.1 -9.3. Include Abbey Variables
@@ -4531,7 +4584,7 @@ toPrivate variables in
-private/vars-abbey.ymlare needed, as in the @@ -3029,7 +3083,7 @@ the list of "inputs" available in a postal code typically ends with the OTA (over the air) broadcasts.+$ tv_grab_zz_sdjson --configure --config-file .mythtv/Mr.Antenna.xml Cache file for lineups, schedules and programs. Cache file: [/home/mythtv/.xmltv/tv_grab_zz_sdjson.cache] @@ -3424,14 +3478,13 @@ except the roles are found inInstitute/roles/as well asroles/. # Notebooks endor: ansible_become_password: "{{ become_endor }}" - geonosis: + sullust: ansible_host: 127.0.0.1 - ansible_user: matt - ansible_become_password: "{{ become_geonosis }}" + ansible_become_password: "{{ become_sullust }}" postfix_mydestination: >- - geonosis.birchwood.private - geonosis - geonosis.localdomain + sullust.birchwood.private + sullust + sullust.localdomain localhost.localdomain localhost children: @@ -3464,10 +3517,10 @@ except the roles are found inInstitute/roles/as well asroles/. notebooks: hosts: endor: - geonosis: + sullust: builders: hosts: - geonosis: + sullust: kamino:private/db.campus_vpn.)