Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Cees-Jan Kiewiet:
Deploying Sculpin to S3 with CircleCI
Jun 16, 2016 @ 11:56:12

Cees-Jan Kiewiet has written up a post showing how he combines S3 and CircleCI to deploy a Sculpin site for his blog. Sculpin is a popular PHP-based static site generator.

Until 10 minutes before the start of this month I had a VPS at Digital Ocean running with Jenkins and Gitolite on it for privately hosted repositories. With Github's recent move to unlimited repositories I really didn't have a need to host them myself anymore, and after playing with CircleCI's free tier it didn't make any sense anymore to keep that VPS up.

Since porting git over to another remote is as more Github's domain we're focusing on deploying Sculpin to S3 using CircleCI in this post.

He starts by outlining some of the prerequisites to get in place before trying to set up the process on your own application. He shows you how to set up an IAM user for the S3 bucket and configure CircleCI though a simple YAML file. He also mentions the set up for tests, loading in other dependencies needed (Composer) and finally the deployment that executes Sculpin's "generate" command to build the site.

tagged: sculpin circleci s3 aws deployment tutorial configuration setup

Link: https://blog.wyrihaximus.net/2016/06/deploying-sculpin-to-s3-with-circleci/

TutsPlus.com:
Deploy Your PHP Application With Rocketeer
May 04, 2016 @ 14:19:01

On the TutsPlus.com site there's a new tutorial posted that aims to help you deploy your PHP application with Rocketeer, a PHP-based deployment tool with lots of built in functionality for more complex deployments.

There used to be a time when PHP developers had to use deployment tools that were aimed at general web applications. [...] But nowadays, we're blessed with a few deployment tools written in our language that enable deeper integration. One of these tools is Rocketeer, a tool that takes inspiration from Capistrano and the Laravel framework.

Rocketeer is a modern tool that brings a great approach for your deployment needs. That is to run tasks and manage your application across different environments and servers.

They start with a brief introduction to the Rocketeer tool (basically a SSH driven command execution engine) and show you how to get it installed on your system. They then help you initialize the setup directory (.rocketeer) and describe each of the pieces and how the deployment happens. They show you how to configure events and tasks in the system to perform during execution. They also show the definition of "strategies" to execution events/tasks in groups, work with plugins and, finally, running an example deployment.

tagged: rocketeer deployment tool introduction configuration example

Link: http://code.tutsplus.com/articles/deploy-your-php-application-with-rocketeer--cms-25838

SitePoint PHP Blog:
Easy Deployment of PHP Applications with Deployer
Apr 08, 2016 @ 09:42:51

The SitePoint PHP blog has a tutorial showing you how to deploy your applications with Deployer, a simple deployment tool that aims to make it as easy as a single command to release you application to production.

Everybody tries to automate their development process, testing, code formatting, system checks, etc. This is also the case for deploying our applications or pushing a new version to the production server. Some of us do this manually by uploading the code using an FTP client, others prefer Phing, and Laravel users will prefer Envoyer for this process. In this article, I’m going to introduce you to Deployer – a deployment tool for PHP.

To introduce you to the tool they walk you through the deployment of a demo application, a simple tool that was used in a previous tutorial to connect to the 500px API. They help you get it installed and start in on some of the basic configuration:

  • setting up the target servers and environments
  • using SSH authentication
  • defining basic tasks
  • making use of "zero downtime" releases
  • using some common built-in tasks

Finally, they link to a recipes section on the Deployer website that gives you more advanced and wider reaching examples.

tagged: deployment deployer tutorial tool example introduction configuration

Link: http://www.sitepoint.com/deploying-php-applications-with-deployer/

SitePoint PHP Blog:
Easy Continuous Delivery with ContinuousPHP and Zend Server
Dec 10, 2015 @ 12:54:32

The SitePoint PHP blog has posted a tutorial from author Daniel Berman showing you how to combine the ContinuousPHP service with Zend Server to create a continuous deployment system for your PHP applications.

The continuous delivery approach aims at making the process of continuously deploying code to production error-free, or at least less error-prone, using automated tasks, tests, builds and deployments. Minimize risk and downtime, maximize quality and value. That’s the motto.

