このコンテンツは選択した言語では利用できません。

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

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat