From 53f41cd494aacd520439317df3d4506a5c662f72 Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:31:33 +0300 Subject: [PATCH] refactor(benchmark): Rename scaling mode setups --- packages/@n8n/benchmark/scripts/n8nSetups/postgres/setup.mjs | 3 +-- .../{scaling => scaling-multi-main}/docker-compose.yml | 0 .../n8nSetups/{scaling => scaling-multi-main}/nginx.conf | 0 .../n8nSetups/{scaling => scaling-multi-main}/setup.mjs | 3 +-- .../{queue => scaling-single-main}/docker-compose.yml | 0 .../n8nSetups/{queue => scaling-single-main}/setup.mjs | 3 +-- .../@n8n/benchmark/scripts/n8nSetups/sqlite-legacy/setup.mjs | 3 +-- packages/@n8n/benchmark/scripts/n8nSetups/sqlite/setup.mjs | 3 +-- packages/@n8n/benchmark/scripts/runForN8nSetup.mjs | 4 ++-- 9 files changed, 7 insertions(+), 12 deletions(-) rename packages/@n8n/benchmark/scripts/n8nSetups/{scaling => scaling-multi-main}/docker-compose.yml (100%) rename packages/@n8n/benchmark/scripts/n8nSetups/{scaling => scaling-multi-main}/nginx.conf (100%) rename packages/@n8n/benchmark/scripts/n8nSetups/{scaling => scaling-multi-main}/setup.mjs (74%) rename packages/@n8n/benchmark/scripts/n8nSetups/{queue => scaling-single-main}/docker-compose.yml (100%) rename packages/@n8n/benchmark/scripts/n8nSetups/{queue => scaling-single-main}/setup.mjs (73%) diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/postgres/setup.mjs b/packages/@n8n/benchmark/scripts/n8nSetups/postgres/setup.mjs index 5de90d68e36ec..c2ead0ab07b89 100644 --- a/packages/@n8n/benchmark/scripts/n8nSetups/postgres/setup.mjs +++ b/packages/@n8n/benchmark/scripts/n8nSetups/postgres/setup.mjs @@ -4,8 +4,7 @@ import path from 'path'; import { fs } from 'zx'; /** - * Creates the needed directories for the queue setup so their - * permissions get set correctly. + * Creates the needed directories so the permissions get set correctly. */ export function setup({ runDir }) { const neededDirs = ['n8n', 'postgres']; diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/scaling/docker-compose.yml b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/docker-compose.yml similarity index 100% rename from packages/@n8n/benchmark/scripts/n8nSetups/scaling/docker-compose.yml rename to packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/docker-compose.yml diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/scaling/nginx.conf b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/nginx.conf similarity index 100% rename from packages/@n8n/benchmark/scripts/n8nSetups/scaling/nginx.conf rename to packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/nginx.conf diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/scaling/setup.mjs b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/setup.mjs similarity index 74% rename from packages/@n8n/benchmark/scripts/n8nSetups/scaling/setup.mjs rename to packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/setup.mjs index b6d72927c508d..13bb657ac2de1 100644 --- a/packages/@n8n/benchmark/scripts/n8nSetups/scaling/setup.mjs +++ b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-multi-main/setup.mjs @@ -4,8 +4,7 @@ import path from 'path'; import { fs } from 'zx'; /** - * Creates the needed directories for the queue setup so their - * permissions get set correctly. + * Creates the needed directories so the permissions get set correctly. */ export function setup({ runDir }) { const neededDirs = ['n8n-worker1', 'n8n-worker2', 'n8n-main1', 'n8n-main2', 'postgres']; diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/queue/docker-compose.yml b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-single-main/docker-compose.yml similarity index 100% rename from packages/@n8n/benchmark/scripts/n8nSetups/queue/docker-compose.yml rename to packages/@n8n/benchmark/scripts/n8nSetups/scaling-single-main/docker-compose.yml diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/queue/setup.mjs b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-single-main/setup.mjs similarity index 73% rename from packages/@n8n/benchmark/scripts/n8nSetups/queue/setup.mjs rename to packages/@n8n/benchmark/scripts/n8nSetups/scaling-single-main/setup.mjs index 246472d20a16d..4c4cabe088f3d 100644 --- a/packages/@n8n/benchmark/scripts/n8nSetups/queue/setup.mjs +++ b/packages/@n8n/benchmark/scripts/n8nSetups/scaling-single-main/setup.mjs @@ -4,8 +4,7 @@ import path from 'path'; import { fs } from 'zx'; /** - * Creates the needed directories for the queue setup so their - * permissions get set correctly. + * Creates the needed directories so the permissions get set correctly. */ export function setup({ runDir }) { const neededDirs = ['n8n-worker1', 'n8n-worker2', 'n8n-main', 'postgres']; diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/sqlite-legacy/setup.mjs b/packages/@n8n/benchmark/scripts/n8nSetups/sqlite-legacy/setup.mjs index 9773983753c2a..4f883a7b49816 100644 --- a/packages/@n8n/benchmark/scripts/n8nSetups/sqlite-legacy/setup.mjs +++ b/packages/@n8n/benchmark/scripts/n8nSetups/sqlite-legacy/setup.mjs @@ -4,8 +4,7 @@ import path from 'path'; import { fs } from 'zx'; /** - * Creates the needed directories for the queue setup so their - * permissions get set correctly. + * Creates the needed directories so the permissions get set correctly. */ export function setup({ runDir }) { const neededDirs = ['n8n']; diff --git a/packages/@n8n/benchmark/scripts/n8nSetups/sqlite/setup.mjs b/packages/@n8n/benchmark/scripts/n8nSetups/sqlite/setup.mjs index 9773983753c2a..4f883a7b49816 100644 --- a/packages/@n8n/benchmark/scripts/n8nSetups/sqlite/setup.mjs +++ b/packages/@n8n/benchmark/scripts/n8nSetups/sqlite/setup.mjs @@ -4,8 +4,7 @@ import path from 'path'; import { fs } from 'zx'; /** - * Creates the needed directories for the queue setup so their - * permissions get set correctly. + * Creates the needed directories so the permissions get set correctly. */ export function setup({ runDir }) { const neededDirs = ['n8n']; diff --git a/packages/@n8n/benchmark/scripts/runForN8nSetup.mjs b/packages/@n8n/benchmark/scripts/runForN8nSetup.mjs index f640b76b062a5..0168b65efda45 100755 --- a/packages/@n8n/benchmark/scripts/runForN8nSetup.mjs +++ b/packages/@n8n/benchmark/scripts/runForN8nSetup.mjs @@ -37,9 +37,9 @@ async function main() { const duration = argv.duration; const hasN8nLicense = !!n8nLicenseCert || !!n8nLicenseActivationKey; - if (n8nSetupToUse === 'scaling' && !hasN8nLicense) { + if (n8nSetupToUse === 'scaling-multi-main' && !hasN8nLicense) { console.error( - 'n8n license is required to run the scaling setup. Please provide N8N_LICENSE_CERT or N8N_LICENSE_ACTIVATION_KEY', + 'n8n license is required to run the multi-main scaling setup. Please provide N8N_LICENSE_CERT or N8N_LICENSE_ACTIVATION_KEY (and N8N_LICENSE_TENANT_ID if needed)', ); process.exit(1); }