0 - en to zh translation catalogue (30 entries)

en: After a short delay, we should see the cluster start apache
zh: 过了一会，我们可以看到集群把apache启动起来了。

en: Also, we need the wget tool in order for the cluster to be able to check the status of the Apache server.
zh: 同样的，为了检测Apache服务器，我们要安装wget这个工具。

en: Apache - Adding More Services
zh: Apache - 添加更多的服务

en: At this point, Apache is ready to go, all that needs to be done is to add it to the cluster. Lets call the resource WebSite. We need to use an OCF script called apache in the heartbeat namespace <footnote> <para> Compare the key used here ocf:heartbeat:apache with the one we used earlier for the IP address: ocf:heartbeat:IPaddr2 </para> </footnote> , the only required parameter is the path to the main Apache configuration file and we’ll tell the cluster to check once a minute that apache is still running.
zh: 现在 ，Apache已经可以添加到集群中了。我们管这个资源叫WebSite。我们需要用一个叫做apache的OCF脚本，这个脚本在heartbeat这个名字空间里，唯一一个需要设定的参数就是Apache的主配置文件路径，并且我们告诉集群每一分钟检测一次Apache是否运行。

en: Before continuing, we need to make sure Apache is installed on <emphasis>both</emphasis> hosts.
zh: 在继续之前，我们先确保两个节点<emphasis>都</emphasis>安装了Apache.

en: Controlling Resource Start/Stop Ordering
zh: 控制资源的启动停止顺序

en: Enable the Apache status URL
zh: 开启 Apache status URL

en: Ensuring Resources Run on the Same Host
zh: 确保资源在同一个节点运行

en: Even though we now prefer pcmk-1 over pcmk-2, that preference is (intentionally) less than the resource stickiness (how much we preferred not to have unnecessary downtime).
zh: 即使我们更希望资源在pcmk-1上面运行，但是 这个优先值还是比资源黏性值要小。

en: First we need to create a page for Apache to serve up. On Fedora the default Apache docroot is /var/www/html, so we’ll create an index file there.
zh: 首先我们为Apache创建一个主页。在Fedora上面默认的Apache docroot是/var/www/html，所以我们在这个目录下面建立一个主页。

en: For the moment, we will simplify things by serving up only a static site and manually sync the data between the two nodes. So run the command again on pcmk-2.
zh: 为了方便，我们简化所用的页面并人工地在两个节点直接同步数据。所以在pcmk-2上面运行这个命令。

en: Giving Control Back to the Cluster
zh: 把控制权交还给集群

en: Highlighted is the automated constraint used to move the resources to pcmk-1
zh: 斜体部分是用来移动资源到pcmk-1约束，它是自动生成的。

en: In order to monitor the health of your Apache instance, and recover it if it fails, the resource agent used by Pacemaker assumes the server-status URL is available. Look for the following in /etc/httpd/conf/httpd.conf and make sure it is not disabled or commented out:
zh: 为了监控Apache实例的健康状态,并在它挂掉的时候恢复Apache服务，资源agent会假设 server-status URL是可用的。查看/etc/httpd/conf/httpd.conf并确保下面的选项没有被禁用或注释掉。

en: Installation
zh: 安装Apache

en: Manually Moving Resources Around the Cluster
zh: 在集群中手工地移动资源

en: Note that the automated constraint is now gone. If we check the cluster status, we can also see that as expected the resources are still active on pcmk-1.
zh: 可以看到自动生成的约束已经没有了。如果我们查看集群的状态，我们也可以看到就如我们所预期的，资源还是在pcmk-1上面跑

en: Now that we have a basic but functional active/passive two-node cluster, we’re ready to add some real services. We’re going to start with Apache because its a feature of many clusters and relatively simple to configure.
zh: 现在我们有了一个基本的但是功能齐全的双节点集群,我们已经可以往里面加些真的服务了。我们准备启动一个Apache服务，因为它是许多集群的主角，并且相对来说比较容易配置。

