From c52525caf7c4dbfa2ea569d073676d54f052ead0 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 27 Jul 2021 11:30:04 +0200 Subject: [PATCH 01/11] Changed matrix notification plugin installation --- src/checkmk/install-service.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/checkmk/install-service.sh b/src/checkmk/install-service.sh index 25ab743..180c4a5 100644 --- a/src/checkmk/install-service.sh +++ b/src/checkmk/install-service.sh @@ -30,8 +30,4 @@ systemctl restart apache2.service omd start $CMK_INSTANCE # install matrix notification plugin -su - $CMK_INSTANCE -cd ~/local/share/check_mk/notifications/ -wget https://github.com/bashclub/check_mk_matrix_notifications/raw/master/matrix.py -chmod +x ./matrix.py -exit \ No newline at end of file +su - $CMK_INSTANCE -c "wget -O ~/local/share/check_mk/notifications/matrix.py https://github.com/bashclub/check_mk_matrix_notifications/raw/master/matrix.py && chmod +x ~/local/share/check_mk/notifications/matrix.py" From 01460566edd2ac15628dd9be6508838f431647a1 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 27 Jul 2021 12:18:42 +0200 Subject: [PATCH 02/11] Update constants-service.conf Changed checkmk version to 2.0.0p8 --- src/checkmk/constants-service.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/checkmk/constants-service.conf b/src/checkmk/constants-service.conf index d6a75fa..e506a6e 100644 --- a/src/checkmk/constants-service.conf +++ b/src/checkmk/constants-service.conf @@ -17,6 +17,6 @@ LXC_UNPRIVILEGED="1" LXC_NESTING="0" # checkmk version -CMK_VERSION=2.0.0p4 +CMK_VERSION=2.0.0p8 # build number of the debian package (needs to start with underscore) -CMK_BUILD=_0 \ No newline at end of file +CMK_BUILD=_0 From 14fc948e5750bb2e01eac89078422dd1d53aef5a Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Thu, 29 Jul 2021 15:15:45 +0200 Subject: [PATCH 03/11] Update README.md Added checkmk and open3a to list --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9cbc32b..1a38e0e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Proxmox VE Server with at least one configured ZFS Pool. - `mailpiler` => mailpiler mail archive [mailpiler.org](https://www.mailpiler.org/) - `matrix` => Matrix Synapse Homeserver [matrix.org](https://matrix.org/docs/projects/server/synapse) with Element Web [Element on github](https://github.com/vector-im/element-web) - `nextcloud` => Nextcloud Server [nextcloud.com](https://nextcloud.com/) with fail2ban und redis configuration +- `checkmk` => CheckMK 2.0 Raw Edition [checkmk.com](https://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](https://www.open3a.de/) - `debian-unpriv` => Debian unprivileged container with basic toolset - `debian-priv` => Debian privileged container with basic toolset ## Usage From 32036dfb2f76754869f55a4f3fb41e39e9ec2c0d Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Thu, 29 Jul 2021 17:11:45 +0200 Subject: [PATCH 04/11] Update zamba.conf.example fixed checkmk instance name --- conf/zamba.conf.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/zamba.conf.example b/conf/zamba.conf.example index 1e20320..9bd2691 100644 --- a/conf/zamba.conf.example +++ b/conf/zamba.conf.example @@ -130,7 +130,7 @@ NEXTCLOUD_REVPROX="192.168.100.254" ############### Check_MK-Section ############### # Define the name of your checkmk instance -CMK_INSTANCE=zmb-rocks +CMK_INSTANCE=zmbrocks # Define the password of user 'cmkadmin' CMK_ADMIN_PW='Ju5t@n0thers3cur3p@ssw0rd' From 98b1bb77d369581277f615cb08b0abb67fab0e68 Mon Sep 17 00:00:00 2001 From: Patrick Greiner Date: Fri, 6 Aug 2021 22:00:09 +0200 Subject: [PATCH 05/11] added Config check for Timezone and Storages modified Hostname with Service PREFIX "${service}.zmbrocks" fix "pct set -timezone" # timezone switch added in Version 6.3 https://github.com/bashclub/zamba-lxc-toolbox/issues/29 added Set "/root/summary" file from LXC-container as pct description modified updated Matrix Element Version --- conf/zamba.conf.example | 2 +- install.sh | 42 +++++++++++++++++++++++++------ src/matrix/constants-service.conf | 2 +- src/nextcloud/install-service.sh | 5 +++- src/open3a/install-service.sh | 5 +++- 5 files changed, 45 insertions(+), 11 deletions(-) diff --git a/conf/zamba.conf.example b/conf/zamba.conf.example index 1e20320..5e62dc1 100644 --- a/conf/zamba.conf.example +++ b/conf/zamba.conf.example @@ -34,7 +34,7 @@ LXC_MEM="1024" LXC_SWAP="1024" # Defines the hostname of your LXC container -LXC_HOSTNAME="zamba" +LXC_HOSTNAME="${service}.zmbrocks" # Defines the domain name / search domain of your LXC container LXC_DOMAIN="zmb.rocks" diff --git a/install.sh b/install.sh index acb71ba..245cf78 100644 --- a/install.sh +++ b/install.sh @@ -53,6 +53,27 @@ shift $((OPTIND-1)) echo "Loading config file '$config'..." source $config +# Check config Settings +echo "Check Setting 'Timezone'" +if [[ $LXC_TIMEZONE != $(timedatectl list-timezones | grep $LXC_TIMEZONE) ]]; then + echo "Unknown LXC_TIMEZONE setting (list available Timezones 'timedatectl list-timezones')"; exit 0 +fi +echo "Check Setting 'Template Storage'" +pvstorage=$(pvesh get storage --noborder --noheader); +if [[ $LXC_TEMPLATE_STORAGE != $(echo "$pvstorage" | grep $LXC_TEMPLATE_STORAGE$) ]]; then + echo "Unknown LXC_TEMPLATE_STORAGE, please check your storage name"; exit 0 +fi +echo "Check Setting 'Rootfs Storage'" +if [[ $LXC_ROOTFS_STORAGE != $(echo "$pvstorage" | grep $LXC_ROOTFS_STORAGE$) ]]; then + echo "Unknown LXC_ROOTFS_STORAGE, please check your storage name"; exit 0 +fi +echo "Check Setting 'Sharefs Storage'" +if [[ $LXC_SHAREFS_STORAGE != $(echo "$pvstorage" | grep $LXC_SHAREFS_STORAGE$) ]]; then + echo "Unknown LXC_SHAREFS_STORAGE, please check your storage name"; exit 0 +fi +echo -e "Settings \e[0;92mOK\e[0m" + + OPTS=$(ls -d $PWD/src/*/ | grep -v __ | xargs basename -a) valid=0 @@ -90,9 +111,11 @@ if [[ "$valid" != "1" ]]; then usage 1 fi +source $config source $PWD/src/$service/constants-service.conf +LXC_HOSTNAME="${LXC_HOSTNAME/-/}" -# CHeck is the newest template available, else download it. +# Check is the newest template available, else download it. DEB_LOC=$(pveam list $LXC_TEMPLATE_STORAGE | grep debian-10-standard | cut -d'_' -f2) DEB_REP=$(pveam available --section system | grep debian-10-standard | cut -d'_' -f2) @@ -124,13 +147,12 @@ pct create $LXC_NBR -unprivileged $LXC_UNPRIVILEGED $LXC_TEMPLATE_STORAGE:vztmpl sleep 2; # Check vlan configuration -if [[ $LXC_VLAN != "" ]];then - VLAN=",tag=$LXC_VLAN" -else - VLAN="" -fi +if [[ $LXC_VLAN != "" ]];then VLAN=",tag=$LXC_VLAN"; else VLAN=""; fi # Reconfigure conatiner -pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME -onboot 1 -timezone $LXC_TIMEZONE -features nesting=$LXC_NESTING; +PVE_VER=$(pveversion | grep 'pve-manager' | cut -d'/' -f2 | sed 's/[^0-9]//g') +pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME -onboot 1 -features nesting=$LXC_NESTING; +# timezone switch added in Version 6.3 +if [ $PVE_VER -gt 630 ];then pct set $LXC_NBR -timezone $LXC_TIMEZONE;fi if [ $LXC_DHCP == true ]; then pct set $LXC_NBR -net0 name=eth0,bridge=$LXC_BRIDGE,ip=dhcp,type=veth$VLAN; else @@ -163,8 +185,14 @@ lxc-attach -n$LXC_NBR bash /root/lxc-base.sh echo "Install '$service'!" lxc-attach -n$LXC_NBR bash /root/install-service.sh +summary=$(pct exec $LXC_NBR -- bash -c '[ -f /root/summary ] && cat /root/summary') +if [[ $summary != "" ]];then pct set $LXC_NBR --description="$(echo -e "$summary")"; fi + if [[ $service == "zmb-ad" ]]; then pct stop $LXC_NBR pct set $LXC_NBR \-nameserver $(echo $LXC_IP | cut -d'/' -f 1) pct start $LXC_NBR fi + +# timezone switch added in Version 6.3 +if [ $PVE_VER -lt 630 ]; then echo "echo "$LXC_TIMEZONE" > /etc/timezone" | pct enter $LXC_NBR; fi \ No newline at end of file diff --git a/src/matrix/constants-service.conf b/src/matrix/constants-service.conf index a8136ea..57a6fe2 100644 --- a/src/matrix/constants-service.conf +++ b/src/matrix/constants-service.conf @@ -17,4 +17,4 @@ LXC_UNPRIVILEGED="1" LXC_NESTING="0" # Define the version of Element Web -MATRIX_ELEMENT_VERSION="v1.7.25" +MATRIX_ELEMENT_VERSION="v1.7.34" diff --git a/src/nextcloud/install-service.sh b/src/nextcloud/install-service.sh index 870263c..fd9ab14 100644 --- a/src/nextcloud/install-service.sh +++ b/src/nextcloud/install-service.sh @@ -410,7 +410,10 @@ bash /$LXC_SHAREFS_MOUNTPOINT/$NEXTCLOUD_DATA/config_nextcloud.sh EOF echo "*/5 * * * * www-data /usr/bin/php -f /var/www/nextcloud/cron.php > /dev/null 2>&1" > /etc/cron.d/nextcloud -echo -e "\n######################################################################\n\n Please note this user and password for the nextcloud login:\n '$NEXTCLOUD_ADMIN_USR' / '$NEXTCLOUD_ADMIN_PWD'\n Enjoy your Nextcloud intallation.\n\n######################################################################" +echo "\n\n" +echo "######################################################################\n\n Please note this user and password for the nextcloud login:\n '$NEXTCLOUD_ADMIN_USR' / '$NEXTCLOUD_ADMIN_PWD'\n Enjoy your Nextcloud intallation.\n\n######################################################################" > /root/summary +echo -e "$(cat /root/summary)" + systemctl stop nginx php$NEXTCLOUD_PHP_VERSION-fpm systemctl restart postgresql php$NEXTCLOUD_PHP_VERSION-fpm redis-server nginx diff --git a/src/open3a/install-service.sh b/src/open3a/install-service.sh index 00c5cc8..39bced0 100644 --- a/src/open3a/install-service.sh +++ b/src/open3a/install-service.sh @@ -52,4 +52,7 @@ chmod +x /etc/cron.daily/open3a-backup systemctl enable --now php7.3-fpm systemctl restart nginx -echo -e "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" \ No newline at end of file +echo "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" > /root/summary +echo -e "$(cat /root/summary)" + +exit 0 \ No newline at end of file From 0888e25e9b622aa85ff5649e273b3e59083c835c Mon Sep 17 00:00:00 2001 From: Patrick Greiner Date: Fri, 6 Aug 2021 22:06:13 +0200 Subject: [PATCH 06/11] merged conf/README.md with zamba.conf.md --- conf/README.md | 216 ++++++++++++++++++++++++++++++++++++++++++++++++- zamba.conf.md | 214 ------------------------------------------------ 2 files changed, 215 insertions(+), 215 deletions(-) delete mode 100644 zamba.conf.md diff --git a/conf/README.md b/conf/README.md index 4a821a3..fcdf540 100644 --- a/conf/README.md +++ b/conf/README.md @@ -1 +1,215 @@ -# USE THIS FOLDER TO STORE YOUR OWN ZMB CONFIGS \ No newline at end of file +# USE THIS FOLDER TO STORE YOUR OWN ZMB CONFIGS +# `zamba.conf` options reference +This is the reference of all config options you can set in `zamba.conf` +
+ +## Linux Container Section +In this section all settings relevant for the LXC container. +
+ +### LXC_TEMPLATE_STORAGE +Defines the Proxmox storage where your LXC container template are stored (default: local) +```bash +LXC_TEMPLATE_STORAGE="local" +``` +### LXC_ROOTFS_SIZE +Defines the size in GB of the LXC container's root filesystem (default: 32) +```bash +LXC_ROOTFS_SIZE="32" +``` +Depending on your environment, you should consider increasing the size for use of `mailpiler` or `matrix`. +### LXC_ROOTFS_STORAGE +Defines the Proxmox storage where your LXC container's root filesystem will be generated (default: local-zfs) +```bash +LXC_ROOTFS_STORAGE="local-zfs" +``` +### LXC_SHAREFS_SIZE +Defines the size in GB your LXC container's filesystem shared by Zamba (AD member & standalone) (default: 100) +```bash +LXC_SHAREFS_SIZE="100" +``` +### LXC_SHAREFS_STORAGE +Defines the Proxmox storage where your LXC container's filesystem shared by Zamba will be generated (default: local-zfs) +```bash +LXC_SHAREFS_STORAGE="local-zfs" +``` +### LXC_SHAREFS_MOUNTPOINT +Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank) +```bash +LXC_SHAREFS_MOUNTPOINT="tank" +``` +### LXC_MEM +Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024) +```bash +LXC_MEM="1024" +``` +### LXC_SWAP +Defines the amount of swap space in MB your LXC container is allowed to use (default: 1024) +```bash +LXC_SWAP="1024" +``` +### LXC_HOSTNAME +Defines the hostname of your LXC container +```bash +LXC_SWAP="zamba" +``` +### LXC_DOMAIN +Defines the domain name / search domain of your LXC container +```bash +LXC_DOMAIN="zmb.rocks" +``` +### LXC_DHCP +Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false] +```bash +LXC_DHCP=false +``` +### LXC_IP +Defines the local IP address and subnet of your LXC container in CIDR format +```bash +LXC_IP="10.10.80.20/24" +``` +### LXC_GW +Defines the default gateway IP address of your LXC container +```bash +LXC_GW="10.10.80.254" +``` +### LXC_DNS +Defines the DNS server ip address of your LXC container +```bash +LXC_DNS="10.10.80.254" +``` +`zmb-ad` used this DNS server for installation, after installation and domain provisioning it will be used as forwarding DNS +For other services this should be your active directory domain controller (if present, else a DNS server of your choice) +### LXC_BRIDGE +Defines the network bridge to bind the network adapter of your LXC container +```bash +LXC_BRIDGE="vmbr0" +``` +### LXC_VLAN +Defines the vlan id of the LXC container's network interface, if the network adapter should be connected untagged, just leave the value empty. +```bash +LXC_VLAN="80" +``` +### LXC_PWD +Defines the `root` password of your LXC container. Please use 'single quotation marks' to avoid unexpected behaviour. +```bash +LXC_PWD="S3cr3tp@ssw0rd" +``` +### LXC_AUTHORIZED_KEY +Defines an authorized_keys file to push into the LXC container. +By default the authorized_keys will be inherited from your proxmox host. +```bash +LXC_AUTHORIZED_KEY="/root/.ssh/authorized_keys" +``` +### LXC_TOOLSET +Define your (administrative) tools, you always want to have installed into your LXC container +```bash +LXC_TOOLSET="vim htop net-tools dnsutils mc sysstat lsb-release curl git gnupg2 apt-transport-https" +``` +### LXC_TIMEZONE +Define the local timezone of your LXC container (default: Euroe/Berlin) +```bash +LXC_TIMEZONE="Europe/Berlin" +``` +### LXC_LOCALE +Define system language on LXC container (locales) +```bash +LXC_LOCALE="de_DE.utf8" +``` +This parameter is not used yet, but will be integrated in future releases. +
+ +## Zamba Server Section +This section configures the Zamba server (AD DC, AD member and standalone) +
+ +### ZMB_REALM +Defines the REALM for the Active Directory (AD DC, AD member) +```bash +ZMB_REALM="ZMB.ROCKS" +``` +### ZMB_DOMAIN +Defines the domain name in your Active Directory or Workgroup (AD DC, AD member, standalone) +```bash +ZMB_DOMAIN="ZMB" +``` +### ZMB_DNS_BACKEND +Defines the desired DNS server backend, supported are `SAMBA_INTERNAL` and `BIND9_DLZ` for more advanced usage +```bash +ZMB_DNS_BACKEND="SAMBA_INTERNAL" +``` +### ZMB_ADMIN_USER +Defines the name of your domain administrator account (AD DC, AD member, standalone) +```bash +ZMB_ADMIN_USER="Administrator" +``` +### ZMB_ADMIN_PASS +Defines the domain administrator's password (AD DC, AD member). +```bash +ZMB_ADMIN_PASS='1c@nd0@nyth1n9' +``` +Please use 'single quotation marks' to avoid unexpected behaviour. +`zmb-ad` domain administrator has to meet the password complexity policy, if password is too weak, domain provisioning will fail. +### ZMB_SHARE +Defines the name of your Zamba share +```bash +ZMB_SHARE="share" +``` +
+ +## Mailpiler section +This section configures the mailpiler email archive +
+ +### PILER_FQDN +Defines the (public) FQDN of your piler mail archive +```bash +PILER_FQDN="piler.zmb.rocks" +``` +### PILER_SMARTHOST +Defines the smarthost for piler mail archive +```bash +PILER_SMARTHOST="10.10.80.20" +``` +### PILER_VERSION +Defines the version number of piler mail archive to install +```bash +PILER_VERSION="1.3.10" +``` +### PILER_SPHINX_VERSION +Defines the version of sphinx to install +```bash +PILER_SPHINX_VERSION="3.3.1" +``` +### PILER_PHP_VERSION +Defines the php version to install +```bash +PILER_PHP_VERSION="7.4" +``` +
+ +## Matrix section +This section configures the matrix chat server +
+ +### MATRIX_FQDN +Define the FQDN of your Matrix server +```bash +MATRIX_FQDN="matrix.zmb.rocks" +``` + +### MATRIX_ELEMENT_FQDN +Define the FQDN for the Element Web virtual host +```bash +MATRIX_ELEMENT_FQDN="element.zmb.rocks" +``` +### MATRIX_ELEMENT_VERSION +Define the version of Element Web +```bash +MATRIX_ELEMENT_VERSION="v1.7.24" +``` +### MATRIX_JITSI_FQDN +Define the FQDN for the Jitsi Meet virtual host +```bash +MATRIX_JITSI_FQDN="meet.zmb.rocks" +``` \ No newline at end of file diff --git a/zamba.conf.md b/zamba.conf.md deleted file mode 100644 index a4c3114..0000000 --- a/zamba.conf.md +++ /dev/null @@ -1,214 +0,0 @@ -# `zamba.conf` options reference -This is the reference of all config options you can set in `zamba.conf` -
- -## Linux Container Section -In this section all settings relevant for the LXC container. -
- -### LXC_TEMPLATE_STORAGE -Defines the Proxmox storage where your LXC container template are stored (default: local) -```bash -LXC_TEMPLATE_STORAGE="local" -``` -### LXC_ROOTFS_SIZE -Defines the size in GB of the LXC container's root filesystem (default: 32) -```bash -LXC_ROOTFS_SIZE="32" -``` -Depending on your environment, you should consider increasing the size for use of `mailpiler` or `matrix`. -### LXC_ROOTFS_STORAGE -Defines the Proxmox storage where your LXC container's root filesystem will be generated (default: local-zfs) -```bash -LXC_ROOTFS_STORAGE="local-zfs" -``` -### LXC_SHAREFS_SIZE -Defines the size in GB your LXC container's filesystem shared by Zamba (AD member & standalone) (default: 100) -```bash -LXC_SHAREFS_SIZE="100" -``` -### LXC_SHAREFS_STORAGE -Defines the Proxmox storage where your LXC container's filesystem shared by Zamba will be generated (default: local-zfs) -```bash -LXC_SHAREFS_STORAGE="local-zfs" -``` -### LXC_SHAREFS_MOUNTPOINT -Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank) -```bash -LXC_SHAREFS_MOUNTPOINT="tank" -``` -### LXC_MEM -Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024) -```bash -LXC_MEM="1024" -``` -### LXC_SWAP -Defines the amount of swap space in MB your LXC container is allowed to use (default: 1024) -```bash -LXC_SWAP="1024" -``` -### LXC_HOSTNAME -Defines the hostname of your LXC container -```bash -LXC_SWAP="zamba" -``` -### LXC_DOMAIN -Defines the domain name / search domain of your LXC container -```bash -LXC_DOMAIN="zmb.rocks" -``` -### LXC_DHCP -Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false] -```bash -LXC_DHCP=false -``` -### LXC_IP -Defines the local IP address and subnet of your LXC container in CIDR format -```bash -LXC_IP="10.10.80.20/24" -``` -### LXC_GW -Defines the default gateway IP address of your LXC container -```bash -LXC_GW="10.10.80.254" -``` -### LXC_DNS -Defines the DNS server ip address of your LXC container -```bash -LXC_DNS="10.10.80.254" -``` -`zmb-ad` used this DNS server for installation, after installation and domain provisioning it will be used as forwarding DNS -For other services this should be your active directory domain controller (if present, else a DNS server of your choice) -### LXC_BRIDGE -Defines the network bridge to bind the network adapter of your LXC container -```bash -LXC_BRIDGE="vmbr0" -``` -### LXC_VLAN -Defines the vlan id of the LXC container's network interface, if the network adapter should be connected untagged, just leave the value empty. -```bash -LXC_VLAN="80" -``` -### LXC_PWD -Defines the `root` password of your LXC container. Please use 'single quotation marks' to avoid unexpected behaviour. -```bash -LXC_PWD="S3cr3tp@ssw0rd" -``` -### LXC_AUTHORIZED_KEY -Defines an authorized_keys file to push into the LXC container. -By default the authorized_keys will be inherited from your proxmox host. -```bash -LXC_AUTHORIZED_KEY="/root/.ssh/authorized_keys" -``` -### LXC_TOOLSET -Define your (administrative) tools, you always want to have installed into your LXC container -```bash -LXC_TOOLSET="vim htop net-tools dnsutils mc sysstat lsb-release curl git gnupg2 apt-transport-https" -``` -### LXC_TIMEZONE -Define the local timezone of your LXC container (default: Euroe/Berlin) -```bash -LXC_TIMEZONE="Europe/Berlin" -``` -### LXC_LOCALE -Define system language on LXC container (locales) -```bash -LXC_LOCALE="de_DE.utf8" -``` -This parameter is not used yet, but will be integrated in future releases. -
- -## Zamba Server Section -This section configures the Zamba server (AD DC, AD member and standalone) -
- -### ZMB_REALM -Defines the REALM for the Active Directory (AD DC, AD member) -```bash -ZMB_REALM="ZMB.ROCKS" -``` -### ZMB_DOMAIN -Defines the domain name in your Active Directory or Workgroup (AD DC, AD member, standalone) -```bash -ZMB_DOMAIN="ZMB" -``` -### ZMB_DNS_BACKEND -Defines the desired DNS server backend, supported are `SAMBA_INTERNAL` and `BIND9_DLZ` for more advanced usage -```bash -ZMB_DNS_BACKEND="SAMBA_INTERNAL" -``` -### ZMB_ADMIN_USER -Defines the name of your domain administrator account (AD DC, AD member, standalone) -```bash -ZMB_ADMIN_USER="Administrator" -``` -### ZMB_ADMIN_PASS -Defines the domain administrator's password (AD DC, AD member). -```bash -ZMB_ADMIN_PASS='1c@nd0@nyth1n9' -``` -Please use 'single quotation marks' to avoid unexpected behaviour. -`zmb-ad` domain administrator has to meet the password complexity policy, if password is too weak, domain provisioning will fail. -### ZMB_SHARE -Defines the name of your Zamba share -```bash -ZMB_SHARE="share" -``` -
- -## Mailpiler section -This section configures the mailpiler email archive -
- -### PILER_FQDN -Defines the (public) FQDN of your piler mail archive -```bash -PILER_FQDN="piler.zmb.rocks" -``` -### PILER_SMARTHOST -Defines the smarthost for piler mail archive -```bash -PILER_SMARTHOST="10.10.80.20" -``` -### PILER_VERSION -Defines the version number of piler mail archive to install -```bash -PILER_VERSION="1.3.10" -``` -### PILER_SPHINX_VERSION -Defines the version of sphinx to install -```bash -PILER_SPHINX_VERSION="3.3.1" -``` -### PILER_PHP_VERSION -Defines the php version to install -```bash -PILER_PHP_VERSION="7.4" -``` -
- -## Matrix section -This section configures the matrix chat server -
- -### MATRIX_FQDN -Define the FQDN of your Matrix server -```bash -MATRIX_FQDN="matrix.zmb.rocks" -``` - -### MATRIX_ELEMENT_FQDN -Define the FQDN for the Element Web virtual host -```bash -MATRIX_ELEMENT_FQDN="element.zmb.rocks" -``` -### MATRIX_ELEMENT_VERSION -Define the version of Element Web -```bash -MATRIX_ELEMENT_VERSION="v1.7.24" -``` -### MATRIX_JITSI_FQDN -Define the FQDN for the Jitsi Meet virtual host -```bash -MATRIX_JITSI_FQDN="meet.zmb.rocks" -``` \ No newline at end of file From 5ad07c9a06c22ca00aa5c8a10d3c0ec265ebd38b Mon Sep 17 00:00:00 2001 From: Patrick G <38922528+diddip21@users.noreply.github.com> Date: Fri, 6 Aug 2021 22:23:12 +0200 Subject: [PATCH 07/11] Update README.md --- conf/README.md | 82 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/conf/README.md b/conf/README.md index fcdf540..889863c 100644 --- a/conf/README.md +++ b/conf/README.md @@ -51,7 +51,7 @@ LXC_SWAP="1024" ### LXC_HOSTNAME Defines the hostname of your LXC container ```bash -LXC_SWAP="zamba" +LXC_HOSTNAME="${service}.zmbrocks" ``` ### LXC_DOMAIN Defines the domain name / search domain of your LXC container @@ -104,7 +104,7 @@ LXC_AUTHORIZED_KEY="/root/.ssh/authorized_keys" ### LXC_TOOLSET Define your (administrative) tools, you always want to have installed into your LXC container ```bash -LXC_TOOLSET="vim htop net-tools dnsutils mc sysstat lsb-release curl git gnupg2 apt-transport-https" +LXC_TOOLSET="vim htop net-tools dnsutils sysstat mc" ``` ### LXC_TIMEZONE Define the local timezone of your LXC container (default: Euroe/Berlin) @@ -113,11 +113,14 @@ LXC_TIMEZONE="Europe/Berlin" ``` ### LXC_LOCALE Define system language on LXC container (locales) +With this paramater you can generate additional locales, the default language will be inherited from proxmox host. ```bash -LXC_LOCALE="de_DE.utf8" +LXC_LOCALE="en_US.UTF-8"" +``` +### Set dark background for vim syntax highlighting (0 or 1) +```bash +LXC_VIM_BG_DARK=1 ``` -This parameter is not used yet, but will be integrated in future releases. -
## Zamba Server Section This section configures the Zamba server (AD DC, AD member and standalone) @@ -133,11 +136,6 @@ Defines the domain name in your Active Directory or Workgroup (AD DC, AD member, ```bash ZMB_DOMAIN="ZMB" ``` -### ZMB_DNS_BACKEND -Defines the desired DNS server backend, supported are `SAMBA_INTERNAL` and `BIND9_DLZ` for more advanced usage -```bash -ZMB_DNS_BACKEND="SAMBA_INTERNAL" -``` ### ZMB_ADMIN_USER Defines the name of your domain administrator account (AD DC, AD member, standalone) ```bash @@ -171,21 +169,6 @@ Defines the smarthost for piler mail archive ```bash PILER_SMARTHOST="10.10.80.20" ``` -### PILER_VERSION -Defines the version number of piler mail archive to install -```bash -PILER_VERSION="1.3.10" -``` -### PILER_SPHINX_VERSION -Defines the version of sphinx to install -```bash -PILER_SPHINX_VERSION="3.3.1" -``` -### PILER_PHP_VERSION -Defines the php version to install -```bash -PILER_PHP_VERSION="7.4" -```
## Matrix section @@ -208,8 +191,49 @@ Define the version of Element Web ```bash MATRIX_ELEMENT_VERSION="v1.7.24" ``` -### MATRIX_JITSI_FQDN -Define the FQDN for the Jitsi Meet virtual host + +## Nextcloud Section +This section configures the nextcloud server +
+ +### Define the FQDN of your Nextcloud server ```bash -MATRIX_JITSI_FQDN="meet.zmb.rocks" -``` \ No newline at end of file +NEXTCLOUD_FQDN="nc1.zmb.rocks" +``` + +### The initial admin-user which will be configured +```bash +NEXTCLOUD_ADMIN_USR="zmb-admin" +``` + +### Build a strong password for this user. Username and password will shown at the end of the instalation. +```bash +NEXTCLOUD_ADMIN_PWD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" +``` +### Defines the data directory, which will be createt under LXC_SHAREFS_MOUNTPOINT +```bash +NEXTCLOUD_DATA="nc_data" +``` +### Defines the trusted reverse proxy, which will enable the detection of source ip to fail2ban +```bash +NEXTCLOUD_REVPROX="192.168.100.254" +``` +## Check_MK Section +This section configures the checkmk server +
+ +### Define the name of your checkmk instance +```bash +CMK_INSTANCE=zmbrocks +``` + +### Define the password of user 'cmkadmin' +```bash +CMK_ADMIN_PW='Ju5t@n0thers3cur3p@ssw0rd' +``` +### checkmk edition (raw or free) +#### raw = completely free +#### free = limited version of the enterprise edition (25 hosts, 1 instance) +```bash +CMK_EDITION=raw +``` From 6583b0daad55e0e2ec9fdcb758ee4c918adc87bb Mon Sep 17 00:00:00 2001 From: Patrick G <38922528+diddip21@users.noreply.github.com> Date: Fri, 6 Aug 2021 22:25:41 +0200 Subject: [PATCH 08/11] Update zamba.conf.example --- conf/zamba.conf.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/zamba.conf.example b/conf/zamba.conf.example index 65fcce2..a429b21 100644 --- a/conf/zamba.conf.example +++ b/conf/zamba.conf.example @@ -73,7 +73,7 @@ LXC_TOOLSET="vim htop net-tools dnsutils sysstat mc" LXC_TIMEZONE="Europe/Berlin" # Define system language on LXC container (locales) -# With thi paramater you can generate additional locales, the default language will be inherited from proxmox host. +# With this paramater you can generate additional locales, the default language will be inherited from proxmox host. LXC_LOCALE="en_US.UTF-8" # Set dark background for vim syntax highlighting (0 or 1) @@ -112,7 +112,7 @@ MATRIX_ELEMENT_FQDN="element.zmb.rocks" ############### Nextcloud-Section ############### -# Define the FQDN of your Matrix server +# Define the FQDN of your Nextcloud server NEXTCLOUD_FQDN="nc1.zmb.rocks" # The initial admin-user which will be configured From 510bdbb1a66ed80575735c983d334eff5e2b5404 Mon Sep 17 00:00:00 2001 From: Patrick Greiner Date: Sat, 7 Aug 2021 18:24:56 +0200 Subject: [PATCH 09/11] set LXC_HOSTNAME to service name set lxc_locale german --- conf/zamba.conf.example | 6 ++++-- install.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/zamba.conf.example b/conf/zamba.conf.example index a429b21..2885a7e 100644 --- a/conf/zamba.conf.example +++ b/conf/zamba.conf.example @@ -34,7 +34,7 @@ LXC_MEM="1024" LXC_SWAP="1024" # Defines the hostname of your LXC container -LXC_HOSTNAME="${service}.zmbrocks" +LXC_HOSTNAME="${service}" # Defines the domain name / search domain of your LXC container LXC_DOMAIN="zmb.rocks" @@ -74,7 +74,9 @@ LXC_TIMEZONE="Europe/Berlin" # Define system language on LXC container (locales) # With this paramater you can generate additional locales, the default language will be inherited from proxmox host. -LXC_LOCALE="en_US.UTF-8" +# en_US.UTF-8 english +# de_DE.UTF-8 german (default) +LXC_LOCALE="de_DE.UTF-8" # Set dark background for vim syntax highlighting (0 or 1) LXC_VIM_BG_DARK=1 diff --git a/install.sh b/install.sh index 245cf78..b0b58e6 100644 --- a/install.sh +++ b/install.sh @@ -152,7 +152,7 @@ if [[ $LXC_VLAN != "" ]];then VLAN=",tag=$LXC_VLAN"; else VLAN=""; fi PVE_VER=$(pveversion | grep 'pve-manager' | cut -d'/' -f2 | sed 's/[^0-9]//g') pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME -onboot 1 -features nesting=$LXC_NESTING; # timezone switch added in Version 6.3 -if [ $PVE_VER -gt 630 ];then pct set $LXC_NBR -timezone $LXC_TIMEZONE;fi +if [ $PVE_VER -ge 630 ];then pct set $LXC_NBR -timezone $LXC_TIMEZONE;fi if [ $LXC_DHCP == true ]; then pct set $LXC_NBR -net0 name=eth0,bridge=$LXC_BRIDGE,ip=dhcp,type=veth$VLAN; else From 0cac5584eff95f73957933c021ce2f652b7d0f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Pannenb=C3=A4cker?= Date: Fri, 13 Aug 2021 11:01:18 +0200 Subject: [PATCH 10/11] Update install-service.sh Fixed a typo. --- src/open3a/install-service.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/open3a/install-service.sh b/src/open3a/install-service.sh index 00c5cc8..9fdef53 100644 --- a/src/open3a/install-service.sh +++ b/src/open3a/install-service.sh @@ -43,7 +43,7 @@ unzip open3a.zip rm open3a.zip chmod 666 system/DBData/Installation.pfdb.php chmod -R 777 specifics/ -chmod -R 777 system/Backups +chmod -R 777 system/Backup chown -R www-data:www-data /var/www/html echo "sudo -u www-data /usr/bin/php /var/www/html/plugins/Installation/backup.php; for backup in $(ls -r1 /var/www/html/system/Backup/*.gz | /bin/grep -v $(date +%Y%m%d)); do /bin/rm $backup;done" > /etc/cron.daily/open3a-backup @@ -52,4 +52,4 @@ chmod +x /etc/cron.daily/open3a-backup systemctl enable --now php7.3-fpm systemctl restart nginx -echo -e "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" \ No newline at end of file +echo -e "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" From 57e3b458a95edaad7e091df5bb99dc237b9384c9 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Fri, 13 Aug 2021 15:13:38 +0200 Subject: [PATCH 11/11] Revert "Update install-service.sh" --- src/open3a/install-service.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/open3a/install-service.sh b/src/open3a/install-service.sh index 9fdef53..00c5cc8 100644 --- a/src/open3a/install-service.sh +++ b/src/open3a/install-service.sh @@ -43,7 +43,7 @@ unzip open3a.zip rm open3a.zip chmod 666 system/DBData/Installation.pfdb.php chmod -R 777 specifics/ -chmod -R 777 system/Backup +chmod -R 777 system/Backups chown -R www-data:www-data /var/www/html echo "sudo -u www-data /usr/bin/php /var/www/html/plugins/Installation/backup.php; for backup in $(ls -r1 /var/www/html/system/Backup/*.gz | /bin/grep -v $(date +%Y%m%d)); do /bin/rm $backup;done" > /etc/cron.daily/open3a-backup @@ -52,4 +52,4 @@ chmod +x /etc/cron.daily/open3a-backup systemctl enable --now php7.3-fpm systemctl restart nginx -echo -e "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" +echo -e "Your open3a installation is now complete. Please continue with setup in your Browser:\nURL:\t\thttp://$LXC_IP\nLogin:\t\tAdmin\nPassword:\tAdmin\n\nMysql-Settings:\nServer:\t\tlocalhost\nUser:\t\topen3a\nPassword:\t$MYSQL_PASSWORD\nDatabase:\topen3a" \ No newline at end of file