Chapter 13. Cartridges
Standalone cartridges offer a variety of programming languages and frameworks for developing an application. Every application requires a framework cartridge. Examples include PHP, JBoss, and Ruby.
Name | Description |
---|---|
name | Name of the cartridge. |
id | Unique ID of the cartridge. |
obsolete | Indicates whether the cartridge is marked obsolete. Can be true or false . |
added_time | The date and time when the cartridge was added to an application. |
activation_time | The date and time when the cartridge version was marked active. Nil if the cartridge is not active. |
automatic_updates | Set to true if the cartridge receives updates when a security update is released. |
version | Version of the packaged software in the cartridge. |
license | License of the packaged software in the cartridge. |
license_url | URL of the license file for the packaged software in the cartridge. |
website | Website URL for the packaged software in the cartridge. |
help_topics | Map of topics and associated URLs that provide help on how to use and configure the cartridge. |
display_name | Formatted name of the cartridge for user interfaces. |
description | Description of the cartridge for user interfaces. |
current_scale | Current number of gears used to run the cartridge. |
scales_from | Minimum number of gears that a cartridge can scale to; once reached, scale_down requests are rejected. Cannot be less than the supported_scales_from value. |
scales_to | Maximum number of gears that a cartridge can scale to; once reached, scale_up requests are rejected. Cannot be greater than the supported_scales_to value. |
scales_with | Names of other cartridges that scale with this cartridge and run on the same set of gears; currently only HAProxy-1.4 is available. |
supported_scales_from | Minimum number of gears supported by the cartridge; the scales_from value cannot be less than this number. |
supported_scales_to | Maximum number of gears supported by the cartridge; the scales_to value cannot be greater than this number. |
tags | Array of tags associated with the cartridge. |
usage_rates | Plan usage costs. |
status_messages | Status messages returned by the cartridge. |
Note
scales_from
and scales_to
parameters can be set separately or set in the same REST API call. If the scales_from
value is greater than the scales_to
value, the broker logic automatically interchanges the two values.
Embedded cartridges provide extended functionality to OpenShift applications. Examples include MySQL, PostgreSQL, and Jenkins Client.
Name | Description |
---|---|
additional_gear_storage | Set additional filesystem storage in gigabytes for the gear profile that the cartridge is running on. |
base_gear_storage | Default basic storage in gigabytes associated with the gear profile that the cartridge is running on. |
collocated_with | Array of names of other cartridges that share the same gear(s) with the cartridge. |
gear_profile | Size of the gears grouped in this profile that the cartridge is running on; all gears in a group will have the same gear_profile . |
properties | List of environment variables and property values exposed by the cartridge and usable in application code. |
13.1. List Cartridges
Get a list of all available OpenShift cartridges.
Method Resource URL GET
/broker/rest/cartridges
Not applicable
$ curl -X GET https://openshift.redhat.com/broker/rest/cartridges --user user@example.com
The API returns the cartridge resource with a list of all available OpenShift cartridges. Information on other available cartridges has been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.
{ "api_version": 1.6, "data": [ { "current_scale": 0, "description": "The Cron cartridge allows you to run command line programs at scheduled times. Use this for background jobs and periodic processing.", "display_name": "Cron 1.4", "help_topics": { "Getting Started Guide": "https://www.openshift.com/blogs/getting-started-with-cron-jobs-on-openshift" }, "license": "ASL 2.0", "license_url": "http://www.apache.org/licenses/LICENSE-2.0.txt", "name": "cron-1.4", "scales_from": 1, "scales_to": 1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": 1, "tags": [ "embedded" ], "type": "embedded", "usage_rates": [], "version": "1.4", "website": "http://www.openshift.com/" }, { "current_scale": 0, "description": "Web based MySQL admin tool. Requires the MySQL cartridge to be installed first.", "display_name": "phpMyAdmin 3.4", "help_topics": {}, "license": "GPLv2", "license_url": "", "name": "phpmyadmin-3", "scales_from": 1, "scales_to": 1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": 1, "tags": [ "embedded" ], "type": "embedded", "usage_rates": [], "version": "3", "website": "http://www.phpmyadmin.net/" }, { "current_scale": 0, "description": "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js is perfect for data-intensive real-time applications that run across distributed devices.", "display_name": "Node.js 0.10", "help_topics": { "Developer Center": "https://www.openshift.com/developers" }, "license": "MIT License", "license_url": "https://raw.github.com/joyent/node/v0.6/LICENSE", "name": "nodejs-0.6", "scales_from": 1, "scales_to": -1, "scales_with": "haproxy-1.4", "supported_scales_from": 1, "supported_scales_to": -1, "tags": [ "service", "javascript", "nodejs", "web_framework" ], "type": "standalone", "usage_rates": [], "version": "0.6", "website": "http://www.nodejs.org/" }, ], "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 ], "type": "cartridges", "version": "1.6" }