Author: Nathan Gardiner [email protected]
These templates are installed on a Proxmox PVE host. It is also possible to install the DAB package from the Proxmox repository on a non-PVE host.
On an existing Proxmox host:
apt-get install dab git make
On a non-Proxmox Wheezy host:
wget http://download.proxmox.com/debian/dists/wheezy/pvetest/binary-amd64/dab_1.2-7_all.deb
dpkg -i dab_1.2-7_all.deb
git clone https://github.com/ngardiner/dab_templates.git
Customize the Makefile.global file to suit your site
Generate the template image for any of the templates
cd dab_templates/jessie_minimal/
make
Move the template to the Proxmox container templates directory
make template
Clean up the build data
make clean
DAB is the Debian Appliance Builder developed by the Proxmox PVE project to make the creation of Appliance Containers easier.
The purpose of these templates are to add some template-time customizations to the Ubuntu templates so that they can be used as a base to automate the deployment of horizonally-scalable containers for data centre pod deployments on Proxmox VE.
Whilst the Turnkey Linux templates included with Proxmox VE are broad and useful, they contain a lot of generalised bloat which is intended to make management easier, but which does not scale well over a large deployment plane, where better efficiencies can be found with centralised rather than per-container management.
Within each of the template directories is a Makefile and a dab.conf (and potentially other files). The Makefile will trigger a Debian bootstap of a system based on the parameters in the dab.conf and with additional instructions within the Makefile to install packages, copy files and run commands within the template root.
The Makefile.global file at the root of the repository contains global configuration routines that can be used to perform customization such as adding an rsyslog-relp log server, customising prompts or setting authentication keys.
For managability purposes, all of the images created are x86_64/amd64 images. It is possible to target the i386 architecture by changing the Architecture option in the respective dab.conf.
By default, images created from these templating scripts will not allow root login. This means that one of the following must be true to be able to log in remotely via SSH. Console access will allow login using the specifed password:
- You must specify one SSH public key via the Proxmox container creation process, or
- You must specify one or more SSH public keys via the Makefile.generic, or
- You must specify that root login via SSH using Password authentication is permitted, or
- You must log in via the console and manually configure another authentication mechanism
The primary benefit of the structure provided by this repository in managing DAB templates is that common customizations can be standardized and embedded within the template images, rather than requiring significant reconfiguration after instantiation.
In addition to the installation of packages and configuration files, the Makefile.global file in the root of the repository is used to define some common customizations such as pre-seeding an SSH public key for the root user to allow ansible to perform additional post-deployment customization.
None of the configuration within the Makefile.global file is mandatory, and commenting out lines that are not required will disable the associated customization.
Each template directory contains two files to aid with customization of the template build process:
- custom.sh which will execute the commands contained within the script inside of the template container environment during build
- runonce.sh which will trigger on the first boot of a host created from that template, and then remove itself.
Packages downloaded will be cached in the cache directory at the root of the repository. This will make subsequent DAB builds much faster.
Template | Distro | Description |
---|---|---|
ansible | Ubuntu Kinetic | Ansible automation platform |
bionic_minimal | Ubuntu Bionic | Minimal Ubuntu Bionic Installation |
bionic_standard | Ubuntu Bionic | Standard Ubuntu Bionic Installation |
bullseye_minimal | Debian Bullseye | Minimal Debian Bullseye Installation |
bullseye_standard | Debian Bullseye | Standard Debian Bullseye Installation |
buster_minimal | Debian Buster | Minimal Debian Buster Installation |
buster_standard | Debian Buster | Standard Debian Buster Installation |
focal_mininmal | Ubuntu Focal | Minimal Ubuntu Focal Installation |
focal_standard | Ubuntu Focal | Standard Ubuntu Focal Installation |
frr | Ubuntu Xenial | Free Range Routing Advanced Routing Engine |
haproxy | Ubuntu Bionic | HAProxy |
homeassistant | Ubuntu Bionic | Home Automation System |
jammy_minimal | Ubuntu Jammy | Minimal Ubuntu Jammy Installation |
jammy_standard | Ubuntu Jammy | Standard Ubuntu Jammy Installation |
jessie_minimal | Debian Jessie | Minimal Debian Jessie Installation |
jessie_standard | Debian Jessie | Standard Debian Jessie Installation |
lms | Ubuntu Xenial | Logitech Media Server - Whole House Audio |
logserver | Ubuntu Xenial | rsyslog remote reception, logstash, webui |
mariadb | Ubuntu Xenial | MariaDB Database Server |
nginx_rproxy | Ubuntu Xenial | nginx Reverse Proxy (for use as a DMZ host) |
stretch_minimal | Debian Stretch | Minimal Debian Jessie Installation |
stretch_standard | Debian Stretch | Standard Debian Jessie Installation |
vyos | Ubuntu Xenial | EXPERIMENTAL attempt to run vyos CLI in LXC |
xenial_minimal | Ubuntu Xenial | Minimal Ubuntu Xenial Installation |
xenial_standard | Ubuntu Xenial | Standard Ubuntu Xenial Installation |
zoneminder | Ubuntu Xenial | IP Camera Manager used for security |