6.8. Restricting Gear Sizes for Cartridges

With the release of OpenShift Enterprise 2.2, you can associate cartridges with specific gear sizes to restrict the size of deployed applications. This allows application developers to deploy certain applications on appropriate infrastructures. For example, you can set a gear size to a corresponding cartridge for applications that requires a faster CPU or more RAM to run at a higher proficiency.
To restrict gear sizes for a cartridge, add the following to the /etc/openshift/broker.conf file:
VALID_GEAR_SIZES_FOR_CARTRIDGE = "Cart_Name|Gear_Size"
Ensure the appropriate cartridge version number is included.

Example 6.13. Restricting Gears Sizes for Specific Cartridges

VALID_GEAR_SIZES_FOR_CARTRIDGE = "php-5.3|medium,large jbossews-2.0|large"
Restart the broker service to load the changes:
# service openshift-broker restart
If a cartridge is configured to use specific gear sizes, then a developer must be able to create applications using the gear size directly or indirectly through domain membership. Any client tools and API commands that access the cartridge listing filter out any cartridges that cannot be used by specific developers.
If the application developer attempts to use a cartridge when they do not have the corresponding gear size capability, the operation terminates and they are notified of the error. See Section 6.6, “Setting Default Gear Quotas and Sizes” and Section 6.7, “Setting Gear Quotas and Sizes for Specific Users” for information on specifying gear sizes for a developer.