Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
DEPLOYING PHP
APPLICATIONSByNiklasModess
WHO AM I?
@niklasmodess
codingswag.com
Freelance /consultantweb architect
Developed and deployed PHP applications for 10+ ...
THE BOOK
https://leanpub.com/deploying-php-
applications/c/SYMFONYCAMP
$9.99 with this link ($5discount)
WHY AM I HERE?
To sellmybook ;)
To spread deploymentprocess awareness
Discuss goals and steps for deployment
WHAT I'M NOT HERE FOR
Talk aboutdeploymenttools
Talk aboutserver provisioningtools
Show you commands
Show you code
Discuss...
WHY SHOULD WE TALK ABOUT THIS?
It's abouttime we do it
Helps our entire developmentprocess
Gain confidence as adeveloper
THE PHP WORLD
PHP: afractal of bad design
FUCK THE HATERS
EXCITING TIMES!
Bestpractices
Testing
Continous integration
.. and even OOP
BUT...
Whathappened to deploymentin allthis?
THE AGILE WORLD
Agile: "Characterized by quickness, lightness,
and ease of movement."
Stayingagile with deploymentis about
RESPONDING QUICKLY
TO FEEDBACK
Work in
SPRINTS
butplan for the
MARATHON
RELEASE CYCLES
The new version is done, ship it.
I'm done, ship it.
X amountof time has passed, ship it.
I pushed it, ship...
ENVIRONMENTS
THE USUAL ONES
Local
Development
Staging
Production
(Testing)
QUESTIONS
Do we have separate environments?
Are theyrepeatable/provisioned?
Do we have abranchingstrategyfor our version c...
PITFALL #1
This:
{
id:1
}
Can turn into this:
{
id:"1"
}
PITFALL #2
PascalCasedClass.php
classPascalCasedClass{}
index.php
require_once('Pascalcasedclass.php');
Willonlywork in en...
I LIKE DIVERSITY
As longas itstays outof mysoftware environments
THE STORY ABOUT AN APPLICATION
.. come up with an idea
.. do some wireframes
.. code, code, code
.. celebrate finishingcod...
The deploymentprocess is almostalways
AD HOC
Areaction to your applications state
"Ducttape deployment""
AUTOMATE
EVERYTHING!
MANUL STEPS
Are the rootof allevil
AN EXAMPLE OF A MANUAL STEP
classAssets
{
constREVISION=14;
}
<linkrel="stylesheet"href="style.css?v=<?=Assets::REVISION?>...
THE GOALS
In anice and ordered list
WE WANT IT TO BE
Automated
Responsive
Atomic
Reversible
Simple
Fast
Agnostic
ROLLBACKS
Are justas important, and should complywith the goals
MATURITY
Aquite naturalprocess (hopefully)
THE STEPS
Documentation
Automation
Verification
Notification
Tests
Tools
Monitoring
WHAT COULD IT TAKE CARE OF?
Runningtests
Database migrations
Cache bust&warm up
Dependencies
Static assets/contents
Genera...
THANK YOU!
QUESTIONS?
Upcoming SlideShare
Loading in …5
×

Deploying php applications

728 views

Published on

The world of PHP is very interesting right now and it has been catching up on best coding practices. It's time we bring our deploy processes up to par with this and start using best practices for it as well. So what are the goals for it and which steps can be taken to reach them? How can we make the process fit better into the more and more Agile world we live in?

Published in: Software
  • Be the first to comment

  • Be the first to like this

Deploying php applications

  1. 1. DEPLOYING PHP APPLICATIONSByNiklasModess
  2. 2. WHO AM I? @niklasmodess codingswag.com Freelance /consultantweb architect Developed and deployed PHP applications for 10+ years Currentlydevelopingmostlyin Laravel Co-organizer of the meetup group LaravelStockholm
  3. 3. THE BOOK https://leanpub.com/deploying-php- applications/c/SYMFONYCAMP $9.99 with this link ($5discount)
  4. 4. WHY AM I HERE? To sellmybook ;) To spread deploymentprocess awareness Discuss goals and steps for deployment
  5. 5. WHAT I'M NOT HERE FOR Talk aboutdeploymenttools Talk aboutserver provisioningtools Show you commands Show you code Discuss system specific things
  6. 6. WHY SHOULD WE TALK ABOUT THIS? It's abouttime we do it Helps our entire developmentprocess Gain confidence as adeveloper
  7. 7. THE PHP WORLD
  8. 8. PHP: afractal of bad design FUCK THE HATERS
  9. 9. EXCITING TIMES! Bestpractices Testing Continous integration .. and even OOP
  10. 10. BUT... Whathappened to deploymentin allthis?
  11. 11. THE AGILE WORLD Agile: "Characterized by quickness, lightness, and ease of movement."
  12. 12. Stayingagile with deploymentis about RESPONDING QUICKLY TO FEEDBACK
  13. 13. Work in SPRINTS butplan for the MARATHON
  14. 14. RELEASE CYCLES The new version is done, ship it. I'm done, ship it. X amountof time has passed, ship it. I pushed it, ship it.
  15. 15. ENVIRONMENTS
  16. 16. THE USUAL ONES Local Development Staging Production (Testing)
  17. 17. QUESTIONS Do we have separate environments? Are theyrepeatable/provisioned? Do we have abranchingstrategyfor our version control? Stagingas closetoproductionas possible?
  18. 18. PITFALL #1 This: { id:1 } Can turn into this: { id:"1" }
  19. 19. PITFALL #2 PascalCasedClass.php classPascalCasedClass{} index.php require_once('Pascalcasedclass.php'); Willonlywork in enviromentthathandles its file system case insensitive.
  20. 20. I LIKE DIVERSITY As longas itstays outof mysoftware environments
  21. 21. THE STORY ABOUT AN APPLICATION .. come up with an idea .. do some wireframes .. code, code, code .. celebrate finishingcode .. shit, we have to deployit .. well, doit quicklythen
  22. 22. The deploymentprocess is almostalways AD HOC Areaction to your applications state "Ducttape deployment""
  23. 23. AUTOMATE EVERYTHING!
  24. 24. MANUL STEPS Are the rootof allevil
  25. 25. AN EXAMPLE OF A MANUAL STEP classAssets { constREVISION=14; } <linkrel="stylesheet"href="style.css?v=<?=Assets::REVISION?>"type="text/css">
  26. 26. THE GOALS In anice and ordered list
  27. 27. WE WANT IT TO BE Automated Responsive Atomic Reversible Simple Fast Agnostic
  28. 28. ROLLBACKS Are justas important, and should complywith the goals
  29. 29. MATURITY Aquite naturalprocess (hopefully)
  30. 30. THE STEPS Documentation Automation Verification Notification Tests Tools Monitoring
  31. 31. WHAT COULD IT TAKE CARE OF? Runningtests Database migrations Cache bust&warm up Dependencies Static assets/contents Generate documentation Restartservices Restartqueues /workers Symlink folders ... any tool with acli or api
  32. 32. THANK YOU! QUESTIONS?

×