davidl-zend / zend-server-php-build-pack

Early Preview - Zend Server PHP build-pack for cloud foundry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is a release preview of a build pack provides Zend Server on Cloud Foundry. Current version is 6.1. In the future the web server and Zend Server binaries will be probably be moved to the stack. This will save space for each container and make pushes and restart almost instant. For the time being they are included in the build pack for portability and ease of installation. Use this build pack at your own risk.

Buildpack components

  • Zend Server 6.1 Enterprise edition.
  • Zend Server 6.1 configuration files
  • PHP 5.4
  • Nginx web server

Installation

Requirements

  • Working cloud foundry v2 environment with dea_ng and gorouter
  • The lucid64 cloud foundry stack should be installed and enabled - check settings in /vagrant/dea_ng/config/dea.yml
  • xz compression utility - it's installed automatically by vagrant if you follow the guide below

The buildpack is tested against a system generated by the vagrant installer: http://blog.cloudfoundry.com/2013/06/27/installing-cloud-foundry-on-vagrant/

Instructions

Clone the git repo into the buildpack directory on your dea_ng node using the command: git clone https://github.com/zendtech/ZendServerBuildpack

Alternatively you can clone the repo into a webserver in your environment and specify the buildpack to the cf client f.e cf push --buildpack=http://url-to-cloned-repo or https://github.com/davidl-zend/zend-server-php-build-pack (you can save this value in the app's manifest.yml). This method is not recommended for now since the buildpack is rather large for now.

Usage

  1. Create a folder on your workstation and "cd" into it.
  2. Create an empty file named "zend_server_php_app" (if you don't do this then you'll have to manually specify which buildpack to use for the app).
  3. Issue the "cf push" command (choose to save your manifest when asked to by the cf client).
  4. Edit the "manifest.yml" that was generated by step 3 - add the "env" section and set the values to be used for the Zend Server GUI password.
---
env:
  ZS_ACCEPT_EULA: 'TRUE'
  ZS_ADMIN_PASSWORD: '1234'
applications:
- name: dave2
  instances: 1
  memory: 512M
  host: dave2
  domain: vcap.me
  path: .
  1. wait for the app to start.
  2. Once the app is started you can access the Zend Server GUI at http://url-to-your-app/ZendServer, For example : http://dave2.vcap.me/ZendServer . If you forgot to perform step 4 then the password for the GUI will be "changeme".
  3. Enter a user name and password to use to authenticate with the GUI.

Known issues

  • Deployment of applications (zpk packages) from the Zend Server GUI might fail. A workaround is to patch the lucid64 stack on your dea_ng node with the script below.
#TODO: This should really be in the script that creates the rootfs
#Point ROOTFS to the directory that really holds the warden rootfs (the template used for creating the containers that run the droplets)
ROOTFS=/var/warden/rootfs
sudo mkdir -p $ROOTFS/usr/share/nginx
sudo ln -s -f /app/www $ROOTFS/usr/share/nginx/html 
  • Code tracing does not yet work in this version.
  • Scaling is not yet supported.
  • You can change settings using the gui and apply them - but they won't survive application pushes and restarts.
  • Application generated data is not persistent (this is a limitation of Cloud Foundry) unless saved to a third party storage provider (like S3).
  • You'll be asked to re-bootstrap Zend Server after each app push/restart (Please note that this is optional - I've pre-entered license details so all features should work without this. It is only necessary for using the Zend Server GUI or API).
  • Mysql is not used automatically - If you require MySQL then you'll have to setup your own server and configure your app to use it.
  • Each container has their own full copy of Zend Server at the moment so it consumes about 300MB.

About

Early Preview - Zend Server PHP build-pack for cloud foundry

License:Other


Languages

Language:Shell 88.5%Language:PHP 11.5%