en: Once we’ve finished whatever activity that required us to move the resources to pcmk-1, in our case nothing, we can then allow the cluster to resume normal operation with the unmove command. Since we previously configured a default stickiness, the resources will remain on pcmk-1.
zh: 当我们完成那些要求要资源移动到pcmk-1的操作－－在我们的例子里面啥都没干 －－我们可以用unmove命令把集群恢复到强制移动前的状态。因为我们之前配置了默认的资源黏性值，恢复了以后资源还是会在pcmk-1上面。

en: Pacemaker does not rely on any sort of hardware symmetry between nodes, so it may well be that one machine is more powerful than the other. In such cases it makes sense to host the resources there if it is available. To do this we create a location constraint. Again we give it a descriptive name (prefer-pcmk-1), specify the resource we want to run there (WebSite), how badly we’d like it to run there (we’ll use 50 for now, but in a two-node situation almost any value above 0 will do) and the host’s name.
zh: Pacemaker 并不要求你机器的硬件配置是相同的，可能某些机器比另外的机器配置要好。这种状况下我们会希望设置:当某个节点可用时，资源就要跑在上面之类的规则。为了达到这个效果我们创建location约束。同样的，我们给他取一个描述性的名字(prefer-pcmk-1)，指明我们想在上面跑WebSite这个服务，多想在上面跑(我们现在指定分值为50，但是在双节点的集群状态下，任何大于0的值都可以达到想要的效果)，以及目标节点的名字:

en: Preparation
zh: 准备工作

en: Specifying a Preferred Location
zh: 指定优先的 Location

en: There are always times when an administrator needs to override the cluster and force resources to move to a specific location. Underneath we use location constraints like the one we created above, happily you don’t need to care. Just provide the name of the resource and the intended location, we’ll do the rest.
zh: 经常性的会有管理员想要无视集群然后强制把资源移动到指定的地方。 底层的操作就像我们上面创建的location约束一样。只要提供资源和目标地址，我们会补全剩余部分。

en: There is a way to force them to move though...
zh: 这里有个办法强制地移动资源

en: To reduce the load on any one machine, Pacemaker will generally try to spread the configured resources across the cluster nodes. However we can tell the cluster that two resources are related and need to run on the same host (or not at all). Here we instruct the cluster that WebSite can only run on the host that ClusterIP is active on. If ClusterIP is not active anywhere, WebSite will not be permitted to run anywhere.
zh: 为了减少每个机器的负载，Pacemaker会智能地尝试将资源分散到各个节点上面。 然而我们可以告诉集群某两个资源是有联系并且要在同一个节点运行(或不同的节点运行)。这里我们告诉集群WebSite只能在有ClusterIP的节点上运行。如果ClusterIP在哪个节点都不存在，那么WebSite也不能运行。

en: To see the current placement scores, you can use a tool called ptest
zh: 如果要看现在的分值，可以用ptest这个命令

en: Update the Configuration
zh: 更新配置文件

en: Wait a minute, the resources are still on pcmk-2!
zh: 等等，资源还是在pcmk-2上面跑的！

en: Wait a moment, the WebSite resource isn’t running on the same host as our IP address!
zh: 等等！WebSite这个资源跟IP没有跑在同一个节点上面！

en: When Apache starts, it binds to the available IP addresses. It doesn’t know about any addresses we add afterwards, so not only do they need to run on the same node, but we need to make sure ClusterIP is already active before we start WebSite. We do this by adding an ordering constraint. We need to give it a name (chose something descriptive like apache-after-ip), indicate that its mandatory (so that any recovery for ClusterIP will also trigger recovery of WebSite) and list the two resources in the order we need them to start.
zh: 当Apache启动了，它跟可用的IP绑在了一起。它不会知道我们后来添加的IP，所以我们不仅需要控制他们在相同的节点运行，也要确保ClusterIP在WebSite之前就启动了。我们用添加ordering约束来达到这个效果。我们需要给这个order取个名字(apache-after-ip之类 描述性的)，并指出他是托管的(这样当ClusterIP恢复了，同时会触发WebSite的恢复) 并且写明了这两个资源的启动顺序。
