12.2. Adding a Cartridge to an Application

When adding a cartridge to an application with the client tools, there are several options available that are used to specify the required information.

Table 12.1. Options When Adding Cartridges

Option Description
-a, --app [NAME] Name of an application.
-n, --namespace [NAME] Name of a domain.
-e, --env [VARIABLE=VALUE] Environment variable(s) to be set on this cartridge. It can also be a path to a file that contains the environment variables.
-g, --gear-size [SIZE] Gear size determines how much memory and CPU a cartridge consumes.
-c, --cartridge [CART_TYPE] Type of cartridge to add to an application.
Add a cartridge to an application with the following command, specifying the desired cartridge and the name of the application:
$ rhc cartridge add Cart_Name -a App_Name
Specifying Cartridge Gear Size
When adding a cartridge to an application, specify the cartridge gear size with the -g, or --gear-size option along with the gear size. Note that this option is not available with non-scalable applications, because the web cartridge and any add-on cartridges are placed on the same gear. Currently the gear sizes available are small, medium, and large.
$ rhc cartridge add Cart_Name -a App_Name -g Gear_Size

Note

The medium and large gears are only available with the bronze and silver plans. Customers on the free plan are limited to small gears. Log on to the Management Console at https://www.openshift.com/ to view plan upgrade options.