官术网_书友最值得收藏!

Restricting gear sizes for a domain using rhc

As you start using different domains for different environments, you will feel the need to restrict gear sizes for different domains. In particular, you would like to use small gears for development and large gears for production. When you create an application, you can specify the gear size for that application. This does not help much as it applies only to that application. To avoid using large gears for development, you would want to restrict the development domain only to small gears.

Getting ready

To complete this recipe, you will need to have rhc installed on your machine. Please refer to the Installing the OpenShift rhc command-line client recipe in Chapter 1, Getting Started with OpenShift, for instructions.

How to do it…

To restrict the devosbook domain to only small gears, run the following command:

$ rhc configure-domain --allowed-gear-sizes small --namespace devosbook

How it works…

By default, when you create a new domain, it gains access to all the gear sizes available for your account. When you sign up for a free account, you receive access to only small gears, meaning what you can do is limited. However, in the commercial version, you can get access to bigger gear sizes. The rhc configure-domain command allows you to restrict a domain to specific gear sizes.

The rhc configure-domain command requires you to specify a list of gear sizes you want to allow in a domain. The namespace is optional. If you do not specify a domain name, the domain associated with the user specified in ~/.openshift/express.conf will be configured. You can also specify multiple gear sizes:

$ rhc configure-domain --allowed-gear-sizes small,medium --namespace devosbook

There's more…

You can also configure a domain to not allow any application creation by using the --no-allowed-gear-sizes option. You will use this option to disallow application creation for a domain or to block a domain name for later use. For example, I could create another domain, osbook2, for the second version of this book and configure it with the--no-allowed-gear-sizes option:

$ rhc configure-domain --no-allowed-gear-sizes --namespace osbook

See also

  • The Adding viewer members to a domain using rhc recipe
  • The Adding an admin member to a domain using rhc recipe
  • The Viewing all the members in a domain using rhc recipe
主站蜘蛛池模板: 侯马市| 府谷县| 如皋市| 汕尾市| 绥江县| 丹寨县| 万山特区| 阜南县| 东乌珠穆沁旗| 北票市| 旅游| 南川市| 荔波县| 土默特右旗| 苏尼特左旗| 潼关县| 漳浦县| 盐津县| 迭部县| 泰和县| 策勒县| 保康县| 松阳县| 临桂县| 府谷县| 伽师县| 彰化县| 黔南| 鸡西市| 桐庐县| 寻乌县| 宿松县| 象州县| 民勤县| 勐海县| 格尔木市| 遂昌县| 南木林县| 乌恰县| 荔浦县| 靖江市|