Code Monkey home page Code Monkey logo

bashclub / zamba-lxc-toolbox Goto Github PK

View Code? Open in Web Editor NEW
269.0 33.0 60.0 429 KB

Zamba LXC Toolbox a script collection to setup LXC containers on Proxmox + ZFS. Zamba is the fusion of ZFS and Samba (standalone, active directory dc or active directory member), preconfigured to access ZFS snapshots by "Previous Versions" to easily recover encrypted by ransomware files, accidently deleted files or just to revert changes.

Home Page: https://aow.de/

License: GNU General Public License v3.0

Shell 100.00%
proxmox zfs samba samba-ad-dc samba-active-directory mailpiler matrix-synapse element-web lxc debian

zamba-lxc-toolbox's Introduction

Zamba LXC Toolbox

About

Zamba LXC Toolbox is a collection of scripts to easily install Debian LXC containers with preconfigured services on Proxmox with ZFS. The main feature is Zamba, the fusion of ZFS and Samba in three different flavours (standalone, active directory dc or active directory member), preconfigured to access ZFS snapshots by "Windows Previous Versions" to easily recover encrypted by ransomware files, accidently deleted files or just to revert changes. The package also provides LXC container installers for mailpiler, matrix-synapse + element-web and more services will follow in future releases.

Requirements

Proxmox VE Server (>=6.30) with at least one configured ZFS Pool.

Included services:

  • bookstack => Bookstack wiki software bookstackapp.com
  • checkmk => Check_MK 2.0 Monitoring Server checkmk.com
  • debian-priv => Debian privileged container with basic toolset
  • debian-unpriv => Debian unprivileged container with basic toolset
  • ecodms => Fullfeatured DMS ecodms.de
  • gitea => Lightweight and fast self-hosted git service gitea.io
  • kimai => Kimai Time-Tracking kimai.org
  • kopano-core => Kopano Core Groupware kopano.io
  • mailpiler => mailpiler mail archive mailpiler.org
  • matrix => Matrix Synapse Homeserver matrix.org with Element Web Element on github
  • nextcloud => Nextcloud Server nextcloud.com with fail2ban und redis configuration
  • omada => TP-Link Omada SDN Controller www.tp-link.com
  • onlyoffice => OnlyOffice onlyoffice.com
  • open3a => Open3a web based accounting software open3a.de
  • proxmox-pbs => Proxmox Backup Server proxmox.com
  • unifi => Unifi Controller ui.com
  • urbackup => UrBackup Server urbackup.org
  • vaultwarden => Bitwarder compatible Passwordmanager github.com/dani-garcia/vaultwarden
  • zabbix => Zabbix Monitoring server zabbix.com
  • zammad => Zammad Helpdesk and Ticketing Software zammad.org
  • zmb-ad => ZMB (Samba) Active Directory Domain Controller, DNS Backends SAMBA_INTERNAL and BIND9_DLZ are supported
  • zmb-ad-join => Additional Active Directory Domain Controller joining an existing Domain
  • zmb-member => ZMB (Samba) AD member with ZFS volume snapshot support
  • zmb-standalone => ZMB (Samba) standalone server with ZFS volume snapshot support

Usage

Just ssh into your Proxmox machine and clone this git repository. Make sure you have installed git.

apt update
apt -y install git

Clone this Repository

git clone https://github.com/bashclub/zamba-lxc-toolbox
cd zamba-lxc-toolbox

Configuration

Copy zamba.conf.example located in conf directory to a new file (default: zamba.conf) and adjust your desired settings. For further information about configuration variables, have a look at conf/README.md

cp conf/zamba.conf.example conf/zamba.conf

Installation

After configuring, you are able to launch the script interactively (only works with conf/zamba.conf):

bash install.sh

Advanced Usage

You can set optional parameters (config file, service, container id):

Example:

bash install.sh -i 280 -c conf/my-zmb-service.conf -s zmb-member

You can also view possible parameters with install.sh -h

After container creation, you will be prompted to select the service to install and depending on the service there may be some more questions during installation.

Once the script has finished, the container is installed and running and you can continue with the service specific configuration.

Authors

Markus Helmke

Thorsten Spille

zamba-lxc-toolbox's People

Contributors

cpzengel avatar derfossibaer avatar diddip21 avatar hpannenb avatar kevinpapst avatar nezzept avatar spille-edv avatar thorstenspille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zamba-lxc-toolbox's Issues

`zmb-ad` domain provisioning fails with weak administrator password

This needs to be documented!
There are a few options to consider:

  • Check predefined password for complexity, if requirements not met, cancel the install script.
  • Set administrator password after provisioning the domain?
  • INSECURE: Add an option to turn off password complexity

Install.sh pct set -timezone

pct set -timezone - unknown option
Missing parameter on pve 5.3.18
(Livestream - Migration eines Fileservers auf zfs mit zamba...)

HTTP(S) reverse proxy / redirector for split-dns setups on ad dc

If a split-dns setup is configured, by default the public company website is not accessible, because the domain will be the local dc.
The host www can be configured by a static DNS A entry, but the website will not be accessible just by the domain name.
A solution for this issue is a webserver on the dc to redirect or reverse proxy to the public website.

Fehler in Proxmox Backup-Server

beim Versuch einen PBS aufzusetzen mit dem Script:
bash install.sh -i3015 und der Auswahl 9
kommt folgende Fehlermeldung:

