これまでにこの問題を解決した方法は次のとおりです。
ソース コード ディレクトリ:
build/ - build files for phing and environment-specific properties files
build.xml
src_qa.properties - properties to use the qa server as the source for a deployment
dst_qa.properties - properties to use the qa server as the destination for a deployment
etc... for other environments
conf/ - contains environment specific configuration files, each in a subfolder named after the environment
dev/
db-config.php - config file for HyperDB - http://codex.wordpress.org/HyperDB
default - Apache conf that holds ServerAlias configs for multi-site WordPress
hosts - useful for developers to redirect their browser to various domains in different environments
htaccess.dist - for WPMU
httpd.conf - main Apache config file, specific to each environment
my.cnf - mysql config file
wp-config.php - main wordpress config file
qa
(same as dev/ but with different values in each file)
staging
(same as dev/ but with different values in each file)
prod
(same as dev/ but with different values in each file)
src/ - wordpress source code
wp-admin/
wp-content/
mu-plugins/
plugins/
themes/
wp-includes/
test/ - holds WP test suite and custom tests for plugins, themes, etc...
私は Hudson CI サーバー ( http://hudson-ci.org/ ) を使用して、subversion チェックアウト タスク、phing、phpunit などを使用した自動ビルドと手動ビルドを行っています。展開したいファイルであり、CI サーバーから展開先サーバーに展開されるファイルを rsync します。
または、ステージングから直接本番環境への展開の場合、Hudson rsync は、ステージングから CI サーバーまでファイルを rsync し、その後本番環境にバックアップします。
次の機能のために、ハドソンでビルドジョブをセットアップしました。
core WP code - deploys core WP files and mu-plugins from src to dst
svn to qa
svn to staging
staging to prod
WP plugins/ folder - deploys only the plugins folder
svn to qa
svn to staging
staging to prod
WP themes/ folder - deploys the entire themes folder
svn to qa
svn to staging
svn to prod
Specific themes - deploys a specific theme (chosen through a drop down during the build process using Hudson's parameterized build feature - http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build)
svn to qa
svn to staging
svn to prod
hudson ジョブには、環境固有の PHP ファイル (wp-config.php、db-config.php など) と、Apache および MySQL 構成ファイルを各サーバーの適切な場所にデプロイする機能もあります。場合によっては、複数の Web サーバーと複数のデータベース サーバーに展開し、ほとんどのビルド構成は、前述の phing ビルド ファイルと .properties ファイルによって処理されます。
将来、開発統合環境ができたら、コードの svn チェックイン時に自動展開を行う可能性があります。
この設定により、組織内のさまざまなスキルセット (主に CSS/HTML と PHP) を持つさまざまな開発者が別々に作業し、多くの不必要な人を巻き込むことなく、コードの変更を適切な環境にすばやく反映させることができます。Hudson を使用すると、さまざまな展開ジョブをロックダウンできるため、適切な人だけがそれらを構成して開始することができます。
これは、私が設定したものの概要です。ご意見をお聞かせください。このセットアップの最大の煩わしさは、キーペア、ユーザー アカウント、およびすべての異なるサーバーで rsync を使用したファイル アクセス許可でした。
デイブ