Deployment Methods

The following is a list of methods available for the deployment feature:

  • The applicationGetStatus Method
  • The applicationDeploy Method
  • The applicationUpdate Method
  • The applicationRemove Method
  • The applicationSynchronize Method
  • The applicationRollback Method

Possible Deployment Action Specific Error Codes:

HTTP Code Error Code Description
500 serverVersionMismatch One or more servers in the cluster is a Zend Server that does not support the deployment feature.
license New BSD License
link for the canonical source repository
author Ingo Walz
category Zend
package Zend_Service
subpackage ZendServerAPI

 Methods

Base constructor for all API-method implementations

__construct(string $name) 
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::__construct()

Parameters

$name

string

Name of the config

<b>The applicationDeploy Method</b>

applicationDeploy(string $file, string $baseUrl, boolean $createVhost, boolean $defaultServer, string $userAppName, bool $ignoreFailures, array $userParams) : \ZendService\ZendServerAPI\DataTypes\ApplicationInfo
Deploy a new application to the server or cluster.
This process is asynchronous, meaning the initial request will wait until the application is uploaded and verified,
and the initial response will show information about the application being deployed.
However, the staging and activation process will proceed after the response is returned.
You must continue checking the application status using the applicationGetStatus method until the deployment process is complete.

Parameters

$file

string

File object of ZPK file

$baseUrl

string

The baseurl to which the application will be deployed

$createVhost

boolean

create VHost

$defaultServer

boolean

Deploy the application on the default server

$userAppName

string

Free text for user defined application identifier

$ignoreFailures

bool

ignore errors during staging on some servers

$userParams

array

Set values for user parameters defined in package

Returns

<b>The applicationGetStatus Method</b>

applicationGetStatus(array $applicationIds) : \ZendService\ZendServerAPI\DataTypes\ApplicationList
Get the list of applications currently deployed (or staged) on the server or the cluster and information
about each application. If application IDs are specified, this method will return information about the
specified applications. If no IDs are specified, this method will return information about all applications on
the server or cluster.

Parameters

$applicationIds

array

Ids of application's

Returns

<b>The applicationRemove Method</b>

applicationRemove(int $appId) : \ZendService\ZendServerAPI\DataTypes\ApplicationInfo
This method allows you to remove an existing application. This process is asynchronous, meaning the
initial request will start the removal process and the initial response will show information about the
application being removed. However, the removal process will proceed after the response is returned.
You must continue checking the application status using the applicationGetStatus method until the
removal process is complete. Once applicationGetStatus contains no information about the application, it
has been completely removed

Parameters

$appId

int

The application's ID

Returns

<b>The applicationRollback Method</b>

applicationRollback(int $appId) : \ZendService\ZendServerAPI\DataTypes\ApplicationInfo
Rollback an existing application to its previous version. This process is asynchronous, meaning the initial
request will start the rollback process and the initial response will show information about the application
being rolled back. You must continue checking the application status using the applicationGetStatus
method until the process is complete.

Parameters

$appId

int

The application's ID

Returns

<b>The applicationSynchronize Method</b>

applicationSynchronize(int $appId, array $servers, bool $ignoreFailures) : \ZendService\ZendServerAPI\DataTypes\ApplicationList
Synchronizing an existing application, whether in order to fix a problem or to reset an installation. This
process is asynchronous, meaning the initial request will start the synchronize process and the initial
response will show information about the application being synchronized. However, the synchronize
process will proceed after the response is returned. You must continue checking the application status
using the applicationGetStatus method until the process is complete.

Parameters

$appId

int

The application's id

$servers

array

Array of server IDs to perform action on

$ignoreFailures

bool

Ignore failures during staging on some servers

Returns

<b>The applicationUpdate Method</b>

applicationUpdate(int $appId, string $package, bool $ignoreFailures, array $userParams) : \ZendService\ZendServerAPI\DataTypes\ApplicationInfo
This method allows you to update an existing application. The package you provide must contain the
same application. Additionally, any new parameters or new values for existing parameters must be
provided. This process is asynchronous, meaning the initial request will wait until the package is uploaded
and verified, and the initial response will show information about the new version being deployed.
However, the staging and activation process will proceed after the response is returned. You must
continue checking the application status using the applicationGetStatus method until the deployment
process is complete.

Parameters

$appId

int

The application's ID

$package

string

The application's package

$ignoreFailures

bool

Ignore failures during staging on some servers

$userParams

array

Set values for user parameters defined in package

Returns

Check if connection is possible or not

canConnect() : bool
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::canConnect()

Returns

bool

Disables the logging

disableLogging() : void
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::disableLogging()

Enables the logging

enableLogging() : void
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::enableLogging()

Get the plugin manager

getPluginManager() : \Zend\ServiceManager\PluginManager
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::getPluginManager()

Returns

\Zend\ServiceManager\PluginManager

Returns the current request

getRequest() : \ZendService\ZendServerAPI\Request
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::getRequest()

Returns

Set the client.

setClient(\Zend\Http\Client $client) : void
Inherited

Most likly for testing

inherited_from \ZendService\ZendServerAPI\BaseAPI::setClient()

Parameters

$client

\Zend\Http\Client

Set the config file.

setConfigFile(string $configFile) : void
Inherited

Proxy to the pluginmanager for initialization

inherited_from \ZendService\ZendServerAPI\BaseAPI::setConfigFile()

Parameters

$configFile

string

Set the request for the current context

setRequest(\ZendService\ZendServerAPI\Request $request) : void
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::setRequest()

Parameters

Wait for application not beeing in the list

waitForRemoved(int $applicationId, int $interval) : boolean

Parameters

$applicationId

int

The application's ID

$interval

int

Seconds to repeat test

Returns

boolean

Wait for status = deployed on the application, check every $interval seconds

waitForStableState(int $applicationId, int $interval) : \ZendService\ZendServerAPI\DataTypes\ApplicationInfo

Parameters

$applicationId

int

The application's ID

$interval

int

Seconds to repeat test

Returns

Get the first event groups identifier by an given issue id.

getFirstEventGroupsIdByIssueId(int $issueId) : int
Inherited

This will perform an monitorGetIssuesDetails action.

inherited_from \ZendService\ZendServerAPI\BaseAPI::getFirstEventGroupsIdByIssueId()

Parameters

$issueId

int

Returns

int

 Properties

 

$name : string
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::$$name
 

$pluginManager : \ZendService\ZendServerAPI\PluginManager
Inherited
inherited_from \ZendService\ZendServerAPI\BaseAPI::$$pluginManager

 Constants

 

Break loops for wait methods after this number of tries

DEFAULT_WAITINTERVAL : int