= sfSyncClusterPlugin = == Author == John L. Singleton[[BR]] WordHustler LLC[[BR]] jsingleton@wordhustler.com[[BR]] http://www.wordhustler.com == Overview == The sfSyncClusterPlugin introduces a {{{symfony sync-cluster}}} task. The {{{symfony sync-cluster}}} task is intended as a replacement for the {{{symfony sync}}} task. While the plugin is backwards-compatible with {{{symfony sync}}} (they even use the same configuration files) this plugin offers several advantages over a traditional {{{symfony sync}}}. The {{{symfony sync-cluster}}} task: * Synchronizes a Symfony application across an unlimited number of servers. Symfony's {{{sync}}} only works for a single server. * Clears the Symfony cache on each server with a {{{symfony cc}}}. Doing this with {{{sync}}} requires an additional command. * Allows you to use ssh public/private keyfile authentication so you won't be prompted for a password during long deployments. = Installation = To install sfSyncClusterPlugin: ''Listing 1 - Installing sfSyncClusterPlugin'' {{{ symfony plugin-install http://plugins.symfony-project.com/sfSyncClusterPlugin symfony cc }}} You an now use the {{{symfony sync-cluster}}} task. = Usage = The {{{sync-cluster}}} task behaves exactly as {{{sync}}}. For more information about using {{{symfony sync}}}, please see the [http://www.symfony-project.org/book/1_0/16-Application-Management-Tools#Using%20rsync%20for%20Incremental%20File%20Transfer Application Management] section of the Symfony documentation. To configure sfSyncCluster, you must edit your project's properties.ini file. Below is an example that contains ''Listing 2 - Example sfSyncCluster configuration'' {{{ [symfony] name=MyApplication [production] host=domain.com cluster=node1.domain.com, node2.domain.com, node3.domain.com keyfile=/Users/johndoe/keys/id_rsa port=22 user=root dir=/var/www/html/MyApplication/ }}} The settings you need to activate for sfSyncCluster are {{{cluster}}} and optionally, {{{keyfile}}}. The {{{host}}} parameter is ignored. To use this plugin, simply invoke the task from within a project. ''Listing 3 - Using the {{{sync-cluster}}} task'' {{{ /* does a dry run */ # symfony sync-cluster production /* does it for real */ # symfony sync-cluster production go }}} '''Note''' that in order for sfSyncCluster to work, your servers must share the same filesystem structure for your application. For example, if dir is set to {{{/foo/bar/myApplication/}}} the {{{sync-cluster}}} task will try to synchronize with the application at {{{/foo/bar/myApplication/}}} on ''every'' server. Be warned. == License == For the full copyright and license information, please view the LICENSE file that was distributed with this source code. == Change Log == 5/02/08 -- Initial Release.