이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat