6.4. Managing Regions and Zones

With the release of OpenShift Enterprise 2.1, you can group nodes into regions and zones. Regions and zones provide a way for brokers to manage several distinct geographies by controlling application deployments across a selected group of nodes. You can group nodes into zones, and group zones into regions. These groups can represent physical geographies, such as different countries or data centers, or can be used to provide network level separation between node environments.
Use regions when you require all application developers to use the same OpenShift Enterprise deployment, but they are separated by their geographical location. Developers can tag nodes into zones, then group the zones into regions, and their workload is placed inside the corresponding hardware, zone, and region. If you have deployed a high-availability deployment, you can use a new zone for each rack in a datacenter, and, due to gear anti-affinity, any new gears will be spread across multiple zones, ensuring availability. Configuring regions in your deployment can also help avoid latency issues. You can maximize your application performance with less latency by deploying applications geographically closer to your expected users. For example, if your application is hosted in the US, and European application users are experiencing latency, you can use regions to extend your application to European-hosted datacenters to ease the application end-users' experience.
The current implementation of regions requires the use of districts. Nodes in districts can be tagged with a region and zone, while districts themselves can span several regions or a single region. Any single application is restricted to one region at a time, while gears within an application gear group are distributed across available zones in the current region. The broker attempts to distribute new gears evenly across the available zones; if the default gear placement algorithm is not desired, a custom gear placement plug-in can be implemented.

Note

When regions are in use, gear moves are allowed using the oo-admin-move tool if the move is between districted nodes and all gears in the application remain in a single region.

6.4.1. Creating a Region with Zones

Use the oo-admin-ctl-region tool to create, list, or destroy regions and add or remove zones within a given region.

Procedure 6.6. To Create a Region with Zones:

  1. Create a new region. Region names can include alphanumeric characters, underscores, hyphens, and dots:
    # oo-admin-ctl-region -c create -r region_name
  2. Add zones to the region. Zone names can include alphanumeric characters, underscores, hyphens, and dots:
    # oo-admin-ctl-region -c add-zone -r region_name -z zone_name
  3. Verify the new region and zones:
    # oo-admin-ctl-region -c list -r region_name