<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.thenextlayer.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>methods</title>
 <link>http://www.thenextlayer.org/taxonomy/term/326</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en-US</language>
<item>
 <title>Subversion/Drupal distributed multisite project</title>
 <link>http://www.thenextlayer.org/node/426</link>
 <description>&lt;p&gt;(please excuse the note form of this article)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;br /&gt;
I am involved in a number of drupal projects, both new and legacy, some as paid projects, some volunteer.&lt;br /&gt;
I am involved or want to help with the maintainence of the code base (security patching, upgrades etc).  However not all of the projects are on my own server.  And as I am not a hosting company that is how things should be.&lt;br /&gt;
However, patching and upgrading is a pain, especially over many sites.  How could this be managed efficiently and cooperatively?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Solution in general&lt;/strong&gt;&lt;br /&gt;
Make a designated server for subversion. Create a &quot;master&quot; drupal instance that is not actually used to publish anything, and from this create a subversion repository that will house the drupal &quot;core&quot; codebase, AND a seperate but related repository that can house the files specific to each drupal instance.  Install each drupal instance that is to be maintained in this way via svn checkout on their own server, wherever it is.  Lets call these drupal instances client instances.&lt;/p&gt;
&lt;p&gt;When patches and upgrades come out, do these on the master instance and commit the changes to the repository to create a new revision.  To upgrade each client instance simply run svn update on each server, possibly followed by running the drupal update.php script.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Solution in more detail (NB. this is not a how-to yet ;)&lt;/strong&gt;&lt;br /&gt;
We need to adhere to the conventions of drupal multisite installations to make this work nicely, even though the sites are most probably on different servers so this is not actually a multisite installation.&lt;/p&gt;
&lt;p&gt;As we need to combine two code projects (the drupal core files and the files specific to each client instance) to create each instance, we make use of the svn:externals property.  The master drupal files will be &quot;external&quot; to the domain specific files.&lt;/p&gt;
&lt;p&gt;Basically, the drupal core repository will store all of the files, including the core modules EXCEPT anything under the sites/directory.&lt;/p&gt;
&lt;p&gt;The sites/ directory is EXCLUDED from the drupal core repository, except for sites/all/modules, where we can keep modules that are NOT core but are used in pretty much every client.&lt;/p&gt;
&lt;p&gt;To complete the picture we create seperate svn projects for each client instance.  these projects will house the following files and directories:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;
sites/www.thisparticularone.com/settings.php&lt;br /&gt;
sites/www.thisparticularone.com/files&lt;br /&gt;
sites/www.thisparticularone.com/modules&lt;br /&gt;
sites/www.thisparticularone.com/themes&lt;br /&gt;
sites/www.thisparticularone.com/tmp&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(where &lt;a href=&quot;http://www.thisparticularone.com&quot; title=&quot;www.thisparticularone.com&quot;&gt;www.thisparticularone.com&lt;/a&gt; is the base url of each instance - this adheres to the convention of drupal multisite installations and drupal will look here for the files)&lt;/p&gt;
&lt;p&gt;When we install a new drupal we do it like this:&lt;br /&gt;
(NB these commands currently untested as i&#039;ve changed things a bit since last version)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;
#install drupal &quot;core&quot;&lt;br /&gt;
svn checkout &lt;a href=&quot;https://svn.southspace.org/subversion/drupal/thisparticularone/trunk/&quot; title=&quot;https://svn.southspace.org/subversion/drupal/thisparticularone/trunk/&quot;&gt;https://svn.southspace.org/subversion/drupal/thisparticularone/trunk/&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;#add the externals property&lt;br /&gt;
svn propedit svn:externals .&lt;/p&gt;
&lt;p&gt;(which will launch an editor)&lt;/p&gt;
&lt;p&gt;#add a line like this:&lt;br /&gt;
. &lt;a href=&quot;https://svn.southspace.org/subversion/drupal/master/trunk/&quot; title=&quot;https://svn.southspace.org/subversion/drupal/master/trunk/&quot;&gt;https://svn.southspace.org/subversion/drupal/master/trunk/&lt;/a&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;
#get the new items from the external project, ie drupal mater&lt;br /&gt;
svn update&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(to update your drupal including core ie. master project files run)&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
svn update&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;an ordinary&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
svn commit&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
will NOT commit to the external files, ie. the drupal &quot;master&quot;.  this is what we want ;)&lt;/p&gt;
&lt;p&gt;though should committ files in /sites/www.thisparticularone.com&lt;/p&gt;
&lt;p&gt;this is the behavour we want.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What i&#039;ve done already&lt;/strong&gt;&lt;br /&gt;
Installed a xen virtual machine (debian etch) on mediaartprojects.org.uk specificaly for subversion and master instances&lt;br /&gt;
Made the repositories available via https&lt;br /&gt;
Apache access control only so far&lt;br /&gt;
Installed webSVN for viewing repositories  (https)&lt;br /&gt;
Created master drupal repro, and some &quot;test&quot; projects&lt;br /&gt;
Done lots of tests with checking out, setting externals property updating etc using master and projects&lt;/p&gt;
&lt;p&gt;refs:&lt;br /&gt;
Subversion Manual&lt;br /&gt;
&lt;a href=&quot;http://svnbook.red-bean.com/&quot; title=&quot;http://svnbook.red-bean.com/&quot;&gt;http://svnbook.red-bean.com/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://svnbook.red-bean.com/en/1.1/ch07s04.html&quot; title=&quot;http://svnbook.red-bean.com/en/1.1/ch07s04.html&quot;&gt;http://svnbook.red-bean.com/en/1.1/ch07s04.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://drupal.org/node/53705&quot; title=&quot;http://drupal.org/node/53705&quot;&gt;http://drupal.org/node/53705&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://agaricdesign.com/note/agaric-wants-version-control-lets-drupal-core-and-contrib-replace-entire-directories-within-our-checkouts&quot; title=&quot;http://agaricdesign.com/note/agaric-wants-version-control-lets-drupal-core-and-contrib-replace-entire-directories-within-our-checkouts&quot;&gt;http://agaricdesign.com/note/agaric-wants-version-control-lets-drupal-co...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i&#039;m not the only one working on this, by the way ;)&lt;/p&gt;
</description>
 <comments>http://www.thenextlayer.org/node/426#comments</comments>
 <category domain="http://www.thenextlayer.org/taxonomy/term/2">English</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/36">Article</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/16">London</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/163">Drupal</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/66">FLOSS</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/326">methods</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/327">subversion</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/289">taxi-to-praxi</category>
 <category domain="http://www.thenextlayer.org/taxonomy/term/324">tools</category>
 <pubDate>Wed, 16 Apr 2008 15:09:27 +0200</pubDate>
 <dc:creator>lisa</dc:creator>
 <guid isPermaLink="false">426 at http://www.thenextlayer.org</guid>
</item>
</channel>
</rss>
