From d34a7b4d89e3f80cb30eb2cdc3489d5ae6b2bef6 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Mon, 5 Aug 2024 11:34:35 +0300 Subject: [PATCH 1/8] Fixed two warnings in CP and removed useless JS code --- cp/app/Controllers/HomeController.php | 31 +++++++++++++------ cp/resources/views/admin/dashboard/index.twig | 2 ++ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/cp/app/Controllers/HomeController.php b/cp/app/Controllers/HomeController.php index 960f67c..b2f342c 100644 --- a/cp/app/Controllers/HomeController.php +++ b/cp/app/Controllers/HomeController.php @@ -75,13 +75,18 @@ class HomeController extends Controller $dates = []; $counts = []; - foreach ($domainsCount as $row) { - // Extract just the date part from the datetime string - $date = (new \DateTime($row['date']))->format('Y-m-d'); - $count = (int)$row['count']; // Ensure count is an integer + if (is_array($domainsCount) || is_object($domainsCount)) { + foreach ($domainsCount as $row) { + // Extract just the date part from the datetime string + $date = (new \DateTime($row['date']))->format('Y-m-d'); + $count = (int)$row['count']; // Ensure count is an integer - $dates[] = $date; - $counts[] = $count; + $dates[] = $date; + $counts[] = $count; + } + } else { + $dates[] = 'No data'; + $counts[] = 0; } $query = " @@ -135,10 +140,16 @@ class HomeController extends Controller $answeredData = []; $unansweredData = []; - foreach ($results as $row) { - $labels3[] = $row['ticket_date']; - $answeredData[] = (int) $row['answered']; // Cast to int for ApexCharts - $unansweredData[] = (int) $row['unanswered']; // Cast to int for ApexCharts + if (is_array($results) || is_object($results)) { + foreach ($results as $row) { + $labels3[] = $row['ticket_date']; + $answeredData[] = (int) $row['answered']; // Cast to int for ApexCharts + $unansweredData[] = (int) $row['unanswered']; // Cast to int for ApexCharts + } + } else { + $labels3[] = 0; + $answeredData[] = 0; + $unansweredData[] = 0; } $domains = $db->selectValue('SELECT count(id) as domains FROM domain'); diff --git a/cp/resources/views/admin/dashboard/index.twig b/cp/resources/views/admin/dashboard/index.twig index dbe2638..2fcb3ec 100644 --- a/cp/resources/views/admin/dashboard/index.twig +++ b/cp/resources/views/admin/dashboard/index.twig @@ -253,6 +253,7 @@ {% include 'partials/footer.twig' %} + {% if registrars %} + {% endif %} {% endblock %} \ No newline at end of file From a9c22b63271e49c9bf471a4072339762ccf36132 Mon Sep 17 00:00:00 2001 From: Richard Reiber Date: Mon, 12 Aug 2024 23:40:13 +0200 Subject: [PATCH 2/8] Fix DS records --- automation/write-zone.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/write-zone.php b/automation/write-zone.php index c1cc569..6b8f285 100644 --- a/automation/write-zone.php +++ b/automation/write-zone.php @@ -132,7 +132,7 @@ Coroutine::create(function () use ($pool, $log, $c) { $dsRecord = new ResourceRecord; $dsRecord->setName($dname_clean . '.'); $dsRecord->setClass(Classes::INTERNET); - $dsRecord->setRdata(Factory::Ds($keytag, $alg, $digest, $digesttype)); + $dsRecord->setRdata(Factory::Ds($keytag, $alg, hex2bin($digest), $digesttype)); $zone->addResourceRecord($dsRecord); } } @@ -225,4 +225,4 @@ Coroutine::create(function () use ($pool, $log, $c) { // Return the connection to the pool $pool->put($pdo); } -}); \ No newline at end of file +}); From 5bf69c431f9b79603260721ee57b00c626098aa9 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:43:34 +0300 Subject: [PATCH 3/8] Updated benchmarks --- README.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 13e3cb5..26f8864 100644 --- a/README.md +++ b/README.md @@ -22,25 +22,17 @@ Additionally, we are looking for assistance from gTLD operators to test Namingo ### EPP Benchmark Summary (per registrar) -- VPS Setup: 2 virtual CPU cores (AMD EPYC-Rome, 2 GHz), 2 GB RAM, SSD drive, Ubuntu 24.04 - -#### Domain Check: - -- Operations per Second: 217.55 - -- Average Time per Operation: 4.596 ms - -#### Domain Info: - -- Operations per Second: 94.65 - -- Average Time per Operation: 10.57 ms - -#### Domain Create: - -- Operations per Second: 42.17 - -- Average Time per Operation: 23.72 ms +| **Metric** | 2 vCPU, 2 GB RAM, SSD | 8 vCPU, 32 GB RAM, NVMe | +|---------------------------------|-----------------------|-------------------------| +| _Domain Check_ | | | +| Operations per Second (Ops/sec) | 217.55 | 462.58 | +| Average Time per Operation (ms) | 4.596 | 2.16 | +| _Domain Info_ | | | +| Operations per Second (Ops/sec) | 94.65 | 225.55 | +| Average Time per Operation (ms) | 10.57 | 4.43 | +| _Domain Create_ | | | +| Operations per Second (Ops/sec) | 42.17 | 120.62 | +| Average Time per Operation (ms) | 23.72 | 8.29 | ## Features From 25c22477fd9bf916e442b047efa919328f883fb3 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:00:56 +0300 Subject: [PATCH 4/8] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 26f8864..b23b848 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,9 @@ Namingo is optimally designed for the upcoming ICANN application round, providin **Namingo** version 1.0.0 is now complete, thanks to our dedicated community. The journey doesn't end here, and we invite volunteers to help us continue testing and improving Namingo. -Currently, Namingo is able to manage 150,000 domains on a VPS setup featuring 2 cores, 4GB RAM, and a 100GB SSD. It is compatible with Ubuntu 22.04/24.04 LTS and Debian 12, supporting MariaDB/MySQL databases. We are also seeking testers for new operating systems and database setups, including AlmaLinux, Alpine Linux, FreeBSD 14, and Windows, with both MariaDB/MySQL and PostgreSQL options. +Namingo is compatible with Ubuntu 22.04/24.04 LTS and Debian 12, supporting MariaDB/MySQL databases. We are also seeking testers for new operating systems and database setups, including AlmaLinux, Alpine Linux, FreeBSD 14, and Windows, with both MariaDB/MySQL and PostgreSQL options. + +Namingo efficiently manages up to 150,000 domains on a VPS setup with 2 cores, 4GB RAM, and an 11GB SSD. It can handle up to 1,000,000 domains on a more robust VPS configuration with 8 cores, 32GB RAM, and a 125GB NVMe SSD, though a few minor issues are noted in the [issues tab](https://github.com/getnamingo/registry/issues?q=is%3Aissue+is%3Aopen+label%3A%221+000+000+domains+issue%22). Additionally, we are looking for assistance from gTLD operators to test Namingo by providing access to ICANN and other relevant systems. Your contributions are invaluable in refining and expanding Namingo's capabilities. Join us in ensuring Namingo remains the best in its class. From 83a605dd238a5be942196253438b32269a5b6a71 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:11:35 +0300 Subject: [PATCH 5/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b23b848..1df56cb 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Namingo is optimally designed for the upcoming ICANN application round, providin Namingo is compatible with Ubuntu 22.04/24.04 LTS and Debian 12, supporting MariaDB/MySQL databases. We are also seeking testers for new operating systems and database setups, including AlmaLinux, Alpine Linux, FreeBSD 14, and Windows, with both MariaDB/MySQL and PostgreSQL options. -Namingo efficiently manages up to 150,000 domains on a VPS setup with 2 cores, 4GB RAM, and an 11GB SSD. It can handle up to 1,000,000 domains on a more robust VPS configuration with 8 cores, 32GB RAM, and a 125GB NVMe SSD, though a few minor issues are noted in the [issues tab](https://github.com/getnamingo/registry/issues?q=is%3Aissue+is%3Aopen+label%3A%221+000+000+domains+issue%22). +Namingo efficiently manages up to 150,000 domains on a VPS setup with 2 cores, 4GB RAM, and an 11GB SSD. It can handle up to 1,000,000 domains on a more robust VPS configuration with 8 cores, 32GB RAM, and a 125GB NVMe SSD, though a few minor issues are noted in the [issues tab](https://github.com/getnamingo/registry/issues?q=is%3Aissue+is%3Aopen+label%3A%221+000+000+domains+issue%22). Zone generation for 1 million domains takes approximately 6 minutes. Additionally, we are looking for assistance from gTLD operators to test Namingo by providing access to ICANN and other relevant systems. Your contributions are invaluable in refining and expanding Namingo's capabilities. Join us in ensuring Namingo remains the best in its class. From c565cfc99fea99f1711737106941eb5421a1d552 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:04:44 +0300 Subject: [PATCH 6/8] Fixed #144 --- docs/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install.sh b/docs/install.sh index 79c561a..54f5f95 100644 --- a/docs/install.sh +++ b/docs/install.sh @@ -215,8 +215,8 @@ fi mkdir /usr/share/adminer wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php - - git clone https://github.com/getnamingo/registry /opt/registry + + git clone --branch v1.0.1 --single-branch https://github.com/getnamingo/registry /opt/registry mkdir -p /var/log/namingo chown -R www-data:www-data /var/log/namingo From 81c20630d97686c06e14ccb2e5b7c6f605d3ce63 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:17:54 +0300 Subject: [PATCH 7/8] Fixed #147 --- docs/install.sh | 74 +++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/docs/install.sh b/docs/install.sh index 54f5f95..1639805 100644 --- a/docs/install.sh +++ b/docs/install.sh @@ -11,15 +11,16 @@ prompt_for_password() { echo $password } -# Function to edit or add a configuration line in php.ini -edit_php_ini() { - local file=$1 - local setting=$2 +# Function to ensure a setting is present, uncommented, and correctly set +set_php_ini_value() { + local ini_file=$1 + local key=$2 local value=$3 - if grep -q "^;\?\s*${setting}\s*=" "$file"; then - sed -i "s/^\(;?\s*${setting}\s*=\).*/\1 ${value}/" "$file" + + if grep -qE "^\s*;?\s*${key}\s*=" "$ini_file"; then + sed -i "s/^\s*;?\s*${key}\s*=.*/${key} = ${value}/" "$ini_file" else - echo "${setting} = ${value}" >> "$file" + echo "${key} = ${value}" >> "$ini_file" fi } @@ -92,36 +93,43 @@ if [[ ("$OS" == "Ubuntu" && "$VER" == "22.04") || ("$OS" == "Ubuntu" && "$VER" = timedatectl set-timezone UTC fi - # Edit php.ini files + # Determine PHP configuration files based on OS and version if [[ "$OS" == "Ubuntu" && "$VER" == "24.04" ]]; then - phpIniCli='/etc/php/8.3/cli/php.ini' - phpIniFpm='/etc/php/8.3/fpm/php.ini' + phpIniCli='/etc/php/8.3/cli/php.ini' + phpIniFpm='/etc/php/8.3/fpm/php.ini' + phpIniOpcache='/etc/php/8.3/mods-available/opcache.ini' else - phpIniCli='/etc/php/8.2/cli/php.ini' - phpIniFpm='/etc/php/8.2/fpm/php.ini' + phpIniCli='/etc/php/8.2/cli/php.ini' + phpIniFpm='/etc/php/8.2/fpm/php.ini' + phpIniOpcache='/etc/php/8.2/mods-available/opcache.ini' fi - echo "Updating PHP configuration..." - for file in "$phpIniCli" "$phpIniFpm"; do - edit_php_ini "$file" "opcache.enable" "1" - edit_php_ini "$file" "opcache.enable_cli" "1" - edit_php_ini "$file" "opcache.jit_buffer_size" "100M" - edit_php_ini "$file" "opcache.jit" "1255" - edit_php_ini "$file" "session.cookie_secure" "1" - edit_php_ini "$file" "session.cookie_httponly" "1" - edit_php_ini "$file" "session.cookie_samesite" "\"Strict\"" - edit_php_ini "$file" "session.cookie_domain" "example.com" - edit_php_ini "$file" "memory_limit" "512M" - done - - if [[ "$OS" == "Ubuntu" && "$VER" == "24.04" ]]; then - edit_php_ini "/etc/php/8.3/mods-available/opcache.ini" "opcache.jit" "1255" - edit_php_ini "/etc/php/8.3/mods-available/opcache.ini" "opcache.jit_buffer_size" "100M" - else - edit_php_ini "/etc/php/8.2/mods-available/opcache.ini" "opcache.jit" "1255" - edit_php_ini "/etc/php/8.2/mods-available/opcache.ini" "opcache.jit_buffer_size" "100M" - fi - + # Update php.ini files + set_php_ini_value "$phpIniCli" "opcache.enable" "1" + set_php_ini_value "$phpIniCli" "opcache.enable_cli" "1" + set_php_ini_value "$phpIniCli" "opcache.jit_buffer_size" "100M" + set_php_ini_value "$phpIniCli" "opcache.jit" "1255" + set_php_ini_value "$phpIniCli" "session.cookie_secure" "1" + set_php_ini_value "$phpIniCli" "session.cookie_httponly" "1" + set_php_ini_value "$phpIniCli" "session.cookie_samesite" "\"Strict\"" + set_php_ini_value "$phpIniCli" "session.cookie_domain" "\"$REGISTRY_DOMAIN,cp.$REGISTRY_DOMAIN,whois.$REGISTRY_DOMAIN\"" + set_php_ini_value "$phpIniCli" "memory_limit" "2G" + + # Repeat the same settings for php-fpm + set_php_ini_value "$phpIniFpm" "opcache.enable" "1" + set_php_ini_value "$phpIniFpm" "opcache.enable_cli" "1" + set_php_ini_value "$phpIniFpm" "opcache.jit_buffer_size" "100M" + set_php_ini_value "$phpIniFpm" "opcache.jit" "1255" + set_php_ini_value "$phpIniFpm" "session.cookie_secure" "1" + set_php_ini_value "$phpIniFpm" "session.cookie_httponly" "1" + set_php_ini_value "$phpIniFpm" "session.cookie_samesite" "\"Strict\"" + set_php_ini_value "$phpIniFpm" "session.cookie_domain" "\"$REGISTRY_DOMAIN,cp.$REGISTRY_DOMAIN,whois.$REGISTRY_DOMAIN\"" + set_php_ini_value "$phpIniFpm" "memory_limit" "2G" + + # Update opcache.ini + set_php_ini_value "$phpIniOpcache" "opcache.jit" "1255" + set_php_ini_value "$phpIniOpcache" "opcache.jit_buffer_size" "100M" + # Restart PHP-FPM service echo "Restarting PHP FPM service..." if [[ "$OS" == "Ubuntu" && "$VER" == "24.04" ]]; then From 865d9c400822533acc938628e1d7241db514d53d Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:18:32 +0300 Subject: [PATCH 8/8] Version update --- cp/resources/views/partials/footer.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cp/resources/views/partials/footer.twig b/cp/resources/views/partials/footer.twig index 369be5e..ada1443 100644 --- a/cp/resources/views/partials/footer.twig +++ b/cp/resources/views/partials/footer.twig @@ -14,7 +14,7 @@ Namingo
  • - v1.0.0 + v1.0.1