Guidelines for deploying PHP applications

Similar documents
PHP PERFORMANCE. Principles and Tools. By Kevin Schroeder Technology Evangelist Zend Technologies. Copyright 2007, Zend Technologies Inc.

Application Deployment With Zend Server 5.5 Beta

TM DevOps Use Case TechMinfy All Rights Reserved

Zend PHP Cloud Application Platform

C R E AT I N G A V I R T U A L N ET W O R K K R U N A L T R I V E D I W W W. T E C H T R A I N I N G P O I N T. C O M

Aspirin as a Service: Using the Cloud to Cure Security Headaches

Introduction to Windows Azure. Managing Windows Azure. Module Manual. Authors: Joey Snow

CONTRAIL SECURITY. Contrail Cloud Networking & Security

PHP Composer 9 Benefits of Using a Binary Repository Manager

Understanding the Dark Side

Sucuri Webinar Q&A HOW TO IDENTIFY AND FIX A HACKED WORDPRESS WEBSITE. Ben Martin - Remediation Team Lead

Build & Launch Tools (BLT) Automating best practices for enterprise sites

Deployment Tools and Techniques

IBM i Modernization with PHP

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Developing Fast with

Deployment Planning Guide

9 Reasons To Use a Binary Repository for Front-End Development with Bower

Project Management. Projects CHAPTER

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

OpenStack Lab on VMware Workstation Setting up the All-In-One VM

Tools. SWE 432, Fall Design and Implementation of Software for the Web

Elizabeth Lawler CEO & Co-Founder Conjur,

DevOps + Infrastructure TRACK SUPPORTED BY

Composer and Drupal. CIDUG Meeting December 13, 2018 John Rearick

Installing or Upgrading ANM Virtual Appliance

This video is part of the Microsoft Virtual Academy.

Requirements (business, functional, technical) End User Customer. Subject Matter Experts Stakeholders

Stress-free Deployment

SQL Server Virtualization 201

QAD Cloning and Migrating

ArcGIS for Server Michele Lundeen

USING GIT WITH, AND AUTOMATING MUNKI. Adam Reed

Application Deployment

symfony Open Source Enterprise Framework

Scaling DreamFactory

Win-Back Campaign- Re-Engagement Series

sqamethods Approach to Building Testing Automation Systems

Reference manual Integrated database authentication

Actian Hybrid Data Conference 2017 London Actian Corporation

Configuring WordPress for Multiple Environments

HPC Downtime Budgets: Moving SRE Practice to the Rest of the World

AEM Code Promotion and Content Synchronization Best Practices

Using WebGallery, WebDeploy and some IIS Extensions

Securing the PHP Environment with PHPSecInfo. Ed Finkler

Copyright 2016 Pivotal. All rights reserved. Cloud Native Design. Includes 12 Factor Apps

Web Servers and Security

Portal Application Deployment Scripting

AVOIDING THE GIT OF DESPAIR

Mission-Critical Enterprise Cloud Applications

Cold, Hard Cache KV? On the implementation and maintenance of caches. who is

Creating a Hybrid Gateway for API Traffic. Ed Julson API Platform Product Marketing TIBCO Software

A deep-dive into Azure Networking!

IT Change Management. (User manual) For further information, visit us at For support, contact us at

About HP Quality Center Upgrade... 2 Introduction... 2 Audience... 2

Hadoop Security. Building a fence around your Hadoop cluster. Lars Francke June 12, Berlin Buzzwords 2017

KV Store: Hammer Time

LENS Server Maintenance Guide JZ 2017/07/28

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Painless switch from proprietary hypervisor to QEMU/KVM. Denis V. Lunev

Technical Comparison Sheet: ez Platform Cloud vs Other Hosting Approaches

WHITEPAPER Rewrite Services. Power365 Integration Pro

Let s say that hosting a cloudbased application is like car ownership

How Can Testing Teams Play a Key Role in DevOps Adoption?

Gentoo Linux. Software Freedom Day 2010 Charleston, SC Linux User Group. Presentation by Kevin Bowling

Drupal Hosting. April 19, Northeast Ohio Drupal User Group 1

Project 1 Balanced binary

Windows Azure Solutions with Microsoft Visual Studio 2010

Seminar report Google App Engine Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Improve WordPress performance with caching and deferred execution of code. Danilo Ercoli Software Engineer

Backup and recovery of vsphere VCSA and Platform Services Controllers

Dialogic PowerMedia Media Resource Broker (MRB)

Skype for Business Server 2019 Preview Deployment Guide

Improving Application Performance by Submitting Scripts to Batch using Zend Server for IBM i

VMWARE NSX & OTRS. Automating Security with Help Desk Systems

The Idiot s Guide to Quashing MicroServices. Hani Suleiman

Ellipse Web Services Overview

