Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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:
- Create an empty district and specify the gear profile with:
oo-admin-ctl-district -c create -n district_name -p gear_profile
# 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 Copied! Toggle word wrap Toggle overflow - 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 hostname
# 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 Copied! Toggle word wrap Toggle overflow 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The command outputs in the previous example show the JSON object representing the district in the MongoDB.