使用Azure网站扩展Orchard [英] Scaling Orchard with Azure Web Sites

查看:90
本文介绍了使用Azure网站扩展Orchard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用最近发布的网站"功能在Azure上安装Orchard.

I am currently experimenting with installing Orchard on Azure using the recently released "Web Sites" functionality.

我已经使用图库中的模板成功安装并设置了Orchard,到目前为止,一切似乎都进行得很好.

I have successfully installed and setup Orchard using the template from the gallery and so far everything seems to be going well.

我的问题是:如果我将站点扩展为使用3个实例,是否有什么特别的事情需要做,以确保所有实例都在同一缓存中工作?因此,新页面会一次出现在所有实例上.

My question is: If I scale up the site to use 3 instances is there anything special I need to do to ensure that the instances all work from the same cache? So a new page appears on all instances at once.

我对Umbraco有一点经验,我不得不将文档和缓存推送到Blob存储中,以使其正常工作.

I have a little experience with Umbraco and I had to push documents and the cache into blob storage for it to work correctly.

模板已经解决了这个问题吗?

Is this already taken care of by the template?

感谢您的帮助

推荐答案

There is a guide on the Orchard website that explains how to deploy to a Windows Azure Web Role (Cloud Service). I haven't seen an implementation for Windows Azure Web Sites that supports more than one reserved instance.

为了使Orchard可以在多个保留实例上工作,您需要对其进行配置以使用AzureBlobStorageProvider,这将确保文件被持久保存到Blob存储而不是本地文件系统中.这就是配置 Sites.config :

In order to make Orchard work on multiple reserved instances you'll need to configure it to use the AzureBlobStorageProvider, which will make sure files are persisted to blob storage instead of local filesystem. This is how you would configure the Sites.config:

  <component instance-scope="per-lifetime-scope"
             type="Orchard.Azure.FileSystems.Media.AzureBlobStorageProvider, Orchard.Azure"
             service="Orchard.FileSystems.Media.IStorageProvider">
  </component>

在您的Global.asax.cs中,您还需要确保从web.config中读取了存储帐户信息:

In your Global.asax.cs you'll also want to make sure the storage account information is read from the web.config:

        CloudStorageAccount.SetConfigurationSettingPublisher(    
            (configName, configSetter) =>    
                configSetter(ConfigurationManager.AppSettings[configName])    
            );

这篇关于使用Azure网站扩展Orchard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