Capistrano and Drupal

Bèr Kessels's picture

Using Capistrano for Drupal deploying. Sounds cool, and should be possible. Lets talk about hos this should be done, and if this is feasible.
I plan to drop the sympal-scripts -which, in fact want to be a capistrano-only-for-drupal-in-PHP- in favour of a good working capistrano drupal thingie.

Login to post comments

An earlier conversation over mail, with good resources

Bèr Kessels's picture
Bèr Kessels - Fri, 2006-10-06 09:17

So to answer your question, I have no experience in using Capistrano.
Deploying Drupal via Capistrano is a theory that I would like to test out
soon. I figure if it's works for Wordpress, it's worth a try with Drupal.
Some decent supporting documentation:

The directory structure requirements may be harder to deal with, but I'm
going to see what I can do. The ability to use tasks may give me more power
than I'm currently aware of.

As I said earlier, the reason I'm looking for something else is that anon
CVS wasn't working on one of the hosts. I'm trying to find an alternate way
to make deployment easier. If this doesn't work, I'm thinking of using
mercurial or bzr to hold the site configurations and do a push to the
different hosts.

I'm not a Rails fanboy (I did try it, but couldn't grok it), but I am
jealous of their tools like gems, and rake w/ capistrano. I would like to
see Drupal use a package manager, and I would rather not reinvent the wheel
to do it. I know a dependency system is needed before this can happen, but
with the install/uninstall hooks being added, dependencies will be the
(eventual) natural evolution.

-cb

On 9/15/06, Bèr Kessels <ber@***> wrote:
>

Op vrijdag 15 september 2006 02:28, schreef u:

Bèr,
I'm a lurker on the drupal development mailing list. I've been
interested in your Sympal Scripts, and I was wondering how are they
working
out for you? I've noticed that there haven't been any CVS commits in a
few
weeks on the project. Are they "scratching your itch" well enough, or
have
you resigned to an alternative?

Sorry for all the questions. I am trying to find something to make
updates
easier for me to do for some clients I have on different
hosts. Anonymous
CVS has not been working for me. I was considering using Capistrano to
do
it, but I remebered your scripts.

How much functionality do they offer compared to Capistrano?

I must admit that I never really looked into Capistrano with the idea of
it
being a competitor of Sympal, until now!

Capistrano is far more mature, wider spread and better known. Capistrano
is in
Ruby.

However, reading http://manuals.rubyonrails.com/read/chapter/97#page258

You are using Ruby on Rails to develop your application.
* No, Drupal is PHP and far from RoR.
You are using subversion to manage your source code.
* No, Drupal uses CVS (I have sympal in SVN though)
You are deploying your application to "/u/apps/#{appname}" on every
machine.
* No, Drupal (And Sympal scripts) use #{appname}/sites/#{sitename}
You are using FastCGI to power your application.
* Nope, AFAIK Drupal won't even run on FastCGI properly
You are fronting your app with either lighttpd or apache.
* Apache, yes.

So it seems that eventhough Capistrano is a front-end for web-apps, it is
far
from Drupal Savvy.

Sympal scripts are Drupal only, thus have a smaller reach, and less
eyeballs.
They are still rather messy, being alpha and all. They are usable though,
even
if only as basis.

The 1.0 of Sympal scripts should do this: http://webschuur.com/node/637

Right now I am setting up a new vhost debian server, using virtualmin, and
I
am playing with ispconfig. One of both should get front-ends to Sympal
Scripts. This is the reason for the relative silence: I am actually
deploying
the scripts to see where they should be improved Right Now.

Right, so I have a question for you: Have you got experience with
Capistrano,
are you familiar with it, or its developers? How hard would it be to mould
CApistrano into a Drupal savvy system?
If it is not that hard then i'll remove the sympal scripts today, and move
over to Capistrano tomorrow :) Joining forces with you and others could
help
us get this Real actually!

What do you think?

--
[ Bèr Kessels | Drupal services www.webschuur.com ]


FastCGI on Drupal, Okay!

adixon's picture
adixon - Thu, 2006-11-23 19:03

Not really on your topic, which is good, but so as to prevent false rumours - FastCGI and Drupal have worked together fine in my experience (and others', i've heard).

Checking out capistrano now ..


Thanks - and a great idea

