SAFplus Runtime Director API  3.0.5
appdeploy Namespace Reference

Dynamically deploy applications to the cluster. More...

Classes

class  DeployError
 Basic error exception class for deployment problems. More...
 

Functions

def copyApp
 
def deployAppTgz
 DO NOT USE Deploy an application tar file to the cluster and tell the AMF about it. More...
 
def copySoftware
 Copy and install software from the controller node to a list of target blades. More...
 
def copySwInternal
 Private software copy implementation. More...
 
def deploy
 Deploy an opened and verified application to the cluster and tell the AMF about it. More...
 
def createModel
 
def installModel
 
def Test
 

Variables

string TEMP_DIR = "/tmp/openclovis/"
 
string APP_CFG_FILE = "appcfg.xml"
 
tuple APP_CFG_FILE_VAR = (1,0,0,0)
 

Detailed Description

Dynamically deploy applications to the cluster.

Python imports

Function Documentation

def appdeploy.copyApp (   fromdir,
  to,
  appDir = None 
)
def appdeploy.copySoftware (   appFile,
  tgtblades,
  abortIfCantAccess = False 
)

Copy and install software from the controller node to a list of target blades.

Unlike deploy this function does not modify the AMF state, it ONLY copies the application onto nodes.

Parameters: appFile: Object of type aspApp.AppFile describing what the bundle to be installed. tgtblades: List of objects of type aspAmfEntity.AmfNode indicating what nodes to install the bundle onto. abortIfCantAccess: If TRUE the function will raise an exception if a Node is not accessible, otherwise it will continue onto the other Nodes

Exceptions (only if abortIfCantAccess=True): psh.ExceptionErrorCode, pxssh.EOF: These exceptions are node access issues

Returns: (errors,notes) errors is a list of strings describing any installation failures (if abortIfCantAccess=False installation failures will be put here) notes is a list of strings describing any logs, etc.

def appdeploy.copySwInternal (   cfg,
  srcDir,
  tgtblades,
  abortIfCantAccess = False 
)

Private software copy implementation.

def appdeploy.createModel (   fromdir,
  cfg,
  tgtblades,
  specifiedNodes 
)
def appdeploy.deploy (   fromdir,
  cfg,
  tgtblades = None,
  amfSession = None,
  abortIfCantAccess = False,
  copy = True,
  deploy = True 
)

Deploy an opened and verified application to the cluster and tell the AMF about it.

This function takes an directory containing an application and an application configuration. It deploys the app all necessary blades, and programs the appropriate entities into the AMF. It is a functional breakdown of the deployAppTgz to be used when you want to do a 3 step deploy:

  1. Open .tgz (openAppFile())
  2. Modify the application or its configuration (custom)
  3. deploy it (this function)

Parameters: cfg: Parsed application configuration (object of type dot.Dot()), describing the deployment details tgtblades: Optional: What blades should be used. If not specified, all blades are candidates for deployment amfSession: Optional: a aspAmf.Session instance (otherwise I will create one) abortIfCantAccess Optional: If a blade is not accessible, abort the deployment (default FALSE) copy: Optional: pass False to NOT copy the software to the nodes (default true) deploy: Optional: pass False to NOT deploy the sg into the AMF (default true)

Exceptions: DeployError(base misc.Error): Raised when shell commands return error codes

Returns: ([service_groups],([errors],[notes])

  • service_groups: A list of Service Groups (primarily so you can start this app, but you can also traverse to get all application-specific entities). Create in the AMF
def appdeploy.deployAppTgz (   file,
  amfSession = None 
)

DO NOT USE Deploy an application tar file to the cluster and tell the AMF about it.

This top-level function takes a .tgz file, deploys it to all blades, and programs the appropriate entities into the AMF.

Parameters: file: Filename and path of the application .tgz archive amfSession: Optional: a aspAmf.Session instance (otherwise I will create one)

Exceptions: misc.Error: Raised when shell commands return error codes

Returns: [service_groups] service_groups: A list of Service Groups (primarily so you can start this app, but you can also traverse to get all application-specific entities).

def appdeploy.installModel (   appname,
  appver,
  entities,
  amfSession = None 
)
def appdeploy.Test ( )

Variable Documentation

string appdeploy.APP_CFG_FILE = "appcfg.xml"
tuple appdeploy.APP_CFG_FILE_VAR = (1,0,0,0)
string appdeploy.TEMP_DIR = "/tmp/openclovis/"