此内容没有您所选择的语言版本。

9.14. Configuring Districts


An OpenShift Enterprise district defines a set of node hosts and the resource definitions they must share to enable transparent migration of gears between hosts. Using districts, a gear can keep the same UUID (and related IP addresses, ports, etc.) when moved from one node host to another node host within the same district. This means that applications are not disrupted during a migration. This is true even if applications have specific values that are hard-coded, as many do, rather than sourcing environment variables.
Districts are enabled and required by default for deploying gears. Red Hat requires that you create at least one district before you deploy an OpenShift Enterprise installation to production. See the OpenShift Enterprise Administration Guide [8] for more information on resource management, including capacity planning and using districts.

9.14.1. Creating a District

All node hosts in a district must have the same gear profile, so at least one district is required for each gear profile that is defined. At least two or more node hosts are required in each district to move gears from one node host to another. When capacity planning, you must take into account that districts currently have a hard limit of 6000 gears.
Districts are defined by the broker host in the MongoDB datastore. The following instructions describe how to create a district and add a new node host to it.

Procedure 9.13. To Create a District and Add a Node Host:

  1. Create an empty district and specify the gear profile with:
    # oo-admin-ctl-district -c create -n district_name -p gear_profileoo-admin-ctl-district -c create -n district_name -p gear_profileoo-admin-ctl-district -c create -n district_name -p gear_profileoo-admin-ctl-district -c create -n district_name -p gear_profile
    Copy to Clipboard Toggle word wrap
  2. Add an empty node host to the district. Only node hosts that do not have any gears can be added to a district, and the node host must have the same gear profile as the district:
    # oo-admin-ctl-district -c add-node -n district_name -i hostnameoo-admin-ctl-district -c add-node -n district_name -i hostnameoo-admin-ctl-district -c add-node -n district_name -i hostnameoo-admin-ctl-district -c add-node -n district_name -i hostname
    Copy to Clipboard Toggle word wrap
    The following example shows how to create an empty district, then add an empty node host to it.

    Example 9.8. Creating an Empty District and Adding a Node Host

    # oo-admin-ctl-district -c create -n small_district -p small
    				
    Successfully created district: 7521a7801686477f8409e74f67b693f4
    
    {"active_server_identities_size"=>0,
    "node_profile"=>"small",
    "creation_time"=>"2012-10-24T02:14:48-04:00",
    "name"=>"small_district",
    "externally_reserved_uids_size"=>0,
    "uuid"=>"7521a7801686477f8409e74f67b693f4",
    "max_capacity"=>6000,
    "available_uids"=>"<6000 uids hidden>",
    "max_uid"=>6999,
    "available_capacity"=>6000,
    "server_identities"=>{}}
    
    Copy to Clipboard Toggle word wrap
    # oo-admin-ctl-district -c add-node -n small_district -i node1.example.com
    				
    Success!
    {...
    "server_identities"=>{"node1.example.com"=>{"active"=>true}},
    "uuid"=>"7521a7801686477f8409e74f67b693f4",
    "name"=>"small_district",
    ...}
    
    Copy to Clipboard Toggle word wrap

    Note

    The command outputs in the previous example show the JSON object representing the district in the MongoDB.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat