More tools for Zend Server 8 on AWS Marketplace

We are happy to announce the release of an updated version of the Zend Server 8 AMIs on the AWS Marketplace.

As introduced in the previous version, using JSON in userdata, users can control many parameters of the new instance, and automate tasks to be executed during the boot process.

In this new version, we’re introducing the following new features:

  • Ability to choose a Zend Server Launch profile (development or production) using user data
  • Ability to specify a preparation script in user data to be downloaded and executed before Zend Server customization
  • Refined deployment using user data – new deployment parameters that allow specifying the path for a deployed application and multiple applications deployment

Launch Profile

When launching Zend Server, you have the option to choose between development and production profiles.

Up until now, when you specified the Zend Server admin password in JSON, Zend Server was launched by default with a production profile (except for development edition AMIs, which were launched with development profile). Now, we allow you to explicitly select a launch profile when starting instance using the new ZEND_BOOTSTRAP_PRODUCTION parameter.

  • ZEND_BOOTSTRAP_PRODUCTION (bool) – whether Zend Server should be bootstrapped for production (true) or development (false).

Here is a minimal example of using this parameter:

 

Preparation Script

In the previous release, we featured a customization script that could customize a server after the deployment of applications.

What we learned though, is that in some cases, customization has to be performed before application deployment. One of the most common cases in which this is required, is the installation of a local MySQL server when deploying a development environment. In such a case, MySQL needs to be installed prior to deployment of a web application.

For this purpose, we added two new parameters:

  • ZEND_PRE_SCRIPT_URL (string) – URL from which custom preparation script must be downloaded and executed.
  • ZEND_PRE_SCRIPT_PATH (string) – Absolute path where custom preparation script must be placed. If the path is a directory, then the script is saved in that directory with filename extracted from URL. After a reboot, this file will be overwritten by a re-downloaded script.

Here is a minimal example of using this parameter:

Multiple Deployments

In the previous release we featured the Automatic Deployment feature. In this release, we’ve upgraded it to allow multiple deployments to different paths.

For this we added one new parameter:

  • ZEND_DEPLOYMENTS (array) – array in which each item is an object that describes a deployment that will be done after Zend Server starts. The following is a list of possible keys for objects:
    • type (string) – required and must be one of “git”, “s3″ or “zpk”.
    • path (string) – required for all deployments and specifies into which path web application should be deployed. To deploy application to root, specify “/”.
    • url (string) – required for “git” and “zpk” deployments. Specifies URL from which git repository or ZPK file should be downloaded.
    • relativeRoot (string) – optional for “git” and “s3″ deployments. If specified, indicates which folder inside a deployment should be document root (or in case application is not deployed to root, which directory should be aliased in apache).
    • buket (string) – required for “s3″ deployment. Specifies from which S3 bucket application should be downloaded.
    • prefix (string) – optional for “s3″ deployment. Specifies which directory in S3 bucket should be downloaded.
    • name (string) – required for “zpk” deployment. Name of application that will appear in Zend Server UI after deployment.
    • params (array) – required for “zpk” deployment. Array of additional parameters that is passed to Zend Server during ZPK deployment. Keys of this array are names of parameters and respective values are values of parameters. Parameter values are scanned for string $IP and if it is found, then it is replaced with external IP of instance. This is useful, for example, when deploying WordPress application.

Here is an example:

We hope you enjoy the new Zend Server on AWS AMIs. The new features help you set up Zend Server, and enable easier application deployment.

Please send us any questions you have and feedback to @phpcloud.

The following two tabs change content below.

    Dima Zbarski

    Cloud Integration Engineer at Zend Technologies