Automating Web Site Deployment
No more FTP

Barcamp Brighton 5th September 2009


gareth rushgrove | morethanseven.net   h...
morethanseven.net




Gareth Rushgrove


gareth rushgrove | morethanseven.net
What do you do now?


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/mn_francis/392404523/
- Put all files under sourcecontrol
       - Move files to the server
       - Copy configuration into place
       - Symlink...
Put all files under sourcecontrol


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/rooreynolds/23964188...
Don't just FTP files to the server

      - Anything manual is error prone
      - You will miss an important file
      - D...
Don't checkout your repo and serve from that.

      - Your web servers need access to your repository
      - You have to...
Do use some sort of package.

      - Tar files are fine, deb files are great
      - It's repeatable
      - You can introsp...
For example:

      - Apache virtualhosts
      - Memcache configuration
      - Solr configuration
      - Anything that li...
- Each release is stored in a unique named directory
      - You could use a timestamp or a version control uid
      - A ...
> cd /srv/sample; ls
       packages   releases             shared

       > cd packages; ls
       20090905142306.tar.gz
...
Restart your web server


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/anonymouscollective/229189602...
WARNING: Live Demo


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/arthur_chapman/3855590323/
You’ll probably want to move onto:

      - Creating databases, or running migrations
      - Rollback to a previous versi...
Questions?


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/jasephotos/1736694514/in/photostream/
Upcoming SlideShare
Loading in...5
×

Automating web site deployment

2,611

Published on

You really should automate the deployment of your web site or application. Stop using your source control system for deployment, and definitely stop relying on FTP. This presentations talks about why, what you should be doing and importantly how to go about doing it.

Presented at barcamp brighton 4

Published in: Technology, Design
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,611
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
52
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Automating web site deployment

  1. 1. Automating Web Site Deployment No more FTP Barcamp Brighton 5th September 2009 gareth rushgrove | morethanseven.net http://www.flickr.com/photos/grittycitygirl/186837530/
  2. 2. morethanseven.net Gareth Rushgrove gareth rushgrove | morethanseven.net
  3. 3. What do you do now? gareth rushgrove | morethanseven.net http://www.flickr.com/photos/mn_francis/392404523/
  4. 4. - Put all files under sourcecontrol - Move files to the server - Copy configuration into place - Symlink the current release - Restart your webserver Steps to deploy gareth rushgrove | morethanseven.net
  5. 5. Put all files under sourcecontrol gareth rushgrove | morethanseven.net http://www.flickr.com/photos/rooreynolds/2396418896/
  6. 6. Don't just FTP files to the server - Anything manual is error prone - You will miss an important file - Deploying to multiple machines at once is hard - You have no history, what was live a year ago? Move all files to the server gareth rushgrove | morethanseven.net
  7. 7. Don't checkout your repo and serve from that. - Your web servers need access to your repository - You have to remember to limit access to hidden files - Not all commands are atomic - The checkout can become corrupt Move all files to the server II gareth rushgrove | morethanseven.net
  8. 8. Do use some sort of package. - Tar files are fine, deb files are great - It's repeatable - You can introspect packages - Packages freeze a moment in time Move all files to the server III gareth rushgrove | morethanseven.net
  9. 9. For example: - Apache virtualhosts - Memcache configuration - Solr configuration - Anything that lives in /etc in debian Copy configuration into place gareth rushgrove | morethanseven.net
  10. 10. - Each release is stored in a unique named directory - You could use a timestamp or a version control uid - A symlink points at the directory - Apache virtualhosts point at the symlink Symlink the current release gareth rushgrove | morethanseven.net
  11. 11. > cd /srv/sample; ls packages releases shared > cd packages; ls 20090905142306.tar.gz > cd ../releases; ls 20090905142306 current Symlink the current release II gareth rushgrove | morethanseven.net
  12. 12. Restart your web server gareth rushgrove | morethanseven.net http://www.flickr.com/photos/anonymouscollective/2291896028/
  13. 13. WARNING: Live Demo gareth rushgrove | morethanseven.net http://www.flickr.com/photos/arthur_chapman/3855590323/
  14. 14. You’ll probably want to move onto: - Creating databases, or running migrations - Rollback to a previous version - Deploy to multiple machines at once - Installing third party libraries Next steps gareth rushgrove | morethanseven.net
  15. 15. Questions? gareth rushgrove | morethanseven.net http://www.flickr.com/photos/jasephotos/1736694514/in/photostream/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×