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

6.3.2. Creating and Populating Districts


Use the oo-admin-ctl-district command on the broker host to administer districts.

Note

Districts work with gear profiles to manage nodes. A default gear profile is defined in the /etc/openshift/broker.conf file on the broker host, and is created in the following procedure. For information on how to change the default gear profile, see Section 6.1, “Adding or Modifying Gear Profiles”.

Procedure 6.3. To Create and Populate Districts:

  1. Create a district using the following command:
    # 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 a node to the district using the following command:
    # oo-admin-ctl-district -c add-node -n District_Name -i Node_Hostnameoo-admin-ctl-district -c add-node -n District_Name -i Node_Hostnameoo-admin-ctl-district -c add-node -n District_Name -i Node_Hostnameoo-admin-ctl-district -c add-node -n District_Name -i Node_Hostname
    Copy to Clipboard Toggle word wrap
Alternatively, create a district and add nodes to it simultaneously with the following command. Note that you can add multiple node hosts with the -i option and any node hostnames, or use the --available option to add all undistricted nodes of the specified size:
# oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2oo-admin-ctl-district -c add-node -n District_Name -p Gear_Profile -i Node_Hostname1,Node_Hostname2
Copy to Clipboard Toggle word wrap
The following examples use the small gear profile to create a district named small_district, then add the node host node1.example.com to the new district:

Example 6.3. Creating a District Named small_district:

# oo-admin-ctl-district -c create -n small_district -p small

Successfully created district: 7521a7801686477f8409e74f67b693f4

{"_id"=>"53443b8b87704f23db000001",
 "active_servers_size"=>1,
 "available_capacity"=>6000,
 "available_uids"=>"<6000 uids hidden>",
 "created_at"=>2014-04-08 18:10:19 UTC,
 "gear_size"=>"small",
 "max_capacity"=>6000,
 "max_uid"=>6999,
 "name"=>"default-small-0",
 "servers"=> [],
 "updated_at"=>2014-04-08 18:10:19 UTC,
 "uuid"=>"53443b8b87704f23db000001"}
Copy to Clipboard Toggle word wrap

Example 6.4. Adding node1.example.com to the District:

# oo-admin-ctl-district -c add-node -n small_district -i node1.example.com

Success!

{"_id"=>"53443b8b87704f23db000001",
 "active_servers_size"=>1,
 "available_capacity"=>6000,
 "available_uids"=>"<6000 uids hidden>",
 "created_at"=>2014-04-08 18:10:19 UTC,
 "gear_size"=>"small",
 "max_capacity"=>6000,
 "max_uid"=>6999,
 "name"=>"default-small-0",
 "servers"=>
  [{"_id"=>"53443bbc87704f49bd000001",
    "active"=>true,
    "name"=>"node1.example.com",
    "unresponsive"=>false}],
 "updated_at"=>2014-04-08 18:10:19 UTC,
 "uuid"=>"53443b8b87704f23db000001"}
Copy to Clipboard Toggle word wrap

Important

The server identity, node1.example.com in the above example, is the node's host name as configured on that server, which could be different from the PUBLIC_HOSTNAME configured in the /etc/openshift/node.conf file on the node. CNAME records use the PUBLIC_HOSTNAME parameter, which must resolve to the host through DNS; the host name could be something completely different and may not resolve in DNS at all.
 
MongoDB records the host name both in the district and with any gears hosted on the node host, so changing the node's host name disrupts the broker's ability to use the node. Red Hat recommends using the host name as the DNS name and not changing either after deployment.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat