Sitecore 扩展CM部署

发布时间 2023-11-09 10:09:29作者: 灵火

相关文档:

  1. 配置多个Sitecore实例

实例结构:

有两个 Sitecore 实例:Instance1 和 Instance2,分别管理各自的 Content,在 Publishing 的时候调用 Shared Instance(共享Sitecore实例)来作对应的 Solr 索引构建,最后相关的 Scheduler 也放在 Shared Instance 里。

image

配置步骤

  1. SharedCM 需要添加 Instance1 和 Instance2 各自的 Solr Index(前提是两个实例使用的是不同的Solr Index)。
  2. 在各自的 Instance 配置文件里设置 Instance name 和 Publishing Instance(教程)。
  3. 除了 Shared Instance,其他 Instance 禁用 Scheduler(保证只有一个 Instance 执行 Scheduler)。
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
  xmlns:role="http://www.sitecore.net/xmlconfig/role/"
  xmlns:environment="http://www.sitecore.net/xmlconfig/environment/">
  <sitecore>
    <scheduling>
      <agent name="Core_Database_Agent">
        <patch:delete />
      </agent>
      <agent name="Master_Database_Agent">
        <patch:delete />
      </agent>
    </scheduling>
  </sitecore>
</configuration>
  1. 除了 Shared Instance,其他 Instance 的 Web.config 的 role:define 里移除 Indexing(保证只有 Shared Instance 可以 Indexing)。
<!-- SUPPORTED SERVER ROLES     
    Specify the roles that you want this server to perform. A server can perform one or more roles. Enter the roles in a comma separated list. The supported roles are:

    ContentDelivery
    ContentManagement
    ContentDelivery, Indexing
    ContentManagement, Indexing
    Processing
    [Obsolete] Reporting
    Standalone
        
    Default value: Standalone
-->
<!--<add key="role:define" value="ContentManagement, Indexing" /> -->
<add key="role:define" value="ContentManagement" />
  1. 在各自的 Instance 里的 Web.config 里设置相同的 Machine key(告诉 Sitecore 都是同一个 Instance)。
<configuration>
  <system.web>
    <machineKey decryption="AES" decryptionKey="123456C63AAD941AC7FDC34B002C3234EA5C79F854FBAF38"
      validationKey="63818123456789E890CC2345BE00D3CDAF6478607943139116E43E012A39A7E65985058C0918ECFE379A4796AF5EE9D4769D85262E6E8BD56E0877066230D9C" />
  </system.web>
</configuration>