From 9a08c87eadd49f4b912b5ad4ed0320c1206a900b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 6 Nov 2024 16:03:15 +0000 Subject: [PATCH 1/2] For a while we have had issues with the watchtower update process, removing this and recommending self-hosters go to the documentation to correctly update their install. --- hosting/docker-compose.yaml | 13 ----- .../builder/portal/settings/version.svelte | 52 ++++--------------- 2 files changed, 9 insertions(+), 56 deletions(-) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index c7a22eb2b3..214fc33c30 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -112,19 +112,6 @@ services: volumes: - redis_data:/data - watchtower-service: - restart: always - image: containrrr/watchtower - volumes: - - /var/run/docker.sock:/var/run/docker.sock - command: --debug --http-api-update bbapps bbworker bbproxy - environment: - - WATCHTOWER_HTTP_API=true - - WATCHTOWER_HTTP_API_TOKEN=budibase - - WATCHTOWER_CLEANUP=true - labels: - - "com.centurylinklabs.watchtower.enable=false" - volumes: couchdb3_data: driver: local diff --git a/packages/builder/src/pages/builder/portal/settings/version.svelte b/packages/builder/src/pages/builder/portal/settings/version.svelte index c3898b7861..032c077557 100644 --- a/packages/builder/src/pages/builder/portal/settings/version.svelte +++ b/packages/builder/src/pages/builder/portal/settings/version.svelte @@ -4,12 +4,10 @@ Layout, Heading, Body, - Button, Divider, notifications, Label, - Modal, - ModalContent, + Link, } from "@budibase/bbui" import { API } from "api" import { auth, admin } from "stores/portal" @@ -21,8 +19,6 @@ let githubVersion let githubPublishedDate let githubPublishedTime - let needsUpdate = true - let updateModal // Only admins allowed here $: { @@ -31,21 +27,6 @@ } } - async function updateBudibase() { - try { - notifications.info("Updating budibase..") - await fetch("/v1/update", { - headers: { - Authorization: "Bearer budibase", - }, - }) - notifications.success("Your budibase installation is up to date.") - getVersion() - } catch (err) { - notifications.error(`Error installing budibase update ${err}`) - } - } - async function getVersion() { try { version = await API.getBudibaseVersion() @@ -69,13 +50,6 @@ githubPublishedDate = new Date(githubResponse.published_at) githubPublishedTime = githubPublishedDate.toLocaleTimeString() githubPublishedDate = githubPublishedDate.toLocaleDateString() - - //Does Budibase need to be updated? - if (githubVersion === version) { - needsUpdate = false - } else { - needsUpdate = true - } } catch (error) { notifications.error("Error getting the latest Budibase version") githubVersion = null @@ -115,23 +89,15 @@ > -
- + Updating Budibase + To update your self-host installation, follow the docs found here. - - - Are you sure you want to update your budibase installation to the - latest version? - - -
+ {/if} {/if} From 4e27bb97f5f053ab8cfa778089eb5f2c289d4a8e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 6 Nov 2024 16:05:46 +0000 Subject: [PATCH 2/2] Updating hosting to remove references to watchtower. --- hosting/.env | 1 - hosting/docker-compose.build.yaml | 1 - hosting/docker-compose.yaml | 1 - hosting/envoy.yaml | 152 ------------------ hosting/hosting.properties | 3 +- hosting/portainer/template.json | 5 - hosting/proxy/Dockerfile | 1 - hosting/proxy/nginx.prod.conf | 5 - .../scripts/airgapped/airgappedDockerBuild.js | 3 +- 9 files changed, 2 insertions(+), 170 deletions(-) delete mode 100644 hosting/envoy.yaml diff --git a/hosting/.env b/hosting/.env index 173d409d04..23681f1f57 100644 --- a/hosting/.env +++ b/hosting/.env @@ -19,7 +19,6 @@ MINIO_PORT=4004 COUCH_DB_PORT=4005 COUCH_DB_SQS_PORT=4006 REDIS_PORT=6379 -WATCHTOWER_PORT=6161 BUDIBASE_ENVIRONMENT=PRODUCTION SQL_MAX_ROWS= diff --git a/hosting/docker-compose.build.yaml b/hosting/docker-compose.build.yaml index 1f16baa9e2..057d51a887 100644 --- a/hosting/docker-compose.build.yaml +++ b/hosting/docker-compose.build.yaml @@ -74,7 +74,6 @@ services: - WORKER_UPSTREAM_URL=http://worker-service:4003 - MINIO_UPSTREAM_URL=http://minio-service:9000 - COUCHDB_UPSTREAM_URL=http://couchdb-service:5984 - - WATCHTOWER_UPSTREAM_URL=http://watchtower-service:8080 - RESOLVER=127.0.0.11 depends_on: - minio-service diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 214fc33c30..ec24765149 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -87,7 +87,6 @@ services: - WORKER_UPSTREAM_URL=http://worker-service:4003 - MINIO_UPSTREAM_URL=http://minio-service:9000 - COUCHDB_UPSTREAM_URL=http://couchdb-service:5984 - - WATCHTOWER_UPSTREAM_URL=http://watchtower-service:8080 - RESOLVER=127.0.0.11 depends_on: - minio-service diff --git a/hosting/envoy.yaml b/hosting/envoy.yaml deleted file mode 100644 index d9f8384688..0000000000 --- a/hosting/envoy.yaml +++ /dev/null @@ -1,152 +0,0 @@ -static_resources: - listeners: - - name: main_listener - address: - socket_address: { address: 0.0.0.0, port_value: 10000 } - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - stat_prefix: ingress - codec_type: auto - route_config: - name: local_route - virtual_hosts: - - name: local_services - domains: ["*"] - routes: - - match: { prefix: "/app/" } - route: - cluster: app-service - prefix_rewrite: "/" - - - match: { path: "/v1/update" } - route: - cluster: watchtower-service - - - match: { prefix: "/builder/" } - route: - cluster: app-service - - - match: { prefix: "/builder" } - route: - cluster: app-service - - - match: { prefix: "/app_" } - route: - cluster: app-service - - # special cases for worker admin (deprecated), global and system API - - match: { prefix: "/api/global/" } - route: - cluster: worker-service - - - match: { prefix: "/api/admin/" } - route: - cluster: worker-service - - - match: { prefix: "/api/system/" } - route: - cluster: worker-service - - - match: { path: "/" } - route: - cluster: app-service - - # special case for when API requests are made, can just forward, not to minio - - match: { prefix: "/api/" } - route: - cluster: app-service - timeout: 120s - - - match: { prefix: "/worker/" } - route: - cluster: worker-service - prefix_rewrite: "/" - - - match: { prefix: "/db/" } - route: - cluster: couchdb-service - prefix_rewrite: "/" - - # minio is on the default route because this works - # best, minio + AWS SDK doesn't handle path proxy - - match: { prefix: "/" } - route: - cluster: minio-service - - http_filters: - - name: envoy.filters.http.router - - clusters: - - name: app-service - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: app-service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: app-service - port_value: 4002 - - - name: minio-service - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: minio-service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: minio-service - port_value: 9000 - - - name: worker-service - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: worker-service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: worker-service - port_value: 4003 - - - name: couchdb-service - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: couchdb-service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: couchdb-service - port_value: 5984 - - - name: watchtower-service - connect_timeout: 0.25s - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: watchtower-service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: watchtower-service - port_value: 8080 - diff --git a/hosting/hosting.properties b/hosting/hosting.properties index 6c1d9e5dbd..f63bb1941a 100644 --- a/hosting/hosting.properties +++ b/hosting/hosting.properties @@ -18,7 +18,6 @@ WORKER_PORT=4003 MINIO_PORT=4004 COUCH_DB_PORT=4005 REDIS_PORT=6379 -WATCHTOWER_PORT=6161 BUDIBASE_ENVIRONMENT=PRODUCTION # An admin user can be automatically created initially if these are set @@ -26,4 +25,4 @@ BB_ADMIN_USER_EMAIL= BB_ADMIN_USER_PASSWORD= # A path that is watched for plugin bundles. Any bundles found are imported automatically/ -PLUGINS_DIR= \ No newline at end of file +PLUGINS_DIR= diff --git a/hosting/portainer/template.json b/hosting/portainer/template.json index 29107b674e..4ca5b5e94f 100644 --- a/hosting/portainer/template.json +++ b/hosting/portainer/template.json @@ -78,11 +78,6 @@ "default": "6379", "preset": true }, - { - "name": "WATCHTOWER_PORT", - "default": "6161", - "preset": true - }, { "name": "BUDIBASE_ENVIRONMENT", "default": "PRODUCTION", diff --git a/hosting/proxy/Dockerfile b/hosting/proxy/Dockerfile index 42327be087..9ec458a219 100644 --- a/hosting/proxy/Dockerfile +++ b/hosting/proxy/Dockerfile @@ -22,5 +22,4 @@ ENV APPS_UPSTREAM_URL=http://app-service:4002 ENV WORKER_UPSTREAM_URL=http://worker-service:4003 ENV MINIO_UPSTREAM_URL=http://minio-service:9000 ENV COUCHDB_UPSTREAM_URL=http://couchdb-service:5984 -ENV WATCHTOWER_UPSTREAM_URL=http://watchtower-service:8080 ENV RESOLVER=127.0.0.11 diff --git a/hosting/proxy/nginx.prod.conf b/hosting/proxy/nginx.prod.conf index 59722dac5c..f18bae09a4 100644 --- a/hosting/proxy/nginx.prod.conf +++ b/hosting/proxy/nginx.prod.conf @@ -81,7 +81,6 @@ http { set $worker ${WORKER_UPSTREAM_URL}; set $minio ${MINIO_UPSTREAM_URL}; set $couchdb ${COUCHDB_UPSTREAM_URL}; - set $watchtower ${WATCHTOWER_UPSTREAM_URL}; location /health { access_log off; @@ -107,10 +106,6 @@ http { proxy_pass $apps; } - location = /v1/update { - proxy_pass $watchtower; - } - location ~ ^/(builder|app_) { proxy_http_version 1.1; diff --git a/hosting/scripts/airgapped/airgappedDockerBuild.js b/hosting/scripts/airgapped/airgappedDockerBuild.js index 58bc7c09a9..432ea9a370 100755 --- a/hosting/scripts/airgapped/airgappedDockerBuild.js +++ b/hosting/scripts/airgapped/airgappedDockerBuild.js @@ -12,7 +12,6 @@ let IMAGES = { couch: "ibmcom/couchdb3", curl: "curlimages/curl", redis: "redis", - watchtower: "containrrr/watchtower", } if (IS_SINGLE_IMAGE) { @@ -53,4 +52,4 @@ if (!IS_SINGLE_IMAGE) { copyFile(FILES.ENV) // compress -execSync(`tar -czf bb-airgapped.tar.gz hosting/scripts/bb-airgapped`) \ No newline at end of file +execSync(`tar -czf bb-airgapped.tar.gz hosting/scripts/bb-airgapped`)