diff --git a/README.md b/README.md index 13e3cb5..1df56cb 100644 --- a/README.md +++ b/README.md @@ -16,31 +16,25 @@ 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). 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. ### 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 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 +}); 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 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
  • diff --git a/docs/install.sh b/docs/install.sh index 79c561a..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 @@ -215,8 +223,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