Universal secure Incus Install script
Find a file
2024-12-17 11:32:17 +00:00
copy_containers cleanup 2024-12-17 10:36:40 +01:00
license.txt first commit 2024-12-16 15:37:24 +01:00
README.md typo 2024-12-16 16:26:27 +01:00
setup-usi-mm first_try 2024-12-17 11:32:17 +00:00
setup-usi-mm_install_requirements rename_files 2024-12-16 15:38:20 +01:00
zfs-backup-mm-example-config first commit 2024-12-16 15:37:24 +01:00

!!!WORK IN PROGRESS, DO NOT USE!!!

Warning:

Some names in the scripts (datasets, etc.) use the term "lxd". This script is a successor to the old usl-mm script, but it does not use LXD. All names associated with "lxd" are here purely for compatibility reasons.

Features:

copy_containers -> script for easy bulk container migrate via SSH between instalations of usi-mm, is also possible use it in non-interactive mode with parameters in this order: container-name, destination-host, destination-port(optional)

zfs-backup-mm-example-config -> example config for zfs-backup-mm script, that backup all running containers, except those with "testing" or "deluge "in container name.

setup-usi-mm_install_requirements -> install dialog utility

setup-usi-mm

  1. Pre-reboot script -> install zfs-utils, change timezone to Prague, crypt swap partition with ecryptfs-utils, crypt some partition with dmcrypt to use with /var/lib/incus/* and Incus ZFS storage, add some config to sysctl.conf, install incus LTS, disable incus services, delete everything in /var/lib/incus/*, delete netplan, install ifupdown, configure bridged networking (you can put LXD container to your network simple by add br0 to container), create zpool with ashift=12, set compression=on on crypted zpool, configure zfs cache min 256MB max 1536MB, do dist-upgrade, create /root/onstart script to decrypt crypted parition with password and start Incus (you need start this script on every reboot), reboot

  2. Post-reboot script -> for sure, stop incus services and delete everything in /var/lib/incus/*, exec /root/onstart to decrypt partition and import zpool, configure incus to use encrypted partition as storage, add some config to /root/.screenrc (for gnuscreen utility), install htop mc zfsnap smartmontools screen and pv

  3. Install uptrack-upgrade -> install ksplice tool for kernel live patching

Requirements:

Fresh installation of Ubuntu 22.04, swap partition and some paritition to crypted data

THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW THE AUTHOR WILL BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.