However, this process is not always straightforward, to say the least. Often enough, the continuous delivery tools chosen for implementing continuous integration and deployment are hard to figure out and use, and are usually time consuming and expensive. The bigger the application, the bigger the challenge. This article introduces an interesting new approach to dealing with this challenge by demonstrating a continuous delivery process using continuousphp and Zend Server.

They briefly walk you through some of the prerequisites including an installation of Zend Server already set up and waiting. He also provides a skeleton application you can use if you just want to test it out first. From there he goes through the steps in the process:

  • Setting up your repository (on ContinuousPHP)
  • Creating a new deployment pipeline
  • Configuring build and test settings
  • Packaging and deploying your app

All along the way he's included screenshots of the ContinuousPHP interface so you can be sure you're still on the right track. He ends the post with a few extra "goodies" linking directly to the ContinuousPHP and Zend server documentation among other useful links.

tagged: zendserver tutorial continuousphp service setup configure continuous deployment

Link: http://www.sitepoint.com/easy-continuous-delivery-with-continuousphp-and-zend-server/

Freek Van der Herten:
Zero downtime deployments with Envoy
Nov 23, 2015 @ 10:52:36

In this post to his site Freek Van der Herten shares an Envoy script that can be used to deploy an application to a remote server with (or without I suppose) one key thing: downtime.

Envoy is Laravel’s official task runner. Using a Blade style syntax tasks can be defined that can be run both locally and remotely. At Spatie, we’ve been using Envoy for quite some time to deploy code on production servers. [...] [Our trusty Envoy scriot] had a big downside: the application would be down for close to a minute. This week I took the time to solve that issue.

He talks about the changes he made to their deployment process towards using a symlink-based system as suggested by this guide. The result is an updated script that follows the same flow. He steps through the changes he made to the script and tweaks used to get the best performance out of the deploy process.

tagged: downtime deployment laravel envoy automation symlink update script

Link: https://murze.be/2015/11/zero-downtime-deployments-with-envoy/

Symfony Blog:
How we Auto-Deploy Documentation Pull Requests with Platform.sh
Sep 10, 2015 @ 12:42:38

On the Symfony blog Ryan Weaver shares a "behind the scenes" look at how the project handles and has automated their documentation generation process with the help of the Platform.sh service.

