moonshine multisite

2 views
Skip to first unread message

Andrew Roth

unread,
Nov 17, 2009, 12:40:54 PM11/17/09
to railsmachin...@googlegroups.com
Hi all,

I've been working on making moonshine handle multiple sites on one host a bit nicer.  Actually, my goal is multiple apps on multiple hosts.  We have a suite of open source projects with several countries (each with their own sysadmin) using the same base code on their own servers.  I'm referring to it as "moonshine multisite".

It uses capistrano-ext and a generator to create config files for each server and stage.  For example, you could have a web app "app1" with stages "dev" and "prod" that you want on host.com and mirror.com. To deploy the dev sites, you would do "cap host/dev deploy", "cap mirror/dev deploy".

I extended moonshine in a few places to make this possible/easier.  Probably the most major is that moonshine_multisite looks for moonshine.yml in a number of places, from general to specific (based on your host and stage) and overrides general config options with more specific ones.  I also added the ability to specify the local file in local_config and some helper tasks to download sensitive config info from a remote server.

My work is at http://github.com/andrewroth/moonshine_multisite (scroll down on the readme to the Multisite section for more info).  Since it's probably beyond the scope of moonshine, and adds complexity, I decided to change the name and am planning on maintaining it myself.  However if you want to merge it back in, Jesse, I'm all for that.   I know there's others using moonshine to set up a server with multiple sites so hopefully we can all benefit.

Some plans/todos:

- doesn't set up the database right now, other than copying over database.yml.  I would like to private a way to at least generate default database.yml's with databases based on your app and stage that can then be easily created and seeded

- I want to add an option to set up an ubuntu machine for local development.  this can be pretty similar to deploying except with git info still in the "deploy" folder (it's not really a deploy folder then, more like a check out folder)

- maybe a better way of sharing your multisite config.  Right now I'm suggesting people just fork the repo and edit the moonshine_multisite.yml file in their fork.  Maybe support downloading the config file from a remote server or repository

- figure out how to install multiple sites from one command/script without typing the passwords again

-Andrew Roth

Andrew Roth

unread,
Nov 17, 2009, 3:24:19 PM11/17/09
to railsmachin...@googlegroups.com

Kevin

unread,
Jan 11, 2010, 11:02:34 PM1/11/10
to Moonshine
Andrew,

Did you request a pull from the main project? Would love to see this
integrated into the main core.

-Kevin

On Nov 17 2009, 12:24 pm, Andrew Roth <andrewr...@gmail.com> wrote:
> This is the major commit:http://github.com/andrewroth/moonshine_multisite/commit/3db674eab9c67...

Andrew Roth

unread,
Jan 11, 2010, 11:08:44 PM1/11/10
to railsmachin...@googlegroups.com
Now that I've had time to keep working on it, I think it's too different and experimental from moonshine core to be merged.

In fact, after trying to develop with it, I changed the approach to use a single moonshine_multisite.yml config that is similar to a moonshine.yml but with more info about the sites and apps.  The moonshine.yml is then constructed during execution from that config.  It still uses capistrano multisite and so you can put extra code in the deploy, though I haven't tested that as extensively.  I did this because I got tired of running script/generate moonshine_multisite.

I also added some tasks to pull database dumps from a server, and some to provision a server with a number of apps all at once.

I plan to post again in a few months about my experience and approach after using it on our servers.  If someone else is interested in using this, contact me personally and I'll work with you.

-Andrew

--
You received this message because you are subscribed to the Google Groups "Moonshine" group.
To post to this group, send email to railsmachin...@googlegroups.com.
To unsubscribe from this group, send email to railsmachine-moon...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/railsmachine-moonshine?hl=en.




Reply all
Reply to author
Forward
0 new messages