views:

83

answers:

5

I have a question related to phing. Do I use it on my local development machine to deploy an application or do I call it via ssh from production machine? I'm not sure where to do the steps from Eran Galperin (What is your preferred PHP deployment strategy). I'm a beginner with deployment scripts. So be forgiving :)

Marco

+1  A: 

The basic strategy is that you create a build (well, basically a copy of your web application that you can put online) on your local machine, and then deploy it on the server.

wimvds
+1  A: 

You run it on your local machine and the PHPing will connect to production server and deploy the website. :)

TiuTalk
How do I perform the last step? Which is the corresponding phing Task? Is it a normal FTP/SFTP transfer?
FtpDeployTask and ScpTask I think. I will give it a try. Thanks to all answerers.
+1  A: 

Phing can be applied in many ways.

If you don't have directives on how to deploy, the best way is usually first to generate a "test build" from your local copy, check out if it is working as intended and then generate the productive build.

In some cases where you have to follow certain rules in your development enviroment you can easily adapt Phing to meet those demands.

Björn
+1  A: 

You'll usually have two deploy scripts - One that you run locally, which ssh's in to the remote server and then kicks off the remote script.

Your local script might do an svn export, zip the contents and push them (scp) to the remote server first. The remote script would do stuff like migrating, restarting services etc.

troelskn
A: 

You can do it both ways. You can run the tool locally as you develop to run tests and just generally ensure that your code is in good condition. The server automation (if you choose to do that) can also run tests, generate documentation, and deploy changes to test or production setups.

Doing it locally reduces the chance that the process will get stalled on the server setup, while the CI works on a regular basis to ensure nothing has been broken via mistake.

Grant Palin