Hi list,
Firstly, let me apologise for such a lengthy post!
That said, any thoughts & feedback would be greatly appreciated and if
it seems like a good idea I'd be happy to write up a blog entry with the
infos gathered -- quite a few other beginners seem to similarly get
stuck on this aspect of starting off with Symfony2. :-)
As part of my first real Symfony2 project, I'm researching how to best
deploy an app from my Dev server (Ubuntu server 12.04 in VirtualBox) to
Staging and Production servers.
/My question is:/
*What must be done to manually sync a Development Symfony2 app to a live
server?*
(see the more detailed version below)
/A bit of background:/
I've installed & tried/tested using the following:
* git
* Capifony
* DeployBundle(s)
* Command Line w/ rsync + ssh
I found deploying with *git *(not really a deployment solution) or
*Capifony *(opaque, not great docs & don't really want to learn Ruby) to
offer the most power, but I want to have a solid grasp of what's going
on at a fundamental level before adding more complexity into the mix.
/Simplicity and Understandability/ are my initial goals.
The DeployBundles I've looked at all seem to be wrappers around using
rsync/ssh.
So I'd like to just use rsync and ssh commands directly to manage my
deployment and when all is working reliably and I have a clue as to what
I'm doing, then possibly wrap them in some handy scripts.
/Detailed question:/
*What specific things must be done to push a Symfony2 project to a live
server?*
The base point for my Deployment would be a working app in the Prod env
on the Dev server, with Vendors updated, Cache Cleared, Assetic assets
dumped, commited & pushed to github, and the build passing tests, etc.
on my Jenkins CI server. I will then sync to a Staging server where the
customer can sign off on changes before creating a new
master-branch-release-tag in git and then syncing that to the Live server.
This is what I've got so far:
* *rsync *the Dev project to the Staging/Live server
o use ssh, compression
o delete non-matching files on target
o ignore-files: app/config/parameters.ini
o ignore-dirs: app/logs/*
* Set permissions on *app/cache/* & *app/logs/* (as per Symfony2 docs
set-up instructions
<http://symfony.com/doc/current/book/installation.html>)
Are the following required? As all the files are being sync'd from a
working Prod env on the Dev server, do these need to be run on the Live
box as well, or is using the already created set of files from Dev enough?
* Clear Symfony2's Cache
* Dump Assetic assets
And finally, what, if anything, do I need to specifically manage for
db/Doctrine?
* Doctrine ?
Ideally, there would be as few changes happening as possible on the
Stage/Live servers. Every time a command needs to be run (clear cache,
dump assets, etc) the chance of something breaking are higher. Also the
more that needs to be set-up & run on the target server, the more
difficult it is to use managed or shared hosting...
Any ideas?
Anything else I'm missing or is required for a reliable deploy with
Symfony2??
Tips and/or Gotchas???
Thanks for the time/effort required to answer to this! :-)
Cheers,
-Chris
--
*******************
Chris Banford
ch...@swisspasses.com
www.swisspasses.com
Zermatt, Switzerland
*******************