[Symfony's documentation](https://github.com/symfony/symfony-docs) is an open source project with more than 800 contributors. That’s great! But our goal is to always make it easier to contribute and faster to merge in changes. And today, we’ve started doing something really cool to improve our workflow: integration with [Platform.sh](https://platform.sh).

Platform.sh is a hosting solution that provides out-of-the-box continuous deployment for Symfony, Drupal and any other PHP applications. It extends the concept of a Git branch at the infrastructure level. Basically, this means that it’s easy to deploy every branch and/or Pull Request to its own URL.

He talks about the documentation's format (Sphinx) and how, while it does provide flexibility it also can lead to maintenance issues too. Changes can't be seen immediately and it's difficult to review. Instead they worked up a process where each pull request was automatically deployed to its own unique URL. This reduces both issues they were setting around instant feedback and review problems and provides a better experience for the developer overall.

tagged: integration platformsh documentation request pull symfony continuous deployment

Link: http://symfony.com/blog/how-we-auto-deploy-documentation-pull-requests-with-platform-sh

Piotr Pasich:
Putting all pieces together and shipping with Codeship (Continuous Deployment – part I
Aug 18, 2015 @ 12:45:01

Piotr Pasich continues his series covering the integration of Docker, Elastic Beanstalk and Codeship to create a workflow for shipping and releasing code. In the first two parts of the series he set up most of the technology involved and hooked some of it together. In this latest article he finishes the process, connecting CodeShip with GitHub and your tests.

Today I will walk you through combining all the pieces together and automating the process fully. A continuous integration system will be placed between developer’s environment and final servers. I’ll present how to achieve all of that with Codeship. What make me choose this particular mechanism? The simplicity of setting up, number of additional tools ready to use without installation and finally the fact that it isn’t time consuming.

He shows how to connect CodeShip with your GitHub repository. He shows how to create a new CodeShip project to handle the build complete with a screencast to ensure things are set up as they should be. He includes a bit of "magic" you'll need to do with the CodeShip configuration to get it to work with the Docker setup, but the change is minimal. He also shows you how to set up the execution of your tests and how to see what failed when a build is broken. Finally he shows the process for setting up the deployment to the hosting provider (in this case Digital Ocean) and how to configure your Amazon credentials right in the interface.

tagged: codeship elasticbeanstalk continuous deployment series part3 docker tutorial

Link: http://piotrpasich.com/putting-all-pieces-together-and-shipping-with-codeship-continuous-deployment-part-iii/

Piotr Pasich:
Automated deployment with AWS Elastic Beanstalk (EB) – Part II
Aug 07, 2015 @ 09:14:31

Piotr Pasich has posted the second part of his series showing you how to set up an automated deployment process for an environment that includes an Elastic Beanstalk instance. In this part of the series be builds on the process created in part one and shows the setup and configuration of the Beanstalk instance.

In the previous part we set up a dedicated Symfony application on Docker virtual containers and prepared environments that may be transferred between developers during project cycle. The next step is to prepare the application for pushing into the cloud. There are many options available on the market – Heroku, DigitalOcean and, my favorite, AWS Elastic Beanstalk.

He walks you through the Amazon side of things first, getting the Beanstalk instance set up through the AWS control panel, selected from the AWS list of services. He goes through the options you'll need to configure to get the instance all set up and running including the resources to allocate and instance type (t1.medium is recommended). He then helps set up some of the necessary environment variables for configuration information and a bit of a hack to Symfony that lets you override local parameters with ones coming from the environment. Finally he configures the Beanstalk application and setting it up for automated deployment.

tagged: series part2 elasticbeanstalk aws deployment automated tutorial

Link: http://piotrpasich.com/automated-deployment-with-aws-elastic-beanstalk-eb-part-ii

Full Stack Radio:
14: Taylor Otwell - Building Envoyer, Laravel 5.1 and Learning to Program
Apr 09, 2015 @ 09:18:04

The Full Stack Radio podcast has released their latest episode: Episode #14, "Taylor Otwell - Building Envoyer, Laravel 5.1 and Learning to Program". In this new show host Adam Wathan is joined by Laravel creator and lead developer Taylor Otwell to talk about the framework, the Envoyer deployment tool and development in general.

In this episode, Adam talks to Taylor Otwell, creator of Laravel. Taylor gives an in-depth behind-the-scenes look at how Envoyer is architected, and shares some new tips and tricks he's been using to keep his code simple. They also talk about the decisions behind upcoming changes in Laravel 5.1, how Taylor learned to program, and how he almost became the manager of a retirement home.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3. Be sure to also subscribe to their feed if you enjoy the show.

tagged: fullstackradio podcast taylorotwell laravel envoyer deployment programming ep14

Link: http://fullstackradio.com/episodes/14/

SitePoint PHP Blog:
First Look at Platform.sh – a Development and Deployment SaaS
Mar 23, 2015 @ 11:24:36

In this latest post to the SitePoint PHP blog Chris Ward takes a "first look" at the Platform.sh development and deployment service.

Not so long ago, many of us were satisfied handling deployment of our projects by uploading files via FTP to a web server. [...] The old methods for deploying became unstable, unreliable and (generally) untrusted. [...] So was born a new wave of tools, services and workflows designed to simplify the process of deploying complex web applications, along with a plethora of accompanying commercial services. Generally, they offer an integrated toolset for version control, hosting, performance and security at a competitive price. Platform.sh is a newer player on the market, built by the team at Commerce Guys, who are better known for their Drupal eCommerce solutions.

He talks about some of the requirements for using the service (including Drush, the Drupal command line tool) and how to get started with a new project. He shows how to get the codebase with their CLI tool, pushing SQL data up to the instance, and starting in on some development work. He shows how to configure the modules you want to use and adding some additional content to the data. He also covers some of the other features of Platform.sh including: performance and profiling tools and integration with Redis, Solr and the EntityCache/AuthCache tools.

tagged: platformsh drupal deployment development platform saas introduction

Link: http://www.sitepoint.com/first-look-platform-sh-development-deployment-saas/