October 23, CERN, Switzerland. BOINC Virtual Machine Controller Infrastructure. David García Quintas. Introduction. Development (ie, How?

Web Hosting. Important features to consider

Introduction. 1.1 Who this book is for. This chapter covers. What the book will and won t teach The boundaries of this book Going beyond PowerShell

Optimizing LAMP Development with PHP5

REASONS TO USE A BINARY REPOSITORY MANAGER WHEN DEVELOPING WITH. White Paper

Continuous Delivery the hard way with Kubernetes. Luke Marsden, Developer

Cloud Services. Introduction

AD Sync Client Install Guide. Contents

Infinity Management Guide

The Actual Real World at EclipseCon/ALM

Lessons Learned: Deploying Microservices Software Product in Customer Environments Mark Galpin, Solution Architect, JFrog, Inc.

Implementing the Twelve-Factor App Methodology for Developing Cloud- Native Applications

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

Funny Oracle Error Code Table Not Found

PIMCORE TRAINING GUIDE

AcmeAir: Lessons learned from a large-scale cloud deployment

Microservices. SWE 432, Fall 2017 Design and Implementation of Software for the Web

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

Why Choose MS Azure?

ArcGIS for Server: Administration and Security. Amr Wahba

Docker and Security. September 28, 2017 VASCAN Michael Irwin

Setting up Kubernetes with Day 2 in Mind. Angela Chin, Senior Software Engineer, Pivotal Urvashi Reddy, Senior Software Engineer, Pivotal

SARDINA. Zero-Downtime Operations at UK s largest academic private cloud: University of Edinburgh

Transcription:

Guidelines for deploying PHP applications By Kevin Schroeder Technology Evangelist Zend Technologies

About me Kevin Schroeder Technology Evangelist for Zend Programmer Sys Admin Author IBM i Programmer s Guide to PHP You want to do WHAT with PHP? Coming up Race Ferraris on the weekend My Honda has a dismal win record

If you have a question you can Type in the Q&A panel Zend Technologies Follow us! http://twitter.com/zend http://twitter.com/kpschrade (me!)

Agenda What we will be talking about Deployment->Testing->Staging->Production Rsync/SVN/PEAR/yum mechanisms What we will not be talking about Build tools (Phing, Maven, etc.) Database versioning/deployment Continuous Integration MSI installs (Sorry MS folks, I really wanted to but, y know, time) Test-Driven Development

Application Stages Development Testing/QA Staging Production 5 Increasing Maturity of PHP Applications

Maturity Benefit Where are you? Uptime!! Distinct Dev Environments Testing & Validating Application Testing & Validating Environment Structure 6 Increasing Maturity of PHP Applications

Development Purpose To provide developers an environment to write their code Characteristics Should be similar to production, though it usually isn t Often more open security Usually local to the developer, though not required

Testing Purpose To provide a non-programming environment to test functionality Characteristics Continuous Integration could be included Generally no development occurs, only testing Developers should not do the testing, if possible Restricted outbound networking Use Zend Server Monitoring and Code Tracing to help reproduce errors

Prepared for and handed off to System Administrators (the stuff we re here to talk about)

Staging Purpose To test your deployment process/scripting (not your code) Characteristics Developers generally do not have access, unless they are also the sysadmin Very restricted outbound networking Mirrors production as best as possible

Change Control A formal process used to ensure that changes are introduced in a controlled and coordinated manner Protect against unnecessary changes introduced to a system without forethought Requires documenting the release process Software version number Plans for rollback (tested? y/n) Expected outage time Customer impact Done prior to doing anything in production

Pre-Production (Optional) Purpose Test the code in the production environment without impacting customers Characteristics Not likely to have use in the cloud or large scale deployments Deployed in production immediately prior to making it live Test the application with production settings without customer interaction

Production Purpose Do whatever it is that it s supposed to be doing Characteristics Developers do not have access (as they might be tempted to fix something) Deployment should be done without requiring developer input Very limited inbound traffic generally only the service that is being served. i.e. HTTP

Application considerations Build the application to be aware of different environments Zend_Config_* is good at this Do not set the environment type in your code Environment variables can be placed in server config It means that you won t accidentally keep your development settings turned on in production Make production your default environment Keeps accidental data leakage to a minimum

Deployment Option 1 rsync Benefits Easy Already installed on your system Drawbacks No deployment script can be run Not integrated with either PHP or the OS Rollbacks require rolling back the entire source server Does not understand versioning Uses xinetd One option is to move the source tree prior to the rsync

Deployment Option 2 Source Control Benefits Easy You should already be using source control Has versioning Can have pre/post install scripts Easy to do automatic deployments Drawbacks Do you want to put details on how to access your source code on your production box? Requires that your source control is accessible from production Deny access to.svn directories

Deployment Option 3 PEAR Benefits Designed for PHP Very scriptable Natural for doing things like clearing a cache Has a better understanding of PHP Cross platform compatible Drawbacks Requires admins to be familiar with PHP code Limited to PHP deployment Available tooling is restrictive/build your own package.xml

Deployment Option 4 - OS-based Benefits Easily added as part of your server deployment Very cloud friendly Admins already know how to use it Can describe OS-requirements Downtime limited to actual install, not network transfer time Drawbacks Depends on environment Any PHP deployment scripting needs to be deployed with the application and executed in %post hook E.g. Invalidating the cache

Which should you use? Need something simple? rsync Need to deploy to multiple disparate platforms? PEAR Need to deploy internally/with minimal developer input? OS (yum/apt) If using the OS consider maintaining an internal blessed repository instead of depending on the distribution

Continuous Deployment Using automated deployment Very tight end-to-end integration Requires a lot of trust that the developers have a fully tested application w/ backend and frontend code Probably more work to manage if you can count the servers in your production environment with your fingers Could be beneficial but make sure you know what you re doing You will need to have several testing experts

Takeaways No need for copy-and-paste deployment No need for (S)FTP Have an easy rollback mechanism Prepare for errors in deployment Try to minimize the amount of scripting needed for deployment Consider using VMs on anything important to keep downtime to zero

If you have a question you can Type in the Q&A panel Zend Technologies Follow us! http://twitter.com/zend http://twitter.com/kpschrade (me!)

Get this information and all the examples at eschrade.com once I ve written it