Fehl:4 http://download.proxmox.com/debian/pbs bullseye InRelease
Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY DD4BA3917E23BF59
Paketlisten werden gelesen… Fertig
W: GPG-Fehler: http://download.proxmox.com/debian/pbs bullseye InRelease: Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY DD4BA3917E23BF59
E: Das Depot »http://download.proxmox.com/debian/pbs bullseye InRelease« ist nicht signiert.
N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.
N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
E: Paket proxmox-backup-server kann nicht gefunden werden.
/root/install-service.sh: Zeile 22: proxmox-backup-manager: Kommando nicht gefunden.

matrix server_name [develtest]

  • server_name must be set in /etc/matrix-synapse/conf.d/server_name.yaml

  • update to latest version v1.7.34

# Define the version of Element Web
MATRIX_ELEMENT_VERSION="v1.7.34"

Optimize workflow of installer

Script workflow needs to be like:

  • Select Service
  • Configure container based on the service
  • Configure configure service settings
  • Unattended container creation and service configuration

Install script should check if zamba.conf exist

Currently when someone just clones the repo and runs install the start of a new container will fail:

# ./install.sh
1) checkmk	     3) debian-unpriv	 5) matrix	     7) onlyoffice	 9) proxmox-pbs	    11) zmb-ad		13) zmb-standalone
2) debian-priv	     4) mailpiler	 6) nextcloud	     8) open3a		10) urbackup	    12) zmb-member	14) quit
#? 2
Installation of debian-priv selected.
Loading config file '/root/zamba-lxc-toolbox/conf/zamba.conf'...
./install.sh: line 91: /root/zamba-lxc-toolbox/conf/zamba.conf: No such file or directory
400 not enough arguments
pveam list <storage>
Will now download newest debian-11-standard .
400 not enough arguments
pveam download <storage> <template>
Will now create LXC Container 105!
unable to parse volume ID ':'
400 too many arguments
pct set <vmid> [OPTIONS]
./install.sh: line 130: [: ==: unary operator expected
400 Parameter verification failed.
nameserver: invalid format - value does not look like a valid IP address

net0: invalid format - missing key in comma-separated list property

pct set <vmid> [OPTIONS]
Configuration file 'nodes/rizzo/lxc/105.conf' does not exist
lxc-attach: 105: attach.c: get_attach_context: 405 Connection refused - Failed to get init pid
lxc-attach: 105: attach.c: lxc_attach: 1469 Connection refused - Failed to get attach context
lxc-attach: 105: attach.c: get_attach_context: 405 Connection refused - Failed to get init pid
lxc-attach: 105: attach.c: lxc_attach: 1469 Connection refused - Failed to get attach context
400 not enough arguments
pct push <vmid> <file> <destination> [OPTIONS]
can only push files to a running CT
can only push files to a running CT
can only push files to a running CT
can only push files to a running CT
can only push files to a running CT
Installing basic container setup...
lxc-attach: 105: attach.c: get_attach_context: 405 Connection refused - Failed to get init pid
lxc-attach: 105: attach.c: lxc_attach: 1469 Connection refused - Failed to get attach context
Install 'debian-priv'!
lxc-attach: 105: attach.c: get_attach_context: 405 Connection refused - Failed to get init pid
lxc-attach: 105: attach.c: lxc_attach: 1469 Connection refused - Failed to get attach context

PVE 7.1-8

open3a wrong ipaddress [develtest]

Finish Message
Your open3a installation is now complete. Please continue with setup in your Browser:
URL: http://192.168.100.200/24
Login: Admin
Password: Admin

Mysql-Settings:
Server: localhost
User: open3a
Password: KjFToTglK6XDeKkYqETB
Database: open3a

Wrong IP-Addresse (used dhcp no static ip)

Update locale non interactive

Changing the locale via script is possible in the following way

sed -i "s/^#.$LXC_LOCALE/$LXC_LOCALE/" /etc/locale.gen
locale-gen $LXC_LOCALE
echo LANG=$LXC_LOCALE > /etc/default/locale
echo LANGUAGE=$LXC_LOCALE >> /etc/default/locale
export LANG=$LXC_LOCALE

Hint change zamba.conf to
LXC_LOCALE=de_DE.UTF-8

debian 11

move to debian 11 template

lxc Containter need to be checked

standardize handling of tls certificates

  • all certs in same path
  • deliver with self-signed cert
  • letsencrypt support (e.g. certbot), maybe with managed reverse proxy container
  • opnsense le support via api

check devel toolbox

  • zmb-standalone => ZMB (Samba) standalone server with ZFS volume snapshot support (previous versions)
  • zmb-ad => ZMB (Samba) Active Directory Domain Controller, DNS Backends SAMBA_INTERNAL and BIND9_DLZ are supported
  • zmb-member => ZMB (Samba) AD member with ZFS volume snapshot support (previous versions)
  • mailpiler => mailpiler mail archive mailpiler.org
  • matrix => Matrix Synapse Homeserver matrix.org with Element Web Element on github
  • nextcloud => Nextcloud Server nextcloud.com with fail2ban und redis configuration
  • checkmk => CheckMK 2.0 Raw Edition checkmk.com with our Fork of Matrix Notification Plugin (https://github.com/bashclub/check_mk_matrix_notifications)
  • open3a => Open3A accounting software for small and medium business open3a.de
  • debian-unpriv => Debian unprivileged container with basic toolset
  • debian-priv => Debian privileged container with basic toolset

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.