Openshift在自由计划中将3个档位合并为1个档位
Openshift combine 3 gears into 1 gear in free plan
我有 opensfhit 帐户,我正在设置我的应用程序,它需要 space 超过 1GB。如本 link 所述,每个齿轮有 1GB 内存 space。
并且最多允许 3 个档位。是否可以将 3 个 Gear 组合成 1 个 Gear,它可以有 3GB space。目前我在免费计划中,有 1 个 1GB 的齿轮 space,它有两个墨盒 Jboss 和 Postgresql 数据库。两者加起来占用的空间超过 1GB。所以由于 space 限制,我无法部署应用程序。任何方向都会真正帮助我。
编辑:-
我已经在免费计划中创建了缩放应用程序,并且根据 openshift 文档,每个齿轮最多可以容纳 1GB space,在我的例子中,2 Jboss(缩放),负载均衡器,1个psql数据库,所以一档将有(Jboss +负载均衡器)组合1GB,二档postgresql 1GB space,三档Jboss 1GB(可扩展)。
注意:- 在上述情况下,允许缩放的最小档位将是 2 而不是 3,因为一个档位已经分配给数据库。但是缩放的最大允许档位是3,我不知道它是如何工作的。
来自 openshift 管理面板 -
JBoss 应用程序服务器 7 使用 2
OpenShift is configured to scale this cartridge with the web proxy
HAProxy. OpenShift monitors the incoming web traffic to your
application and automatically adds or removes copies of your cartridge
(each running on their own gears) to serve requests as needed.
控制 OpenShift 将用于您的墨盒的齿轮数:
Minimum 2 (dropdown) and Maximum 3 (dropdown) small gears
Each scaled gear is created the same way - the normal post, pre, and
deploy hooks are executed. Each cartridge will have its own copy of
runtime data, so be sure to use a database if you need to share data
across your web cartridges.
我 运行 遇到了同样的问题,发现这没有很好的记录或至少没有直观地描述,因为 3*1GB 最初似乎暗示您可能只有 3GB 的总磁盘 space,事实并非如此。
这里引用了可扩展应用程序文档中的一段话(如果它不可扩展,你也只有 1 个 Gear):
The HAProxy cartridge sits between your application and the public internet and routes web traffic to your web cartridges. When traffic increases, HAProxy notifies the OpenShift servers that it needs additional capacity. OpenShift checks that you have a free gear (out of your remaining account gears) and then creates another copy of your web cartridge on that new gear. The code in the git repository is copied to each new gear, but the data directory begins empty. When the new cartridge copy starts it will invoke your build hooks and then the HAProxy will begin routing web requests to it. If you push a code change to your web application all of the running gears will get that update.
来源:https://developers.openshift.com/en/managing-scaling.html(在第 "How Scaling Works"
部分
总结一下:GIT 数据被复制到所有档位,所以你有 3 倍 1GB 的相同 GIT 数据。 @mbaird 指出,对于未复制的用户数据而言,情况并非如此。此外,根据您的墨盒,在扩展应用程序中,您的数据库可能位于单独的设备上。
对于静态内容托管,如果您需要更多磁盘 space 或 INode,您似乎必须更改为不同的计划或将数据分散到多个应用程序中。
如果您部署为扩展应用程序,那么数据库将与您的 JBoss 应用程序驻留在不同的设备上,因此数据库将拥有 1GB 的磁盘 space 。所以你的数据库基本上有 1GB,JBoss 有 1GB。如果这还不够,那么您将不得不升级到付费计划,以便在单个设备上获得更多磁盘 space。
我有 opensfhit 帐户,我正在设置我的应用程序,它需要 space 超过 1GB。如本 link 所述,每个齿轮有 1GB 内存 space。 并且最多允许 3 个档位。是否可以将 3 个 Gear 组合成 1 个 Gear,它可以有 3GB space。目前我在免费计划中,有 1 个 1GB 的齿轮 space,它有两个墨盒 Jboss 和 Postgresql 数据库。两者加起来占用的空间超过 1GB。所以由于 space 限制,我无法部署应用程序。任何方向都会真正帮助我。
编辑:-
我已经在免费计划中创建了缩放应用程序,并且根据 openshift 文档,每个齿轮最多可以容纳 1GB space,在我的例子中,2 Jboss(缩放),负载均衡器,1个psql数据库,所以一档将有(Jboss +负载均衡器)组合1GB,二档postgresql 1GB space,三档Jboss 1GB(可扩展)。
注意:- 在上述情况下,允许缩放的最小档位将是 2 而不是 3,因为一个档位已经分配给数据库。但是缩放的最大允许档位是3,我不知道它是如何工作的。
来自 openshift 管理面板 - JBoss 应用程序服务器 7 使用 2
OpenShift is configured to scale this cartridge with the web proxy HAProxy. OpenShift monitors the incoming web traffic to your application and automatically adds or removes copies of your cartridge (each running on their own gears) to serve requests as needed.
控制 OpenShift 将用于您的墨盒的齿轮数:
Minimum 2 (dropdown) and Maximum 3 (dropdown) small gears
Each scaled gear is created the same way - the normal post, pre, and deploy hooks are executed. Each cartridge will have its own copy of runtime data, so be sure to use a database if you need to share data across your web cartridges.
我 运行 遇到了同样的问题,发现这没有很好的记录或至少没有直观地描述,因为 3*1GB 最初似乎暗示您可能只有 3GB 的总磁盘 space,事实并非如此。
这里引用了可扩展应用程序文档中的一段话(如果它不可扩展,你也只有 1 个 Gear):
The HAProxy cartridge sits between your application and the public internet and routes web traffic to your web cartridges. When traffic increases, HAProxy notifies the OpenShift servers that it needs additional capacity. OpenShift checks that you have a free gear (out of your remaining account gears) and then creates another copy of your web cartridge on that new gear. The code in the git repository is copied to each new gear, but the data directory begins empty. When the new cartridge copy starts it will invoke your build hooks and then the HAProxy will begin routing web requests to it. If you push a code change to your web application all of the running gears will get that update.
来源:https://developers.openshift.com/en/managing-scaling.html(在第 "How Scaling Works"
部分总结一下:GIT 数据被复制到所有档位,所以你有 3 倍 1GB 的相同 GIT 数据。 @mbaird 指出,对于未复制的用户数据而言,情况并非如此。此外,根据您的墨盒,在扩展应用程序中,您的数据库可能位于单独的设备上。
对于静态内容托管,如果您需要更多磁盘 space 或 INode,您似乎必须更改为不同的计划或将数据分散到多个应用程序中。
如果您部署为扩展应用程序,那么数据库将与您的 JBoss 应用程序驻留在不同的设备上,因此数据库将拥有 1GB 的磁盘 space 。所以你的数据库基本上有 1GB,JBoss 有 1GB。如果这还不够,那么您将不得不升级到付费计划,以便在单个设备上获得更多磁盘 space。