Skip to content

Commit ecf34f5

Browse files
committed
Cutting 2021-09-22.0 Release.
Remove Saltstack; add Ansible. Added: * Add Movie Studio encoding templates. * Add fix for failed to run vncproxy on pve. * Add note about fc-cache now generating .uuid files. * Add GPG agent forwarding for WSL2 and Linux machines. * Add CLI static DHCP configuration. * Add apt auto selection to docs. * Add 7 days to die administrative commands link. * Add git commands for creating repository tracked hooks. * Add disable for Asus Armoury Crate. * Add additional git merge instructions for backing out and generating log. * Add firefly baremetal setup instructions. * Add git stash notes. * Add crashplan LXC/KVM/Baremetal instructions. * Add Instructions for GPU passthru to LXC containers. * Add pve subscription removal service. * Add gitea troubleshooting information for timeouts and duplicate keys. * Add dropbear service. * Add ZFS sync send/recv commands with automation. * Add installing older game versions on Steam. * Add SSH blocked through wireguard network resolution. * Add wireguard-initramfs instructions. * Add PFX RSA public/private, certificate extraction instructions. * Add wireguard kernel debugging configuration. * Add ansible notes. * Add ansible auto-decrypt vault with security key scripts. * Add Movie Studio encoding templates. * Add fix for failed to run vncproxy on pve. * Add note about fc-cache now generating .uuid files. * Add GPG agent forwarding for WSL2 and Linux machines. * Add CLI static DHCP configuration. * Add apt auto selection to docs. Changed: * Correct links and formatting for gpg/ansible docs as well. * Update ZFS manaul disk replacement instructions. * Update for automatic partitioning, manual swap, locating devices/ZFS GUID. * Update PFX RSA cert extraction to single commands. * Update ZFS instructions with Encryption and dataset usage. * Update proxmox instructions for version 7. * Update PVE with GPU passthru instructions. Removed: * Remove saltstack configuration notes, add ansible configuration notes. Fixed: * Update pygments to 2.7.4 addressing CVE-2021-27291 * Update jinja, urllibs based on security advisories.
1 parent 165706a commit ecf34f5

File tree

337 files changed

+161939
-83633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+161939
-83633
lines changed

RELEASE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# [Changelog][3g]
22

