简介
可以使用同一台服务器上的多个环境同时运行并有权访问不同版本。
在环境 x 上设置了一个版本,因此端点应指定环境:https://[hostname]/?environment=[x]
。
例如,当前版本可以从通常使用的生产环境中运行,而新版本则可以在第二个环境(例如称为“验收”,以进行验收测试)中处于活动状态。然后,可以通过在 URL (https://[hostname]/?environment=acceptance
) 中加入 environment=acceptance
来访问第二个环境。如果在 URL 中未选择任何环境,则使用服务器设置中配置的默认环境。每个环境一次只能有一个版本处于活动状态。
备注:
最终用户访问权限由环境中活跃的模块决定,而不是由环境本身决定。
创建环境
New environments can be specified in the Server Settings by using the Environments field. If it is not set, it defaults to a single environment, production.
请按照以下步骤创建环境。
Step | Action |
---|---|
1 | Go to the Superadmin Settings tab. |
2 | Add the following line to the Server Settings to the left:, "Environments": ["production", "acceptance"] . |
3 | Click on SAVE. |
现在,有两个环境可供使用:生产和验收。
设置默认环境
如果在 URL 中未提供任何环境,则可以在服务器设置中使用 DefaultEnvironment
设置配置访问的默认环境。如果未设置,则默认为生产。
请按照以下步骤设置默认环境。
Step | Action |
---|---|
1 | Go to the Superadmin Settings tab. |
2 | Add the following line to the Server Settings to the left:, "DefaultEnvironment": "acceptance" . |
3 | Click on SAVE. |
如果 URL 中未指定任何环境,则访问验收环境。
激活环境中的版本
可以在任何环境中激活版本。在下面的演示中,假设存在两种环境,即生产和验收。
请按照以下步骤在验收环境中激活版本。
Step | Action |
---|---|
1 | Go to the Superadmin Releases tab. |
2 | Right click on the release you want to activate. |
3 | Select Make active on - Acceptance. |
4 | Click on OK. |
“活动时间”列现在表示在已激活版本之前进行验收,并且一旦生成缓存,用户就可以使用适当的访问权限访问该版本。
为特定环境生成缓存
每个环境都有其自己的数据实例集,如“超级管理员已发布数据”选项卡中所示。用户可以通过在顶部的下拉列表中选择所需环境来选择要显示数据实例的环境(标签为“数据实例环境”)。
必须为特定环境生成缓存。在下面的演示中,假设存在两种环境,即生产和验收。
请按照以下步骤在验收环境中生成缓存。
Step | Action |
---|---|
1 | Go to the Superadmin Released data tab. |
2 | Select the acceptance in the Data instances for drop-down menu. |
3 | Click on Generate Cache Now. |
4 | Click on GENERATE CACHE. |
一个新列随即会显示,其中包含有关新生成的数据实例的信息。
3个月前更新