Search

13.2.4. Update Cartridge Configuration

download PDF
Description

Update the configuration of an existing cartridge. Minimum and maximum scaling factors and additional filesystem storage in gigabytes on each gear that contains the specified cartridge can be set with this API resource.

Note

Contact your system administrator for more information.
Method and URL Structure

Method Resource URL
PUT /broker/rest/application/:id/cartridge/:name

Request Parameters

Name Description Required Default
additional_gear_storage Additional filesystem storage (GB) No
scales_from Minimum number of gears to run component No
scales_to Maximum number of gears to run component No

See Section A.7, “Cartridges” for more information about the valid options applicable to these request parameters.
Request

{
  "additional_gear_storage": 10
}

cURL Command Example

$ curl -X PUT https://openshift.redhat.com/broker/rest/application/534253991015616165707776/cartridge/mysql-5.5 --user user@example.com --data-urlencode additional_gear_storage=10

JSON Response

The API returns the embedded cartridge resource with related resource links, and the updated values for the parameters that were changed. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 13, Cartridges for more information on all cartridge parameters.

{
  "api_version": 1.6,
  "data": {
    "additional_gear_storage": 10,
    "base_gear_storage": 1,
    "collocated_with": [
      "ruby-2.0",
      "haproxy-1.4"
    ],
    "current_scale": 1,
    "description": "MySQL is a multi-user, multi-threaded SQL database server.",
    "display_name": "MySQL Database 5.5",
    "gear_profile": "small",
    "help_topics": {
    },
    "license": "GPL",
    "license_url": "",
    "name": "mysql-5.5",
    "properties": [
      {
        "name": "username",
        "type": "cart_data",
        "description": "Root user on mysql database",
        "value": "adminthGnHLU"
      },
      {
        "name": "password",
        "type": "cart_data",
        "description": "Password for root user on mysql database",
        "value": "dPFjWLrUjfxC"
      },
      {
        "name": "database_name",
        "type": "cart_data",
        "description": "MySQL DB name",
        "value": "myapp"
      },
      {
        "name": "connection_url",
        "type": "cart_data",
        "description": "MySQL DB connection URL",
        "value": "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"
      }
    ],
    "scales_from": 1,
    "scales_to": 1,
    "scales_with": "haproxy-1.4",
    "status_messages": null,
    "supported_scales_from": 1,
    "supported_scales_to": 1,
    "tags": [
      "service",
      "database",
      "embedded"
    ],
    "type": "embedded",
    "url": null,
    "usage_rates": [

    ],
    "version": "5.5",
    "website": "http://www.mysql.com"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "severity": "info",
      "text": "Showing cartridge mysql-5.5 for application myapp under domain mydomain"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
	    1.0,
	    1.1,
	    1.2,
	    1.3,
	    1.4,
	    1.5,
	    1.6
	  ],
	  "type": "cartridge",
	  "version": "1.6"
}

The API returns an error message if the user account does not allow additional gear storage.
{
    "api_version": 1.6,
    "data": null,
    "messages": [
        {
            "exit_code": 164,
            "field": null,
            "severity": "error",
            "text": "You are not allowed to request additional gear storage"
        }
    ],
    "status": "unprocessable_entity",
    "supported_api_versions": [
	    1.0,
	    1.1,
	    1.2,
	    1.3,
	    1.4,
	    1.5,
	    1.6
	  ],
	  "type": null,
	  "version": "1.6"
}
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.