3+
## 2021-09-22.0
4+
Remove Saltstack; add Ansible.
5+
6+
Added:
7+
* Add Movie Studio encoding templates.
8+
* Add fix for failed to run vncproxy on pve.
9+
* Add note about fc-cache now generating .uuid files.
10+
* Add GPG agent forwarding for WSL2 and Linux machines.
11+
* Add CLI static DHCP configuration.
12+
* Add apt auto selection to docs.
13+
* Add 7 days to die administrative commands link.
14+
* Add git commands for creating repository tracked hooks.
15+
* Add disable for Asus Armoury Crate.
16+
* Add additional git merge instructions for backing out and generating log.
17+
* Add firefly baremetal setup instructions.
18+
* Add git stash notes.
19+
* Add crashplan LXC/KVM/Baremetal instructions.
20+
* Add Instructions for GPU passthru to LXC containers.
21+
* Add pve subscription removal service.
22+
* Add gitea troubleshooting information for timeouts and duplicate keys.
23+
* Add dropbear service.
24+
* Add ZFS sync send/recv commands with automation.
25+
* Add installing older game versions on Steam.
26+
* Add SSH blocked through wireguard network resolution.
27+
* Add wireguard-initramfs instructions.
28+
* Add PFX RSA public/private, certificate extraction instructions.
29+
* Add wireguard kernel debugging configuration.
30+
* Add ansible notes.
31+
* Add ansible auto-decrypt vault with security key scripts.
32+
* Add Movie Studio encoding templates.
33+
* Add fix for failed to run vncproxy on pve.
34+
* Add note about fc-cache now generating .uuid files.
35+
* Add GPG agent forwarding for WSL2 and Linux machines.
36+
* Add CLI static DHCP configuration.
37+
* Add apt auto selection to docs.
38+
39+
Changed:
40+
* Correct links and formatting for gpg/ansible docs as well.
41+
* Update ZFS manaul disk replacement instructions.
42+
* Update for automatic partitioning, manual swap, locating devices/ZFS GUID.
43+
* Update PFX RSA cert extraction to single commands.
44+
* Update ZFS instructions with Encryption and dataset usage.
45+
* Update proxmox instructions for version 7.
46+
* Update PVE with GPU passthru instructions.
47+
48+
Removed:
49+
* Remove saltstack configuration notes, add ansible configuration notes.
50+
51+
Fixed:
52+
* Update pygments to 2.7.4 addressing CVE-2021-27291
53+
* Update jinja, urllibs based on security advisories.
54+
355
## 2021-02-28.0
456
Finish sphinx CT directive migration.
557

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Incremental ZFS send/recv backup script
4+
# Original: https://github.com/bahamas10/zincrsend
5+
# This Version: https://github.com/r-pufky/zincrsend
6+
#
7+
# Exit codes:
8+
# 0: success.
9+
# 1: local snapshot creation failed.
10+
# 2: latest remote snapshot does not exist locally (manual intervention
11+
# required).
12+
# 3: ZFS send/recv failed.
13+
14+
15+
################################################################################
16+
# Configuration options
17+
################################################################################
18+
# Recursive datasets to send. (-R) will remove snapshots that have been deleted
19+
# locally on the remote end as well. Dataset does *NOT* need to have children.
20+
datasets=(
21+
tank/example
22+
)
23+
24+
# Remote server connection settings.
25+
remote_server='172.31.255.254'
26+
remote_user='example_user'
27+
remote_port='22'
28+
remote_pool='backup_tank'
29+
remote_command_prefix='sudo'
30+
remote_ssh_opts=(-i example_user.key)
31+
32+
# prefix to use for snapshots created by this script
33+
snapshot_prefix=''
34+
# Number of snapshots to retain after successful sync. 0 disables.
35+
snapshot_retention=2
36+
# snapshot options: https://openzfs.github.io/openzfs-docs/man/8/zfs-snapshot.8.html
37+
snapshot_opts=(-r)
38+
# send options: https://openzfs.github.io/openzfs-docs/man/8/zfs-send.8.html
39+
send_opts=(-R -w)
40+
################################################################################
41+
42+
SSH() {
43+
echo "ssh ${remote_ssh_opts[*]} ${remote_server} ${remote_command_prefix} $*"
44+
ssh \
45+
"${remote_ssh_opts[@]}" \
46+
-l "${remote_user}" \
47+
-p "${remote_port}" \
48+
"${remote_server}" \
49+
"${remote_command_prefix}" \
50+
"${@}"
51+
}
52+
53+
process() {
54+
local ds=${1}
55+
56+
echo ''
57+
echo "processing dataset: ${ds}"
58+
echo ''
59+
60+
# Step 1 - snapshot locally
61+
local now=$(date +%s)
62+
local snap=${ds}@${snapshot_prefix}${now}
63+
echo "creating snapshot locally: ${snap}"
64+
if ! sudo /usr/sbin/zfs snapshot "${snapshot_opts[@]}" "${snap}"; then
65+
echo "[ERROR] failed to snapshot ${ds}" >&2
66+
exit 1
67+
fi
68+
69+
# Step 2 - find the latest remote snapshot
70+
local rds=$remote_pool/${ds#*/}
71+
local inc_snap=
72+
local inc_opts=()
73+
echo "fetching latest remote snapshot for dataset: ${rds}"
74+
local rsnap=$(SSH /usr/sbin/zfs list -H -o name,creation -p -t snapshot -r "${rds}" | \
75+
grep "^${rds}@" | \
76+
sort -n -k 2 | \
77+
tail -1 | \
78+
awk '{ print $1 }')
79+
80+
if [[ -n ${rsnap} ]]; then
81+
echo "latest remote snapshot: ${rsnap}"
82+
inc_snap=${rsnap#*@}
83+
# assert that ${inc_snap} exists locally
84+
if ! sudo /usr/sbin/zfs list -t snapshot "${ds}@${inc_snap}" &>/dev/null; then
85+
echo "[ERROR] could not find ${rsnap} locally (${ds}@${inc_snap} not found)" >&2
86+
exit 2
87+
fi
88+
inc_opts+=(-I "@${inc_snap}")
89+
else
90+
echo "no snapshot found for ${ds} - doing full send/recv"
91+
fi
92+
93+
# Step 3: send from latest remote to newly created or do a full send
94+
if [[ -n ${inc_snap} ]]; then
95+
echo "zfs sending (incremental) @${inc_snap} -> ${snap} to ${rds}"
96+
else
97+
echo "zfs sending ${snap} to ${rds}"
98+
fi
99+
# Receive options: Always use snapshot as base (remote changes on after
100+
# snapshot will cause recieve to fail otherwise); recieving pool receieves
101+
# filesystem unmounted to prevent mount collisions.
102+
if ! sudo /usr/sbin/zfs send "${send_opts[@]}" "${inc_opts[@]}" "${snap}" | SSH /usr/sbin/zfs recv -Fuv "${rds}"; then
103+
echo "[ERROR] failed to send $snap to ${remote_server} ${rds}" >&2
104+
exit 3
105+
fi
106+
107+
# Step 4: After successful sync, trim the last X snapshots (sync'ed on next run).
108+
if [[ ${snapshot_retention} -gt 0 ]]; then
109+
echo "retainng the last ${snapshot_retention} snapshots for ${ds}"
110+
# Identify the latest X snapshots for a given dataset (creation, newest to oldest)
111+
zfs_latest=`/usr/sbin/zfs list -H -t snapshot -o name -S creation | grep ^${ds}@ | head -${snapshot_retention}`
112+
# Identify ALL snapshots for a given dataset (creation, newest to oldest)
113+
zfs_delete=`/usr/sbin/zfs list -H -t snapshot -o name -S creation | grep ^${ds}@`
114+
115+
echo "all snapshots: $(echo ${zfs_delete[@]})"
116+
echo "retained snapshots: $(echo ${zfs_latest[@]})"
117+
# Remove latest snapshots from all set.
118+
for keep_snap in ${zfs_latest[@]}; do
119+
zfs_delete=( "${zfs_delete[@]/${keep_snap}}" );
120+
done
121+
122+
echo "snapshots to remove: $(echo ${zfs_delete[@]})"
123+
# Destroy old snapshots
124+
for snap in ${zfs_delete[@]}; do
125+
/usr/sbin/zfs destroy ${snap}
126+
done
127+
else
128+
echo "zfs snapshot rentention management disabled"
129+
fi
130+
}
131+
132+
echo "starting on $(date)"
133+
134+
code=0
135+
for ds in "${datasets[@]}"; do
136+
process "${ds}"
137+
done
138+
echo
139+
echo "script ran for ~$((SECONDS / 60)) minutes (${SECONDS} seconds)"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# https://github.com/drduh/config/blob/master/gpg-agent.conf
2+
# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
3+
enable-ssh-support
4+
ttyname $GPG_TTY
5+
default-cache-ttl 60
6+
max-cache-ttl 120
7+
pinentry-program /usr/bin/pinentry-curses
8+
#pinentry-program /usr/bin/pinentry-tty
9+
#pinentry-program /usr/bin/pinentry-gtk-2
10+
#pinentry-program /usr/bin/pinentry-x11
11+
#pinentry-program /usr/bin/pinentry-gnome3
12+
#pinentry-program /usr/local/bin/pinentry-curses
13+
#pinentry-program /usr/local/bin/pinentry-mac
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# https://github.com/drduh/config/blob/master/gpg.conf
2+
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html
3+
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html
4+
# Use AES256, 192, or 128 as cipher
5+
personal-cipher-preferences AES256 AES192 AES
6+
# Use SHA512, 384, or 256 as digest
7+
personal-digest-preferences SHA512 SHA384 SHA256
8+
# Use ZLIB, BZIP2, ZIP, or no compression
9+
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed
10+
# Default preferences for new keys
11+
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
12+
# SHA512 as digest to sign keys
13+
cert-digest-algo SHA512
14+
# SHA512 as digest for symmetric ops
15+
s2k-digest-algo SHA512
16+
# AES256 as cipher for symmetric ops
17+
s2k-cipher-algo AES256
18+
# UTF-8 support for compatibility
19+
charset utf-8
20+
# Show Unix timestamps
21+
fixed-list-mode
22+
# No comments in signature
23+
no-comments
24+
# No version in output
25+
no-emit-version
26+
# Disable banner
27+
no-greeting
28+
# Long hexidecimal key format
29+
keyid-format 0xlong
30+
# Display UID validity
31+
list-options show-uid-validity
32+
verify-options show-uid-validity
33+
# Display all keys and their fingerprints
34+
with-fingerprint
35+
# Display key origins and updates
36+
#with-key-origin
37+
# Cross-certify subkeys are present and valid
38+
require-cross-certification
39+
# Disable caching of passphrase for symmetrical ops
40+
no-symkey-cache
41+
# Enable smartcard
42+
use-agent
43+
# Disable recipient key ID in messages
44+
throw-keyids
45+
# Default/trusted key ID to use (helpful with throw-keyids)
46+
#default-key 0xFF3E7D88647EBCDB
47+
#trusted-key 0xFF3E7D88647EBCDB
48+
# Group recipient keys (preferred ID last)
49+
#group keygroup = 0xFF00000000000001 0xFF00000000000002 0xFF3E7D88647EBCDB
50+
# Keyserver URL
51+
#keyserver hkps://keys.openpgp.org
52+
#keyserver hkps://keyserver.ubuntu.com:443
53+
#keyserver hkps://hkps.pool.sks-keyservers.net
54+
#keyserver hkps://pgp.ocf.berkeley.edu
55+
# Proxy to use for keyservers
56+
#keyserver-options http-proxy=http://127.0.0.1:8118
57+
#keyserver-options http-proxy=socks5-hostname://127.0.0.1:9050
58+
# Verbose output
59+
#verbose
60+
# Show expired subkeys
61+
#list-options show-unusable-subkeys

0 commit comments

Comments
 (0)