From 867739b9e7b32717049d4371afc39cd9f5fddac9 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 20 Mar 2025 14:56:32 -0400 Subject: [PATCH 01/12] initial install for openziti tunnel --- ct/headers/openziti-tunnel | 7 ++++ ct/openziti-tunnel.sh | 42 +++++++++++++++++++ frontend/public/json/openziti-tunnel.json | 43 +++++++++++++++++++ install/openziti-tunnel-install.sh | 50 +++++++++++++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 ct/headers/openziti-tunnel create mode 100644 ct/openziti-tunnel.sh create mode 100644 frontend/public/json/openziti-tunnel.json create mode 100644 install/openziti-tunnel-install.sh diff --git a/ct/headers/openziti-tunnel b/ct/headers/openziti-tunnel new file mode 100644 index 0000000..8736354 --- /dev/null +++ b/ct/headers/openziti-tunnel @@ -0,0 +1,7 @@ + + .__ __ .__ + ____ ______ ____ ____ _______|__|/ |_|__| + / _ \\____ \_/ __ \ / \\___ / \ __\ | +( <_> ) |_> > ___/| | \/ /| || | | | + \____/| __/ \___ >___| /_____ \__||__| |__| + |__| \/ \/ \/ diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh new file mode 100644 index 0000000..a1b9baa --- /dev/null +++ b/ct/openziti-tunnel.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: openziti +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.openziti.io + +APP="openziti-tunnel" +var_tags="network;openziti-tunnel" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file diff --git a/frontend/public/json/openziti-tunnel.json b/frontend/public/json/openziti-tunnel.json new file mode 100644 index 0000000..279c1a0 --- /dev/null +++ b/frontend/public/json/openziti-tunnel.json @@ -0,0 +1,43 @@ +{ + "name": "openziti-tunnel", + "slug": "openziti-tunnel", + "categories": [ + 4 + ], + "date_created": "2025-03-20", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": null, + "documentation": "https://openziti.io/docs/reference/tunnelers/docker/", + "website": "https://www.openziti.io/", + "logo": "https://raw.githubusercontent.com/openziti/ziti-doc/main/docusaurus/static/img/ziti-logo-dark.svg", + "description": "OpenZiti is an open-source, zero trust networking platform that enables secure connectivity between applications, services, and devices. It provides secure, encrypted connections between clients and services, and can be used to create secure, zero trust networks.", + "install_methods": [ + { + "type": "default", + "script": "ct/openziti.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "The Openziti tunnel is installed in host mode; please see documentation for more information", + "type": "info" + }, + { + "text": "Openziti tunnel prompts for identity enrollment token during installation", + "type": "info" + } + ] +} diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh new file mode 100644 index 0000000..a53a9c7 --- /dev/null +++ b/install/openziti-tunnel-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: openziti +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.openziti.io + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y mc +$STD apt-get install -y gpg +msg_ok "Installed Dependencies" + +msg_info "Installing openziti" +mkdir -p --mode=0755 /usr/share/keyrings +curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg +echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" > /etc/apt/sources.list.d/openziti.list +$STD apt-get update +$STD apt-get install -y ziti-edge-tunnel +sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service +systemctl daemon-reload +msg_ok "Installed openziti" + +read -r -p "Please paste an identity enrollment token(JTW)" prompt +if [[ ${prompt} ]]; then + msg_info "Adding identity" + echo "${prompt}" > /opt/openziti/etc/identities/identity.jwt + chown ziti:ziti /opt/openziti/etc/identities/identity.jwt + systemctl enable -q --now ziti-edge-tunnel.service + msg_ok "Service Started" +else + systemctl enable ziti-edge-tunnel.service + msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" +fi + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 279efd931bf0306f77af43d262635636969fdb1f Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 20 Mar 2025 16:28:07 -0400 Subject: [PATCH 02/12] remove pre-created header --- ct/headers/openziti-tunnel | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 ct/headers/openziti-tunnel diff --git a/ct/headers/openziti-tunnel b/ct/headers/openziti-tunnel deleted file mode 100644 index 8736354..0000000 --- a/ct/headers/openziti-tunnel +++ /dev/null @@ -1,7 +0,0 @@ - - .__ __ .__ - ____ ______ ____ ____ _______|__|/ |_|__| - / _ \\____ \_/ __ \ / \\___ / \ __\ | -( <_> ) |_> > ___/| | \/ /| || | | | - \____/| __/ \___ >___| /_____ \__||__| |__| - |__| \/ \/ \/ From 208cf0e71cdf18166f7ce610581ad22a86b0b9d1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 20 Mar 2025 21:39:35 +0100 Subject: [PATCH 03/12] Update install/openziti-tunnel-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/openziti-tunnel-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index a53a9c7..2b5bee4 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -34,7 +34,7 @@ if [[ ${prompt} ]]; then msg_info "Adding identity" echo "${prompt}" > /opt/openziti/etc/identities/identity.jwt chown ziti:ziti /opt/openziti/etc/identities/identity.jwt - systemctl enable -q --now ziti-edge-tunnel.service + systemctl enable -q --now ziti-edge-tunnel msg_ok "Service Started" else systemctl enable ziti-edge-tunnel.service From fa1bbf56552cb8eb2db1595304a21a6950226452 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:45:35 -0400 Subject: [PATCH 04/12] Update install/openziti-tunnel-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/openziti-tunnel-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 2b5bee4..d840524 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -37,7 +37,7 @@ if [[ ${prompt} ]]; then systemctl enable -q --now ziti-edge-tunnel msg_ok "Service Started" else - systemctl enable ziti-edge-tunnel.service + systemctl enable -q ziti-edge-tunnel msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" fi From 696424270237abd99c3173185413be85a7d7af85 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:45:54 -0400 Subject: [PATCH 05/12] Update install/openziti-tunnel-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/openziti-tunnel-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index d840524..398910f 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -3,7 +3,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: openziti # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.openziti.io +# Source: https://github.com/openziti/ziti source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color From abf26137123d5d193a7b3d735057488084c36213 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:46:37 -0400 Subject: [PATCH 06/12] Update frontend/public/json/openziti-tunnel.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/openziti-tunnel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/openziti-tunnel.json b/frontend/public/json/openziti-tunnel.json index 279c1a0..54394c5 100644 --- a/frontend/public/json/openziti-tunnel.json +++ b/frontend/public/json/openziti-tunnel.json @@ -16,7 +16,7 @@ "install_methods": [ { "type": "default", - "script": "ct/openziti.sh", + "script": "ct/openziti-tunnel.sh", "resources": { "cpu": 1, "ram": 512, From 77c8717ba9ea53c87dcb0a05f5061b9211b5073a Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 20 Mar 2025 16:54:22 -0400 Subject: [PATCH 07/12] switch updateable attribute in frontend to true --- frontend/public/json/openziti-tunnel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/openziti-tunnel.json b/frontend/public/json/openziti-tunnel.json index 54394c5..59fc450 100644 --- a/frontend/public/json/openziti-tunnel.json +++ b/frontend/public/json/openziti-tunnel.json @@ -6,7 +6,7 @@ ], "date_created": "2025-03-20", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": null, "documentation": "https://openziti.io/docs/reference/tunnelers/docker/", From 6833afde7e833a9960c980a458d46fcdf26029af Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:56:28 -0400 Subject: [PATCH 08/12] Update ct/openziti-tunnel.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/openziti-tunnel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index a1b9baa..a447d64 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -3,7 +3,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # Copyright (c) 2021-2025 community-scripts ORG # Author: openziti # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.openziti.io +# Source: https://github.com/openziti/ziti APP="openziti-tunnel" var_tags="network;openziti-tunnel" From e14466eaddc62fab85b61beea3d9adf85fc8b594 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:56:56 -0400 Subject: [PATCH 09/12] Update ct/openziti-tunnel.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/openziti-tunnel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index a447d64..6c8ee71 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: openziti # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 71c8e009929d635a380a03661f449e43c8be2c54 Mon Sep 17 00:00:00 2001 From: Edward Moscardini <57814088+emoscardini@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:57:35 -0400 Subject: [PATCH 10/12] Update install/openziti-tunnel-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/openziti-tunnel-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 398910f..adbc37f 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -14,9 +14,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y mc -$STD apt-get install -y gpg +$STD apt-get install -y \ + curl \ + mc \ + gpg msg_ok "Installed Dependencies" msg_info "Installing openziti" From ed5553388c5f80c0292f025550a240db57f6ac93 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 20 Mar 2025 16:58:52 -0400 Subject: [PATCH 11/12] switch authors --- ct/openziti-tunnel.sh | 2 +- install/openziti-tunnel-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/openziti-tunnel.sh b/ct/openziti-tunnel.sh index 6c8ee71..87265c9 100644 --- a/ct/openziti-tunnel.sh +++ b/ct/openziti-tunnel.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: openziti +# Author: emoscardini # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/openziti/ziti diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index adbc37f..5cac90a 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: openziti +# Author: emoscardini # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/openziti/ziti From f4dc996ffa9c10f8d98991fa76ee41fbc60a7e80 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 20 Mar 2025 17:16:51 -0400 Subject: [PATCH 12/12] add install_core_deps; remove curl mc from dependecies --- install/openziti-tunnel-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index 5cac90a..9549f61 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -12,12 +12,10 @@ catch_errors setting_up_container network_check update_os +install_core_deps msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - mc \ - gpg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing openziti"