custom repository for SCM none

25 views
Skip to first unread message

Mitchell Smith

unread,
Mar 11, 2011, 4:03:44 PM3/11/11
to Webistrano
Hi,

I am in the process of trying to automate our webapp deployments, and
have decided on Webistrano as the best solution to get that done.

We have a pretty complex environment, and multiple applications, and
trying to do that manually is a bit of a nightmare.

I am running in to a couple of road blocks though, mainly because our
deployments are a bit non standard, and I guess I am fighting a little
bit against some of Webistrano's design goals.

The majority of the apps we are deploying are Java based, so the
deployment process goes a little bit like this:

* developer uses a build tool like Hudson or Bamboo to check the code
out of SVN and package it up as a war file, he then gives us a URL to
the deployable artifact.


* we grab the war, expload it and push it up to the various web
servers (we have various reasons for deploying the app exploaded
rather than in war format)

* sometimes there is a MySQL or Oracle schema change, but I'll get to
that later.


* finally when everything is rsyncd we trigger a Tomcat restart across
the app cluster


So in to the picture comes webistrano.

I have set the SCM to none, since we arne't doing a checkout at this
point, and the deploy_via to copy.

And here is my first sticking point, I want to provide a custom
repository like this:


set :repository do
fetch(:deploy_from)
end

set :deploy_from do
dir = "/tmp/prep_#{release_name}"
system("mkdir -p #{dir}")
dir
end

before 'deploy:update_code' do
# fetch and unpack our war to deploy_from
end
end



I'm not sure how to specify this custom repository as a configuraiton
variable, and if I delete the "repository" variable and try and stick
this in a recipe, it doesn't like missing required configuration
variables.

It's quite possible I'm going about this entirely the wrong way :)

Has anyone encountered this before, and is there a work around?

Any comments / suggestions would be greatly appreciated.

Thanks to the developers again for such a great tool.


Cheers,

Mitch

Jonathan Weiss

unread,
Mar 16, 2011, 4:59:14 AM3/16/11
to webis...@googlegroups.com, Mitchell Smith
> I'm not sure how to specify this custom repository as a configuraiton
> variable, and if I delete the "repository" variable and try and stick
> this in a recipe, it doesn't like missing required configuration
> variables.

If you are running a complete non-scm based approach, I would just put
anything in the repository variable so that Capistrano/Webistrano are
happy and use custom variables for my workflow.

Capistrano/Webistrano assume a default deployment via source checkout
but it should be easy to define your own task that follow your
workflow. Then just override the deploy task to call your own main
task.

Jonathan

--
Jonathan Weiss
http://blog.innerewut.de
http://twitter.com/jweiss

Reply all
Reply to author
Forward
0 new messages