如何自动配置多个环境的 DotNetNuke 设置?
是否有任何推荐的方法来自动配置 DotnetNuke 设置?我们将拥有 DNN 应用程序的多个实例(prod、beta、qa、dev、local 等),并且需要能够对它们进行相同的配置,并能够在未来的版本中对它们进行更新。当前需要配置的设置包括主机设置、门户设置和用户配置文件定义。
以下是我到目前为止提出的一些方法:
1) 创建一个配置模块并使用 SQL 脚本进行所有设置?直接操作 DNN 表通常安全吗?通常建议将 API 与许多框架一起使用。
2)创建一个配置模块并实现 IUpgradeable.UpgradeModule 并以编程方式设置设置?
3) 从门户创建 PortalTemplate,并设置所有设置。我相信这只适用于创建新的门户。我将无法更新现有门户。
Are there any recommended methods for automating configuring DotnetNuke settings? We will have several instances of our DNN application (prod, beta, qa, dev, local, etc) and need to be able to configure them all the same and be able to make updates to them all with our future releases. The settings currently needed to be configured include Host Settings, Portal Settings and User Profile Definitions.
Here are some approaches I have come up with so far:
1) Create a Configuration module and use SQL scripts for all the settings? Is it generally safe to manipulate the DNN tables directly? Often it is recommended to use APIs with many frameworks.
2) Create a Configuration module and implement IUpgradeable.UpgradeModule and programatically set the settings?
3) Create a PortalTemplate from a portal with the settings all set. I believe this will only work for creating new portals. I will not be able to update existing portals.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说,追求选项#2或#3将是你最好的选择(出于你提到的原因,尽量远离选项#1)。
对于#3,您可以使用管理 ->站点向导,用于使用门户模板重新配置现有门户。我建议您尝试一下,看看您的痛点在哪里。
选项 #2 或选项 #3 似乎都相当合理 - 尽管您可能希望根据您的部署计划来决定。您仍然会使用网站模板吗?您仅部署打包模块吗?您正在执行手动部署步骤吗?您可能需要根据这些问题的答案来权衡选项#2 或#3。
I'd say that pursuing option #2 or #3 would be your best bet (try to stay away from option #1 for the reasons you mentioned).
For #3 you can use the Admin -> Site Wizard to reconfigure an existing portal with a portal template. I'd recommend giving this a whirl and see where your pain points are.
Either option #2 or #3 seem pretty reasonable - although you may want to decide based on what your deployment plan looks like. Would you be using a site template anyway? Are you deploying packaged modules only? Are you performing manual deployment steps? You may want to weigh options #2 or #3 based on the answers to those questions.