Class Application
In: lib/openshift-origin-controller/app/models/application.rb
Parent: OpenShift::Cartridge

Methods

Constants

APP_NAME_MAX_LENGTH = 32
DEFAULT_NODE_PROFILE = "small"
UNSCALABLE_FRAMEWORKS = ["jenkins-1.4", "diy-0.1"]
SCALABLE_EMBEDDED_CARTS = ["mysql-5.1", "mongodb-2.2", "postgresql-8.4", "jenkins-client-1.4"]

Attributes

aliases  [RW] 
cart_data  [RW] 
comp_instance_map  [RW] 
configure_order  [RW] 
conn_endpoints_list  [RW] 
creation_time  [RW] 
destroyed_gears  [RW] 
domain  [RW] 
group_instance_map  [RW] 
group_override_map  [RW] 
init_git_url  [RW] 
ngears  [RW] 
node_profile  [RW] 
proxy_cartridge  [RW] 
scalable  [RW] 
ssh_keys  [RW] 
start_order  [RW] 
state  [RW] 
usage_records  [RW] 
user  [RW] 
user_agent  [RW] 
uuid  [RW] 
working_comp_inst_hash  [RW] 
working_group_inst_hash  [RW] 

Public Class methods

Find an application to which user has access @param [CloudUser] user @param [String] app_name @return [Application]

Find an applications to which user has access @param [CloudUser] user @return [Array<Application>]

@overload Application.get_available_cartridges(cart_type)

  @deprecated
  Returns List of names of available cartridges of specified type
  @param [String] cart_type Must be "standalone" or "embedded" or nil
  @return [Array<String>]

@overload Application.get_available_cartridges

  @return [Array<String>]
  Returns List of names of all available cartridges

@param [CloudUser] user @param [String] app_name Application name @param [optional, String] uuid Unique identifier for the application @param [deprecated, String] node_profile Node profile for the first application gear @param [deprecated, String] framework Cartridge name to use as the framwwork of the application

Public Instance methods

Convience method to cleanup an application

Provides an array version of the component instance map for saving in the datastore. @return [Array<Hash>]

Rebuilds the component instance map from an array of hashes or objects @param [Array<Hash>] data

Elaborates the descriptor, configures cartridges that were added to the application dependencies. If a node is empty after removing components, then the gear is destroyed. Errors that occur while removing cartridges are logged but no exception is thrown. If an error occurs while configuring a cartridge, then the cartirdge is deconfigures on all nodes and an exception is thrown.

Get the ApplicationContainerProxy object for the first gear the application is running on @return [ApplicationContainerProxy] @deprecated

Processes the application descriptor and creates all the gears necessary to host the application. Destroys application on all gears if any gear fails @return [ResultIO]

Deletes the application object from the datastore

Destroys all gears. Logs message but does not throw an exception on failure to delete any particular gear.

Parse the descriptor and build or update the runtime descriptor structure

Provide a list of direct dependencies of the application that are hosted on the same gear as the "framework" cartridge. @return [Array<String>] @deprecated

Invokes expose_port for a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge

Force stop a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge to stop. Set to nil for all dependencies. @param [Boolean] throw_exception_on_failure

Get the name of framework cartridge in use by the application @return [String] @deprecated

Get the name of framework cartridge in use by the application without the version suffix @return [String] @deprecated

Returns the first Gear object on which the application is running @return [Gear] @deprecated

Provides an array version of the group instance map for saving in the datastore. @return [Array<Hash>]

Rebuilds the group instance map from an array of hashes or objects @param [Array<Hash>] data

Get path for checking application health @return [String]

Reload a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge to reload. Set to nil for all dependencies.

Restart a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge to restart. Set to nil for all dependencies.

Saves the application object in the datastore

Provide a way of updating the component information for a given cartridge @deprecated

Get the state of the application on all gears.

Start a particular dependency on all gears that host it. If unable to start a component, the application is stopped on all gears @param [String] dependency Name of a cartridge to start. Set to nil for all dependencies. @param [Boolean] force_stop_on_failure

Retrieves status for a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge

Stop a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge to start. Set to nil for all dependencies. @param [Boolean] force_stop_on_failure @param [Boolean] throw_exception_on_failure

Invokes system_messages for a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge

Invokes threaddump for a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge

Invokes tidy for a particular dependency on all gears that host it. @param [String] dependency Name of a cartridge

[Validate]