diff --git a/ct/piler.sh b/ct/piler.sh index bfd2831c0..846db7d96 100644 --- a/ct/piler.sh +++ b/ct/piler.sh @@ -10,8 +10,8 @@ var_tags="${var_tags:-email;archive;smtp}" var_cpu="${var_cpu:-4}" var_ram="${var_ram:-4096}" var_disk="${var_disk:-20}" -var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-24.04}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" diff --git a/ct/thingsboard.sh b/ct/thingsboard.sh new file mode 100644 index 000000000..7fadb1892 --- /dev/null +++ b/ct/thingsboard.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thingsboard/thingsboard + +APP="ThingsBoard" +var_tags="${var_tags:-iot;platform}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /usr/share/thingsboard ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "thingsboard" "thingsboard/thingsboard"; then + msg_info "Stopping Service" + systemctl stop thingsboard + msg_ok "Stopped Service" + + fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb" + + msg_info "Running Database Upgrade" + $STD /usr/share/thingsboard/bin/install/upgrade.sh + msg_ok "Database Upgraded" + + msg_info "Starting Service" + systemctl start thingsboard + msg_ok "Started Service" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/frontend/public/json/thingsboard.json b/frontend/public/json/thingsboard.json new file mode 100644 index 000000000..5f38ad3ad --- /dev/null +++ b/frontend/public/json/thingsboard.json @@ -0,0 +1,48 @@ +{ + "name": "ThingsBoard", + "slug": "thingsboard", + "categories": [ + 7 + ], + "date_created": "2026-01-14", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://thingsboard.io/docs/", + "website": "https://thingsboard.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/thingsboard.webp", + "config_path": "/etc/thingsboard/conf/thingsboard.conf", + "description": "ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management. It enables device connectivity via industry standard IoT protocols - MQTT, CoAP and HTTP and supports both cloud and on-premises deployments.", + "install_methods": [ + { + "type": "default", + "script": "ct/thingsboard.sh", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 10, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "sysadmin@thingsboard.org", + "password": "sysadmin" + }, + "notes": [ + { + "text": "Please allow up to 90 seconds for the Web UI to start", + "type": "info" + }, + { + "text": "Additional demo accounts: tenant@thingsboard.org / tenant and customer@thingsboard.org / customer", + "type": "info" + }, + { + "text": "Change passwords for all accounts in the account profile page after first login", + "type": "warning" + } + ] +} diff --git a/install/piler-install.sh b/install/piler-install.sh index 42ce2d065..7ed5fc8e6 100644 --- a/install/piler-install.sh +++ b/install/piler-install.sh @@ -22,12 +22,12 @@ $STD apt install -y \ poppler-utils \ unrtf \ tnef \ - clamav \ - clamav-daemon \ memcached \ sysstat \ python3 \ - python3-mysqldb + python3-mysqldb \ + ca-certificates \ + gnupg msg_ok "Installed Dependencies" import_local_ip @@ -36,26 +36,17 @@ MARIADB_DB_NAME="piler" MARIADB_DB_USER="piler" setup_mysql_db PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap,gd,memcached,pdo,mysql,curl,zip" setup_php msg_info "Installing Manticore Search" -curl -fsSL https://repo.manticoresearch.com/manticore-repo.noarch.deb -o /tmp/manticore-repo.deb -$STD dpkg -i /tmp/manticore-repo.deb +cd /tmp +wget -q https://repo.manticoresearch.com/manticore-repo.noarch.deb +$STD dpkg -i /tmp/manticore-repo.noarch.deb $STD apt update -$STD apt install -y manticore manticore-extra -rm -f /tmp/manticore-repo.deb +$STD apt install -y manticore manticore-columnar-lib manticore-extra +rm -f /tmp/manticore-repo.noarch.deb +$STD systemctl stop manticore +$STD systemctl disable manticore msg_ok "Installed Manticore Search" -msg_info "Installing Piler" -VERSION="1.4.8" -cd /tmp -curl -fsSL "https://github.com/jsuto/piler/releases/download/piler-${VERSION}/piler_${VERSION}-bookworm_amd64.deb" -o piler.deb -curl -fsSL "https://github.com/jsuto/piler/releases/download/piler-${VERSION}/piler-webui_${VERSION}-bookworm_amd64.deb" -o piler-webui.deb - -$STD dpkg -i piler.deb -$STD apt-get -f install -y -$STD dpkg -i piler-webui.deb -$STD apt-get -f install -y - -rm -f piler.deb piler-webui.deb -msg_ok "Installed Piler v${VERSION}" +fetch_and_deploy_gh_release "piler" "jsuto/piler" "binary" "latest" "/tmp" "piler_*-noble-*_amd64.deb" msg_info "Configuring Piler Database" cd /usr/local/share/piler @@ -64,7 +55,6 @@ msg_ok "Configured Piler Database" msg_info "Configuring Piler" PILER_KEY=$(openssl rand -hex 16) - cat </etc/piler/piler.conf hostid=piler.${LOCAL_IP}.nip.io update_counters_to_memcached=1 diff --git a/install/thingsboard-install.sh b/install/thingsboard-install.sh new file mode 100644 index 000000000..4745b2fe9 --- /dev/null +++ b/install/thingsboard-install.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thingsboard/thingsboard + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y \ + libharfbuzz0b \ + fontconfig \ + fonts-dejavu-core +msg_ok "Installed Dependencies" + +JAVA_VERSION="17" setup_java +PG_VERSION="16" setup_postgresql +PG_DB_NAME="thingsboard_db" PG_DB_USER="thingsboard" setup_postgresql_db +fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb" + +msg_info "Configuring ThingsBoard" +cat >/etc/thingsboard/conf/thingsboard.conf <