Deploying an Application

Deploying an application is the process of copying, configuring and enabling a specific application to a specific base URL on Zend Server. Once the deployment process has finished, the application becomes publicly accessible on the base URL. The server carries out this two step process by first staging the application, and then activating it after successful staging.

The flow of the process is as follows:

Before deploying an application, you must have the complete application package ready.

Important!

Before deploying, ensure the size of your application package does not exceed the values set for the 'post_max_size' and 'upload_max_filesize' directives in the 'C:\Program Files\Zend\ZendServer\etc\php.ini' (Windows and IBMi) or '<zend>/gui/lighttpd/etc/php-fcgi.ini' (Linux and Mac OS X) files. The default settings for these directives is 512MB.

Note:

The deployment feature, including virtual host management, is only available for Zend Server running on Apache or nginx Web servers.

 

 

Instructions on how to complete a procedure

To deploy an application:

  1. In the UI, go to Applications | Manage Apps.
  2. In the Action bar, click .
    The Deploy Application wizard is displayed.

 

  1. Drag and drop your application package (.zpk) in the Deployment Package drop-box.
    -OR-
    Click Choose Files to browse and select your application package.
    After the progress bar reaches 100%, a success notification displays.

Note:

The uploaded package determines which of the wizard dialogs are enabled. Deployment steps that were not defined in the application's XML descriptor file will be ignored by the wizard.

  1. Click Next.
    The Readme dialog is displayed.

  1. Click Next.
    The Application Details dialog is displayed.

  1. Enter a display name, virtual host and path. The values for the virtual host and the path will make up your base URL.
    The dialog includes the following:
    • Display Name - The name that Zend Server will display for this application.
    • Virtual Host - This field automatically displays the default server that is defined on the Administration | Settings page. If you have not yet defined a default server, the default virtual host on your server will be used.
      Click the drop-down menu to select an existing virtual host managed by Zend Server.
      You can also add a new virtual host by clicking Add New.

      Note:

      SSL-secured virtual hosts can only be added via the Virtual Hosts page. For more information, see Working with Virtual Hosts.

    • Path - The second part of your base URL, which can only be a directory. As you type, Zend Server offers path suggestions, and updates the URL below.
      Specifying a file will cause the application to deploy with errors. Leaving this field empty will deploy the application on the virtual host's root.

When finished, click Next.

Note:

The base URL (or root URL) is the URL where the application is available after it has been deployed. The base URL is unique and cannot be shared between two applications, and each application is required to have a base URL. Using a pseudo URL is also acceptable.  

  1. If you specified a EULA in your application package, the License Agreement dialog is displayed.

  1. Mark the ‘I have read and agree to the license agreement’ checkbox and click Next.
    The Prerequisites Validation dialog is displayed.

  1. This dialog displays the parameters you specified as needing validation in your descriptor XML file.
    If your system does not qualify, an error message is displayed at the top of the dialog and the prerequisites in question appear in red. Click the link to open Zend Server in another tab in your browser, and then click Refresh after amending the specific dependencies.
    If all the parameters have been validated click Next.

Note:

If one or more of your parameters has failed to validate, open  your UI in another browser or tab, alter the configurations that need to be changed for the validation to succeed, and refresh the wizard.  

The User Parameters dialog is displayed.

  1. The parameters and values that appear in this dialog are the parameters, and their default values, which you defined in your descriptor XML file, such as usernames and passwords.
    Change any values that are different than the default, and click Next.
    The Deployment Summary dialog is displayed.

  1. The Deployment Summary dialog displays the details of the application to be deployed and a summary of the parameters you have defined for the application.
    To change anything on this page, click Previous and change it on the dialog it appears.
    Otherwise, click Deploy to deploy your application.
    Your application is deployed and added to the Applications list on the Applications | Manage Apps page.
  2. In the toolbar, the restart icon lights up , indicating a restart is needed to apply changes. Click to restart server and apply changes.
    For information on restarting in Zend Server, see Server Restart.

  1. To open your application click on your application in the Application page to expand the display, and click the Base URL link.

Tip:

If this process fails, information is available about the failure in the zdd.log file. In the UI, go to Monitoring | Logs to view log file.

Location of Your Deployed Application and Relevant Configuration Files

Zend Server will place your Apache configuration files during Zend Server installation, application configuration files  and application data in specific directories.

Apache Configuration Files During Zend Server Installation

During its installation, Zend Server detects if there is an existing default vhost:

  • If one is detected, Zend Server adds an include statement to the default virtual host, which points to ‘usr/local/zend/etc/sites.d’

  • If no default virtual host is detected, Zend Server creates one which points to ‘usr/local/zend/etc/sites.d'

Apache Configuration Files (During Zend Server Usage)

Your application configuration files are located in the following locations:

  • ‘usr/local/zend/etc/sites.d’
  • ‘usr/local/zend/etc/sites.d/http/__default__(or your default virtual host's name)'

Application Data

Your deployed application’s data is stored in:

  • Windows - ‘C:\Program Files\Zend\ZendServer\var\ data\http\__default__(or your  vhost’s name)\0\<application name>/<version>’
  • Linux - ‘usr/local/zend/var/ apps/http/__default__(or your vhost’s name)/0/<application name>/<version>’