Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • girish 15 posts 88 karma points
    Aug 02, 2024 @ 09:24
    girish
    0

    A way to configure umbrcao 13: front end, back end and DB as separate in an on-premises servers.

    For an on-premises solution, you can follow these steps:

    1. Database Configuration Ensure both servers point to the same on-premises database.

    2. Shared File Storage Use a shared network file share (NFS or SMB) for media files.

    3. Distributed Caching Use an on-premises distributed caching solution like Redis.

    4. Logging Centralize your logging using an on-premises ELK stack (Elasticsearch, Logstash, and Kibana).

    5. Load Balancing Use a hardware or software load balancer to distribute traffic between the two servers.

    Detailed Configuration 1. Database Configuration Ensure your connection string in appsettings.json points to a single shared database:

    "Umbraco": {
      "CMS": {
        "Global": {
          "UmbracoDbDSN": "Server=your_onprem_server;Database=your_database;User Id=your_username;Password=your_password;"
        }
      }
    }
    
    1. Shared File Storage Configure Umbraco to use a shared network file system.

    Configure appsettings.json:

    "Umbraco": {
      "CMS": {
        "Content": {
          "Media": {
            "FileSystem": {
              "Provider": "Physical",
              "RootPath": "\\\\your_network_share\\media",
              "RootUrl": "/media"
            }
          }
        }
      }
    }
    
    1. Distributed Caching Set up Redis on-premises.

    Install the Redis package:

    dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis
    Configure 
    

    appsettings.json:

    "Umbraco": {
      "CMS": {
        "Caching": {
          "DistributedCache": {
            "Enabled": true,
            "Provider": "Redis",
            "Redis": {
              "Configuration": "your_redis_server:6379"
            }
          }
        }
      }
    }
    
    1. Logging Set up an on-premises ELK stack and configure logging.

    Configure appsettings.json:

    "Logging": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information"
      },
      "Elasticsearch": {
        "Uri": "http://your_elasticsearch_server:9200",
        "IndexFormat": "logs-{0:yyyy.MM.dd}",
        "TemplateName": "logs",
        "TemplateMatch": "logs-*"
      }
    }
    
    1. Load Balancing Set up a load balancer to distribute traffic between the two servers. This can be a hardware load balancer or a software solution like HAProxy or Nginx.

    Summary

    Database: Point both servers to the same on-premises database. Media Storage: Use a shared network file share.

    Distributed Caching: Set up Redis on-premises for shared caching. Logging: Use an on-premises ELK stack for centralized logging.

    Load Balancing: Implement load balancing with a hardware or software solution.

    This setup will ensure both servers share caching, logging, and media, providing a high-availability environment on-premises.

    Please verify and suggest if there any better approach available.?

  • girish 15 posts 88 karma points
    Aug 02, 2024 @ 12:24
    girish
    0

    The following configuration is available in the Logging settings, for the directory change.

    "Umbraco": {
      "CMS": {
        "Logging": {
          "MaxLogAge": "2.00:00:00",
          "Directory": "~/CustomLogFileLocation"
        }
      }
    }
    

    ref: https://docs.umbraco.com/umbraco-cms/v/13.latest-lts/reference/configuration/loggingsettings

Please Sign in or register to post replies

Write your reply to:

Draft