0

I have 40 servers spread world-wide. All running centos lamp.
I'm using git and I want every change to production branch to be deployed to each of those machines. Each machine has it's own config.php and few other machine specific files.

Currently commits to production branch trigger hudson build task with phing running phpunit tests, php-md, cpd and etc. The question is, how to deploy it to each of my machines, preferably with running selenium tests on/for each of the updated servers, prior to making it live.

I've looked into capistrano, but I totally don't want to mix ruby and add this dependencies in my team.

Your suggestions for php multi server CI deployment ?

Variant 1

As an option, run a web-hook on commit, launching phing build on each of the machines, where in the build configuration I'll specify which repo to clone, which files to leave at place and which to replace.
Although this would fail if I suddenly push a bugged build.xml file which will prevent me from rebuilding / reverting without 40 manual interruptions. + no reverting option.

3 Answers 3

1

Ended up with a bit customized git flow, where a post-receive hook triggered build scripts via and CI server. The build result was placed in a folder that was lately synched with rsync to all those 40 servers.

The config.php for each server had been left in the git repo itself
and php's auto_perpend_file directive was set in the vhost config to load the correct config.php file for the current server.

Sign up to request clarification or add additional context in comments.

Comments

0

If you are currently using Phing, you can simply use Jenkins to poll your repository for changes every few minutes and then start a deployment using Phing.

I'm assuming your build script is uploading the files to each of your environment with the right config files.

Comments

0

Well, If you want to deploy to servers you can use a service like deployhq.com, or if you prefer to do it yourself take look at deployogi. Its based on bash and deployogi-hooks, and these hooks can be phpscripts (or whatever has mode 755).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.