cbooth7575's picture
cbooth7575 - Tue, 2006-12-19 20:44

Thanks for the links on using Capistrano with other PHP-based systems. I discovered RoR about 6 months ago, and love it, but am now putting together a Drupal project. Being new to Drupal, I'm trying to find ways to keep some of the things I love best about working in RoR in place.

In addition to Capistrano, I'd love to find some way to bring migrations over to my PHP projects, and also testing (unit/integration). Both of them are also key features in Rails, that have shifted the way I maintain live sites, and develop projects, for the better, and I'll miss them if I can find decent substitutes ;-)

I'll post here what I do learn, when I'm able to...

Cameron


About Migrations:

Bèr Kessels's picture
Bèr Kessels - Wed, 2006-12-20 08:43

I've done tests and proof of concepts on this matter. So you might be interested in my post(s) on sympal scripts.

To be precise, the following goal in the 'manual' may be interesting:

extract.php        Create fixtures from a site.
 --site www.example.com      The site to extract.
 --fixtures  directory-name  Write the fixtures to the directory directory-name.

Could you explain

pearcec's picture
pearcec - Tue, 2007-02-27 22:24

What a Symbal script is? ANd what creating a fixtures from a site would do? How does this help us for migrations? To me that is about the only thing missing for me, that would keep me from using capistrano.

--
Christian


Rails

panama - Fri, 2007-05-18 03:22

Cameron;

I'm about to make a technology decision, drupal or rails. Your comment suggest that you may be an objective resource. Perhaps you have some thoughts that could help. The site I'm planning will be an industry portal, with archives, articles, documents for download, news feeds, a blog and a discussion forum. More importantly there will be significant interactive functions, buying, selling and trading. My impulse is to go with rails for the ability to customize, but Drupal has many of the required functions plus more already in place.

If you were considering such, would you Drupal or Rail. Or use a combo and why. Make any assumptions you wish.

Thanks for considering my questions

Panama


Good idea

jystewart's picture
jystewart - Mon, 2006-10-09 13:53

I'm primarily developing with Rails these days but have a few clients for whom I use drupal. I'd love to see Capistrano working with drupal.

When I work on a drupal app I tend to store my 'sites/default' folder in subversion and check that out into a download of the latest drupal release. I'd love to be able to use capistrano to automate that, along with

  • shared 'files' folder between versions
  • some sort of database migrations system to allow merger of the production and development databases

update: and request for support :)

Bèr Kessels's picture
Bèr Kessels - Fri, 2006-10-20 10:50

I have started playing with capistrano, mostly trying to distribute, and install a sillly little rails APP I wrote for this purpose.

I am gettign the feeling, and I am liking it a lot.

If people are familiar with capistrano, I would love to hearfrom them, so that we can get this rolling earlier :)


Initial attempt

jystewart's picture
jystewart - Wed, 2007-02-14 18:14

I finally got fed up of updating drupal sites by hand and made a stab at using capistrano to manage deployments. So far it seems to work pretty well with a single site per drupal install, and should be pretty easy to scale to multiple sites. I wrote it up at:

http://jystewart.net/process/archives/2007/02/using-capistrano-for-drupa...


Create a task library for Drupal?

pearcec's picture
pearcec - Fri, 2007-03-02 21:23

I started work on a task library that overrides some of the default tasks to do more sensible actions for a drupal installation. So far so good.

Anyone interested in helping?

I would like to make a gem, but don't think I will host it on rubyforge. I think we can just host it here. Where can i put the code?

I should also note I never deployed a rails app with capistrano, so I lack experience in that realm. So I could use some help with best practice from a capistrano perspective

--
Christian


We use Drupal + Capistrano

Chiaroscuro - Wed, 2008-09-17 10:04

We are Rails people that use Drupal for CMS jobs and also for several social networks implementations.

We use Capistrano to handle the deploy. You can read about it (and find the recipes) here: http://blog.mikamai.com/2008/07/sweeter-nicer-drupal-with-capistrano/


Thank you! I am trying

SamRose's picture
SamRose - Wed, 2008-09-17 12:39

Thank you! I am trying something similar right now.

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation


AutoPilot module?

bartvb - Mon, 2008-11-17 22:05

Just ran into this:

http://drupal.org/project/autopilot

No experience with it but it also tries to deal with deployment of Drupal from testing to staging to production.