This section describes commands that control an n-tiered application running on the grid.
Prepare application for running. Note that 'app build' is implied by the 'application start' command.
application build <name> [ store=<store> ]
Name of application to build
Specifies which volume store in which instance volumes are created. May be set to one of the following values:
local - Store volumes on local server storage
san - Store volumes on a SAN
Build my-app
Clean an application.
application clean name
Name of application to clean
Clean application 'lamp'
Note: This command will fail if the application has already been started or is in an intermediate state.
Show or modify application configuration parameters.
Application configuration parameters specified by <prop> can be one of the following:
The value specifies a comma separated list of one or more network resources to which the interface is to be connected. A network resource has the following format:
[[_net.]<networkname>.]<ipaddr>
This is a text representation of an IP address optionally prefixed by a network name. If the IP address does not appear in multiple networks, just <ipaddr> is allowed.
host.<hostname> - Refers to the IP address that corresponds to <hostname> (via gethostbyname()). The IP address must be present in the list of network resources and be unique. In other words it cannot appear on multiple networks (i.e., VLANS).
app config ( <name> | . ) [ --batch ] [ --effective ]
app config ( <name> | . ) --boundary
app config ( <name> | . ) [ --reset ] [ <prop>=<val> ]* [ --d <prop> ]*
[ --verify ]
app config ( <name> | . ) [ <prop>=<val> ]* [ --d <prop> ]* [ --test_only ]
[ --verify ]
app config ( <name> | . ) [--template=<app> [ --skip_rsc } }
[ <prop>=<val> ]* [ --test_only ] [ --verify ]
app config ( <name> | . ) [ --stdin ] [ --verify ]
Display the effective configuration for an application - essentially merging the default and the explicitly overridden values.
Show application boundary (that is, list of properties that may be configured)
Reset all properties to default
Name of application whose configuration is to be used as a base configuration before applying any configuration parameters specified on the command line.
Do not propagate any resource settings from the template application.
Change a property setting.
Reset property to default
Test provided configuration parameters, do not set
Display output in UDL format
Verify that all mandatory properties are set. If not all mandatory properties are set, the command will fail.
Take configuration parameters from standard input - The format is the same as the output of:
'app config <name> --batch'.
app config app1
Show current configuration for app1
app config app1 --boundary
Show configurable parameters for app1
app config app1 --reset
Reset app configurable parameters for app1 to defaults
app config app1 --template=mytemplate user_ip=192.168.1.2 admin_ip=192.168.1.3
configure application 'app1' using configuration parameters from application 'mytemplate' and set user_ip and admin_ip
app config app1 iface.pub=_net.vlan0.192.168.1.2 iface.pub1=_net.vlan1.192.168.2.3
configure application external interfaces 'pub' and 'pub1'
'app config mytemplate --batch | app config myapp --stdin'
in that the configuration from 'mytemplate' is configured on 'myapp'.
This topic contains command output specification.
The output is the following when --batch is not specified:
application : <app> <name> : <val> ...
The output is the following when --batch is specified:
appconfig <app>
{
<name> = <val>
...
}
can be one of the following:
Continue starting an application.
application continue name
Name of application to continue starting
application continue lamp
Continue starting application 'lamp'
Note: This command is used to continue the starting of an application that was started with --debug option and one of the components of the application failed to start.
Copy an application.
application copy <src> <dst> [store=<store>] [--fscpy [--prefill]] [--novols]
Name of application to copy
Name of copied application
Specifies which volume store in which the application volumes are created. May be set to one of the following values:
* local - Store volumes on local server storage
* san - Store volumes on a SAN
Copy volumes using filesystem-level copy rather than block-level copy.This is useful if there are volumes that are large and have little data stored on them.
Allocate ALL blocks of copied application volumes. This option is only valid if --fscpy is specified; otherwise it is ignored.
Do not copy the application volumes (descriptors only)
application copy my-app my-app2
copy application 'my-app' to 'my-app2'
Create an application.
application create name
Name of application to create
application create lamp
Create application 'lamp'
Note: This command will fail if there is already an application installed with the same name. The result of this command is that a directory is created for the application under the AppLogic/apps directory and template binding and application descriptors are created.
Destroy an application.
application destroy name [ --force ]
Name of application to destroy
Do not ask the user anything
application destroy lamp
Destroy application 'lamp'
Note: If the application is running, this command will fail. If the --force option is not specified, the user is asked if he really wants to destroy the application. The result of this command is: All volumes, component descriptors, and application descriptor are deleted. The application directory under the AppLogic/apps directory is also deleted.
Export an application.
application export <name> [<dir>] [file=<file>] [--force] [--nocompress | --novols] [ --preserve_acl | --preserve_local_acl | --preserve_global_acl ]
Name of application to export
Name of exchange directory relative to /vol/_impex where the application is to be exported. If not specified, the exchange directory name is the same as the application name.
Name of tar file to contain the exported application. The specified file must have one of the following extensions:
create a tar archive without compression
create a zipped tar archive
create a bzip2 tar archive
Overwrite contents of <dir> if not empty or <file>if it exists.
Do not compress application volumes
Do not export the application volumes
Preserve the application ACL if it is present.
Preserve local principals in the application ACL.
Preserve global principals in the application ACL.
export application 'my-app' to '/vol/_impex/app'
export application 'my-app' to '/vol/_impex/my-app'
export the descriptors for application 'my-app' to '/vol/_impex/app'
export the application and create bzip2 tar archive.
Notes:
Display the application ACL or display portion of the application ACL which relates to a user principal.
application get_acl <name> [ <principal> ] [ --batch ]
Name of the application
Name of a principal. <principal> is in the following form:
Local user or group.
Global user or group.
A qualified principal name where where <scope> is 'global' or 'local', <type> is 'group' or 'user', and <name> is the group or user name.
The ID of the principal. For example: ‘@67fb02d7-eaf4-4943-aaf8-37bad5d26f0c’
Display output in UDL format.
application get_acl my-app
Display the application ACL.
application get_acl my-app local:user:admin
Display the application ACL entry for local user 'admin'.
application get_acl my-app admin
Display the application ACL entry for local user 'admin'.
The output of this command is as follows:
Non-batch output
--- Owner Information --- ID Scope Type Name ------------------------------------------------------------------------- val val val val --- Entry Information --- ID Scope Type Name Access -------------------------------------------------------------------------------- val val val val val ... The value of Scope is local or global. The value of Type is user or group. The value of Access is a comma separated list of access levels or permissions. If the principal is a local user or group which has been deleted, the value for Scope, Type and Name is *.
Batch output
acl
{
owner : id="val" # scope type name
entries
[
id="val", access_level1, ... access_levelN, permission1, ... permissionN # scope type name
...
]
}
Display application package descriptor.
application get_desc app
name of application for which package descriptor is to be displayed
application get_desc my-app - display package descriptor for application my-app
Import an application.
application import <name> [<dir>| <file>][ mirrored=<val>| --novols ]
[ store=<store> ][ user=<user>[ pwd=- ]
[ --preserve_acl | --preserve_local_acl | --preserve_global_acl ] ]
Name of imported application
Name of exchange directory from which the application is to be imported. The directory may be one of the following:
- directory relative to /vol/_impex
- URL with the following format 'http://<path>'
If not specified, the exchange directory name is the same as the application name.
Name of tar file relative to /vol/_impex containing the previously exported application. The archive file must be one of the following types:
- tar archive
- tar archive with gzip compression
- tar archive with bzip2 compression
If set to 1, create all application's volumes as mirrored.
Do not import the application's volumes
Specifies the volume store where volumes are created. May be set to one of the following values:
local - store volumes on local server storage
san - store volumes on a SAN
Name of user to use for authentication purposes when importing the application from a URL
(Optional) Prompt for password to use for authentication purposes when importing the application from a URL. If the standard input is not a terminal device, it will not print a prompt and expect only one copy of the password on 'stdin'. This can be used for batch operations, to set the password from a file.
Preserve the application ACL if it is present.
Preserve local principals in the application ACL.
Preserve global principals in the application ACL.
application import my-app2 app2
Import application 'my-app2' from 'app2' directory on the impex volume.
application import my-app3
Import application 'my-app3' from 'my-app3' directory on the impex volume.
application import my-app1 app1 --novols
Import application descriptors for 'my-app1' from 'app1' directory on the impex volume.
application import my-app http://mysrv.com/myapp
Import application 'my-app' from URL 'http://mysrv.com/myapp'
application import my-app myapp.tar.bz2
Import application from bzip2 archive myapp.tar.bz2 on the impex volume.
Notes:
Show application information. The following types of information are displayed:
description, state, id, total number of components and running components, total cpu, memory and bandwidth usage.
application info name [ --batch ] [ --verbose ]
Name of application for which to display information
Include detailed information for each component
Display output in UDL format
application info lamp
Display information for application 'lamp'
Note: A specification of the output of this command can be found here.
Name : Lamp_r19 Description : LAMP Application for s390 (v2.0.1-1) ID : 3 Documentation URL : http://doc.3tera.com/AppLogic30z/RefAppsLamp.html Template : yes Locked : no User1 : User2 : Destroy on Stop : no State : stopped CPU : 1.05 Memory : 1.53 GB (1567.74 MB) Bandwidth : 900 Mbps Default Login Appliance :
This topic contains command output specification.
The output of this command is the following:
Name : val Description : val Tag : val ID : val Documentation URL : val Template : yes/no Locked : yes/no User1 : val User2 : val Destroy on Stop : yes/no State : state Target State : val CPU : val Memory : val MB/GB Hypervisor Memory : val MB/GB Bandwidth : val Mbps Default Login Appliance : val Default Appliance Options: ssh:22,text
The following is also displayed for each component if --verbose is specified:
Name, CPU, Memory(MB)Alloc/Service, Bandwidth, Server, State
If --batch option is specified, the output of this command is the following:
application <name>
{
description = "val"
tag = "val"
id = val
doc_url = "val"
template = val
locked = val
user1 = "val"
user2 = "val"
destroy_on_stop = val
state = val
target_state = val
cpu = val
mem = val
mem_hypervisor = val
bw = val
dflt_appliance = "val"
dflt_appliance_opts = "val"
incomplete = val
}
If --verbose option is specified the following is displayed for each component:
component name : cpu=val, mem=val, bw=val, server=val, state=val
}
List applications. The following types of information are displayed:
name, ID, description, and state.
application list [ --active ] [ --template ] [ --batch ] [ --verbose ]
List only active running applications
List only template applications.
Display output in UDL format.
Include application ID and description in output.
application list
List all applications with their descriptions
Note: A specification of the output of this command can be found here.
Name State Template ---------------------------------------------------------------------- BackupHelper_r1 stopped yes Lamp_r2 stopped yes LampX4_r2 stopped yes MigHelper stopped yes Sys_Filer_Linux stopped yes Sys_Filer_Windows stopped yes TWiki_r2 stopped yes VDS_CentOS50_r3 stopped yes VDS_CentOS51_r3 stopped yes VDS_Win03_r2 stopped yes VDS64_CentOS50_r3 stopped yes VDS64_OSOL_r2 stopped yes
This topic contains command output specification.
The output of this command is a table which contains the following columns. ID and Locked are displayed only if --verbose is specified.
If --batch option is specified, the output of this command is the following for each application:
application name : state=val, id=val, template=val, [locked,] user1=val, user2=val, cpu=val , mem=val , bw=val, incomplete=val, tag="val", description="val", doc_url="url", destroy_on_stop=val
state may be stopped, standby, starting, maintenance, running, stopping, restarting, restart_stopping, building, failed, unknown
Lock an application.
application lock app [ pwd=-]
name of application to be locked
Prompt for the password used to unlock the application. If the standard input is not a terminal device, it will not print a prompt and expect only one copy of the password on 'stdin' (this can be used for batch operations, to set the password from a file).
application lock my-app
Lock application my-app
application lock my-app pwd=-
Lock application my-app and prompt for password
Note: A password is required for a non-maintainer to lock an application.
If the pwd argument is specified, it is required to unlock the application.
When an application is locked, no volumes belonging to the application may be managed and the application cannot be modified in any way
See Application and Class Locking Reference for more information.
Access the console of the default component of an application. A single component of the application may be specified to provide the console for the application.
application login name [--ssh] [console=text|graphic] [--force] [--abort] [command]
Name of application whose console is going to be accessed.
SSH into the default component of the application (default)
Access a text console of the default component of the application.
Access a graphical console of the default component of the application.
Take control of console (kill existing console)
Kill existing console (if any)
Optional command line to execute. If there is more than one argument, the command must be enclosed in quotes (for example, "ls /tmp"). This argument is only valid if --ssh is specified.
SSH into default component of application 'sugarcrm'
SSH into default component of application 'sugarcrm' and execute ls /tmp
Note: A single application component may be specified as the default login console by right-clicking on the component within the CA AppLogic Editor and selecting "Set Default Console" from the context menu.
When no console options are specified, login to the application using the default console that is specified for the application’s default component.
This command will fail if the application or default component is not started.
The ssh login is performed using a special appliances ssh key installed on your grid. This key does not need a passphrase -- it is assumed that if you are logged in on the controller, you are authorized to log in on the appliances. Contact Technical Support if you cannot log in on an appliance or if you believe your appliance key has been compromised and want to have it replaced.
This command is similar to executing comp login app:comp where app:comp is the name of the component that is specified as the default console of the application.
Only one console type may be specified – ssh, text, graphic.
The --force and --abort options are only valid for text and graphic consoles.
Whenever a user logs into an appliance, CA AppLogic creates an environment variable named _APPLOGIC_USERID which contains the name of the user that logged into the appliance. This is only valid if the appliance uses the dhcp configuration mode (APK).
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|