From d524353b3f6b478fe8e8b79c79ac3666d8e9680e Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 6 Oct 2021 00:37:17 +0000 Subject: [PATCH] Added Tvheadend and mqtt CT --- CT-Build/Alpine.Jenkinsfile | 2 +- CT-Build/Alpine.yaml | 17 +++++++++++++ CT-Build/Debian.Jenkinsfile | 2 +- CT-Build/Debian.yaml | 36 ++++++++++++++++++++++++++-- CT-Files/mqtt/Configs/mosquitto.conf | 4 ++++ CT-Files/mqtt/Scripts/Init.sh | 8 +++++++ CT-Files/nodered/Scripts/Init.sh | 2 +- Readme.md | 13 ++++++++-- 8 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 CT-Files/mqtt/Configs/mosquitto.conf create mode 100644 CT-Files/mqtt/Scripts/Init.sh diff --git a/CT-Build/Alpine.Jenkinsfile b/CT-Build/Alpine.Jenkinsfile index 5827f04..edb6853 100644 --- a/CT-Build/Alpine.Jenkinsfile +++ b/CT-Build/Alpine.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' , 'z2mqtt' , 'nodered' , 'nodejs' ] +String[] ImgVariantList = ['minimal', 'default' , 'gitea' , 'nginx' , 'ddns' , 'transfersh' , 'iscsi' , 'z2mqtt' , 'nodered' , 'nodejs' , 'mqtt' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Alpine.yaml b/CT-Build/Alpine.yaml index cc227b2..d79edaf 100644 --- a/CT-Build/Alpine.yaml +++ b/CT-Build/Alpine.yaml @@ -324,6 +324,13 @@ files: variants: - nextcloud +#FileForMqtt +- path: /opt/Setup + generator: copy + source: CT-Files/mqtt + variants: + - mqtt + packages: manager: apk update: true @@ -444,6 +451,14 @@ packages: variants: - nextcloud +#PKGS for mqtt broker + - packages: + - mosquitto + - mosquitto-clients + action: install + variants: + - mqtt + repositories: - name: /etc/apk/repositories url: |- @@ -513,7 +528,9 @@ actions: - z2mqtt - nodered - nextcloud + - mqtt +# Enable service for iscsi CT - trigger: post-files action: |- #!/bin/sh diff --git a/CT-Build/Debian.Jenkinsfile b/CT-Build/Debian.Jenkinsfile index f7e11ad..42cecd5 100644 --- a/CT-Build/Debian.Jenkinsfile +++ b/CT-Build/Debian.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' , 'pihole' , 'collabora' , 'jellyfin' , 'domoticz' , 'omadaV3' , 'docker' ] +String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' , 'pihole' , 'collabora' , 'jellyfin' , 'domoticz' , 'omadaV3' , 'docker' , 'smb' , 'tvheadend' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Debian.yaml b/CT-Build/Debian.yaml index 6517934..de05acd 100644 --- a/CT-Build/Debian.yaml +++ b/CT-Build/Debian.yaml @@ -949,6 +949,7 @@ packages: - jellyfin - docker - smb + - tvheadend #Https Repo pkgs - packages: @@ -962,6 +963,7 @@ packages: - pihole - docker - smb + - tvheadend #Minimal pkgs - packages: @@ -1109,7 +1111,7 @@ packages: variants: - docker -#webin pkgs +#webmin pkgs - packages: - webmin action: install @@ -1128,6 +1130,12 @@ packages: variants: - smb +#Tvheadend pkgs + - packages: + - tvheadend + action: install + variants: + - tvheadend repositories: - name: sources.list @@ -1136,48 +1144,62 @@ packages: deb http://deb.debian.org/debian {{ image.release }}-updates main contrib deb http://security.debian.org {{ image.release }}-security main contrib +#Jenkins repo - name: jenkins.list url: |- deb [signed-by=/usr/share/keyrings/jenkins-keyring.gpg] https://pkg.jenkins.io/debian-stable binary/ variants: - jenkins +#Mysql Repo - name: mysql.list url: |- deb [signed-by=/usr/share/keyrings/mysql-archive-keyring.gpg arch=amd64] http://repo.mysql.com/apt/debian/ {{ image.release }} mysql-8.0 variants: - mysql +#collabora CODE repo - name: collabora.list url: |- deb [signed-by=/usr/share/keyrings/collaboraonline-release-keyring.gpg arch=amd64] https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./ variants: - collabora +#Jellyfin repo - name: jellyfin.list url: |- deb [signed-by=/usr/share/keyrings/jellyfin-keyring.gpg] https://repo.jellyfin.org/debian {{ image.release }} main variants: - jellyfin +#Docker repo - name: docker.list url: |- deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg arch=amd64] https://download.docker.com/linux/debian {{ image.release }} stable variants: - docker +#Webmin repo - name: webmin.list url: |- deb [signed-by=/usr/share/keyrings/webmin-archive-keyring.gpg arch=amd64] http://download.webmin.com/download/repository sarge contrib variants: - smb +#WSDD (Web Services Dynamic Discovery) Repo - name: wsdd.list url: |- deb [signed-by=/usr/share/keyrings/wsdd-archive-keyring.gpg arch=amd64] https://pkg.ltec.ch/public/ {{ image.release }} main variants: - smb +#Tvheadend Repo + - name: tvheadend.list + url: |- + deb [signed-by=/usr/share/keyrings/tvheadend-archive-keyring.gpg arch=amd64] https://apt.tvheadend.org/unstable {{ image.release }} main + variants: + - tvheadend + actions: - trigger: post-unpack action: |- @@ -1281,7 +1303,7 @@ actions: variants: - docker -#MySQL Repo key +#MySQL Repo key and inital password - trigger: post-unpack action: |- #!/bin/bash @@ -1311,5 +1333,15 @@ actions: variants: - smb +#TvHeadend Repo key and inital username and password +- trigger: post-unpack + action: |- + #!/bin/bash + curl --retry 7 --retry-delay 5 -L -s https://doozer.io/keys/tvheadend/tvheadend/pgp | gpg --dearmor > /usr/share/keyrings/tvheadend-archive-keyring.gpg + debconf-set-selections <<< "tvheadend tvheadend/admin_username string setup" + debconf-set-selections <<< "tvheadend tvheadend/admin_password password setup" + variants: + - tvheadend + mappings: architecture_map: debian \ No newline at end of file diff --git a/CT-Files/mqtt/Configs/mosquitto.conf b/CT-Files/mqtt/Configs/mosquitto.conf new file mode 100644 index 0000000..ceed2eb --- /dev/null +++ b/CT-Files/mqtt/Configs/mosquitto.conf @@ -0,0 +1,4 @@ +listener 1883 +allow_anonymous true +persistence true +persistence_location /var/lib/mosquitto/ \ No newline at end of file diff --git a/CT-Files/mqtt/Scripts/Init.sh b/CT-Files/mqtt/Scripts/Init.sh new file mode 100644 index 0000000..15a38ce --- /dev/null +++ b/CT-Files/mqtt/Scripts/Init.sh @@ -0,0 +1,8 @@ +#!/bin/ash +#Update config +mkdir /var/lib/mosquitto/ +chown mosquitto:mosquitto /var/lib/mosquitto -R +mv /opt/Setup/Configs/mosquitto.conf /etc/mosquitto/mosquitto.conf + +#Enable service +rc-update add mosquitto \ No newline at end of file diff --git a/CT-Files/nodered/Scripts/Init.sh b/CT-Files/nodered/Scripts/Init.sh index 3629965..a9a52a6 100644 --- a/CT-Files/nodered/Scripts/Init.sh +++ b/CT-Files/nodered/Scripts/Init.sh @@ -18,7 +18,7 @@ sed -i -e 's#//credentialSecret: "a-secret-key",#credentialSecret: false,#g' /op EOF #Adding update scipt -mv /opt/Setup/Configs/Scripts/Update-NodeRed.sh /opt/Update-NodeRed.sh +mv /opt/Setup/Scripts/Update-NodeRed.sh /opt/Update-NodeRed.sh #Cleanup rm -rf /home/node/.npm/_cacache \ No newline at end of file diff --git a/Readme.md b/Readme.md index 5acd1e5..ea139bd 100644 --- a/Readme.md +++ b/Readme.md @@ -28,7 +28,8 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new | domoticz | Debian | Domoticz home automation service | | omadaV3 | Debian | TP-link Omada SDN controller(V3.2.14) | | docker | Debian | Docker container service | -| smb | Debian | Samba server | +| smb | Debian | Samba server | +| tvheadend | Debian | Tvheadend server | | gitea | Alpine | Gitea server | | nginx | Alpine | Nginx server for reverse-proxy use | | ddns | Alpine | DDNS client configured for OVH/OVH-Cloud | @@ -37,6 +38,7 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new | z2mqtt | Alpine | Mqtt bridges for Zigbee and ZWave | | nodered | Alpine | Node-Red | | nodejs | Alpine | Basic nodejs install with pm2 | +| mqtt | Alpine | Mosquitto mqtt broker | ## TODO **Begin original list** @@ -61,7 +63,8 @@ AptCacherNG MailBackup* ~FileShelter~ Not supported in debian 11 /transfer.sh As alternative -WS(x2go-xfce) + +WS(x2go-xfce) **End original list** @@ -172,6 +175,12 @@ lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=fi * Webmin avalible on http://`` * Samba server avalible +## tvheadend +**Do first login and setup wizzard in a incognito/Private window, since the authentication system can get confused after setting the new username** +* Tvheadend avalible on http://``:9981 +* Default credentials: setup/setup +* Follow the setup wizzard after login, otherwise authentication will be disabled + # Further CT documentation ## iscsi