Ubuntu 10.04 LTS based stack

Events happening in the community are now at Drupal community events on www.drupal.org.
visualfox's picture

Look at the pretty stack diagram!

https://github.com/VisualFox/s66c-Stack

Include instruction for virtualbox and Linode.
This stack use Monit to monitor services.
Can be run in development mode or production mode.
Seem to work fine with Ubuntu 11.10 (need more testing).

Have some extra recipes for installing node.js, beanstalk, redis, mongodb.

Feel free to contribute and/or fork!


In complement I also developed some scripts to manage this stack:

https://github.com/VisualFox/s66c

These scripts have a lot of shortcoming so be sure to understand what they are doing before using them. These scripts are command line based and let you create, delete, disable, enable domain name and subdomain name - ala plesk - and let you install any version of drupal in an almost automatic way. This include database creation, basic backup for the database and drupal files, cron setup, git or mercurial support.

This script is a work in progress but because it currently fit my need I am getting lazy to update it. But having feedback from the community will help.

AttachmentSize
stack4small.png408 KB
Screen Shot 2012-01-26 at 12.56.32 PM.png44.73 KB

Comments

good stuff, very good stuff,

gateway69's picture

good stuff, very good stuff, the stack4small gives a great overview.. now is this all running on the same box :)

Ill fire up a new vm image and test it out..

Thank you! If that helpful I

visualfox's picture

Thank you! If that helpful I can easily create an AMI (Amazon EC2) image for people to test.

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

could this fit into their

gateway69's picture

could this fit into their free micro instance?

I wish also their was a good place to host VM or Virtual Box Image of the stuff we put together.

Can you explain a bit more about outside of the Pure Nginx stuff what all the other functions you have that are built into the scripts, I noticed from the images how someone can take advantage of this.

For example I noticed you list 2 nic addresses, one for nginx and one for node.js is this an option or is the node.js doing something along with drupal.. I guess a bit more info on how this works or could work in a real world scenario might help out!

I think I can fit that easily

visualfox's picture

I think I can fit that easily in a micro instance. I will work on that this week.

I know this one: http://virtualboximages.com/
(and the site is built on drupal, but that obvious enough...)
I never used the service but I was interested at one point to create a virtualbox's image of this stack and to upload on this site. I am currently using parallels so...

//- - - - - - - - - - -
// s66c stack
//- - - - - - - - - - -

Thank you for you interest in the stack. A lot of the components are optional. So you can use the recipes to just create a drupal stack.

On my particular setup I do use two IP address one for the nginx server and another one for the node.js server. Actually my diagram is not totally correct as for node.js the vhosts block happen inside the connect block and not before. It's possible to get the same setup with one IP address. But I don't want to put anything in front of nginx or node.js, or use one server as a proxy to the other one. Mostly because the node.js server use webstocket for pushing data to the clients and so the less layer you have in front of it the better.

In fact the most important element here is probably Beanstalk and then Redis.

Beanstalk and Redis are components which inside a monolithic application will only be a stack (FIFO) and a hashtable. By extracting them and let them live outside the application you gain a lot of flexibility, an defacto API, and some nice future scalability options.

The second point is I try to deliver a lot of content via the file system - something nginx is good as. So both application, drupal or node.js either delegate the content creation via Beanstalk or generate it. And stock the result in the file system, either on the server or on the cloud (amazon S3). File stocked on the S3 can then use CloudFront to fast delivery.

This stack is what I think is currently needed to create a robust base for an application. You can see it as a basic framework for creating application. The stack can run in development mode or in production mode. And in production mode you should prune any component you are not using.

I plan to create some documentation for the stack. Currently I am developing a full application's framework. This stack is the base. s66c is the administrative layer for the stack. After that come a framework based on drupal which let you create subdomain for every user while avoiding the issue of duplicating the base code or the database (I use a smart trick where I redefine each drupal's user as an application space) and finally on the top of that will came an UI based on GWT which let you run an app in all the major platform, PC, tablet and phone. This last layer look like something coming from HTML5 but is actually using previous technology.

t3ll.me run on this stack but currently the drupal layer is not visible

http://t3ll.me/node.js&and&nginx/are+blasting+fast

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

Thanks for the recipes!

onomated's picture

I'm installing a somewhat similar stack on Ubuntu 11.10 on Rackspace clouds. I'll have a grails api server on mongodb. Considering using the mongodb modules also for Drupal. I'll let you know the outcome

You are very welcome

visualfox's picture

The recipes should also work for 11.10

I am looking forward to hear about your experiment. I am thinking to use redis to store drupal user sessions. This way node.js can access the user sessions.

http://drupal.org/project/redis

This solution will ask for some custom code for handling the session:
http://drupal.org/sandbox/pounard/1263216

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

hmm ok I feel like a complete

gateway69's picture

hmm ok I feel like a complete moron :) how the hell do I get this to run on my ubuntu 10.04 server...

Also are 2 nic's required, im testing this on a vm image and want to take full advantage of drupal and node js for a project...

I need to have two IP in

visualfox's picture

I need to have two IP in order to use websocket.js. So one IP send to nignx the other one to node.js. There are other way to handle this but I don't want or need anything in front of node.js or nginx. But you can also run node.js behind nginx... or the reverse.

For the installation just follow the recipes in the order and prune everything not fitting your need. And if something become confusing just contact me. It's a lot of copy and paste. But I have deployed full and partial version on ubuntu 10.04 without any problem. The hardest part is to start! :-)

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

hah, i thought their was some

gateway69's picture

hah, i thought their was some sort of magic wand to that does it all for me :) cut and pasting I am.

I noticed on the nginx your using an old version , I think by default ubuntu 10.04 still has version 0.7.65 which is quite old, just fyi..

oh and their is a quicker way these days to install drush.. I'm sure your aware of it, but just fyi..

The easiest way to install the latest release of Drush on Unix/Linux systems is via our custom PEAR channel. (See below for Windows-specific instructions)

pear channel-discover pear.drush.org
pear install drush/drush

Lol. That more like a

visualfox's picture

Lol. That more like a grimoire than a magic wand...

Thank you for the feedback. I wasn't aware of the update way to install drush. That the problem with these recipes they cover a large ground...
I will check what version of nginx should be used by ubuntu 10.04

Did you get any progress on your server installation?

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

I updated the drush recipe

visualfox's picture

I updated the drush recipe based on your feedback (that a lot cleaner way to install drush).

for nginx I will stay with the official ubuntu version...

Thanks again!

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

thanks, so I did run though

gateway69's picture

thanks, so I did run though the cut and paste stuff but I ran into some issues I forget what happened on my end, I didn't install some things and when it came to nginx side of conf I think I had issues crop up.. but could be my cut and paste errors, it takes a long time to go though that..

could something like this be put into a shell script?

I have the feeling that a

visualfox's picture

I have the feeling that a script will make things much worse. One part of the problem is the ever changing nature of the installed components. The other part is the need for flexibility. Where I think a script is necessary is for the server management afterward.

I am guess - because that the only error prone area - that you get into trouble with php-fmp. First you are kinda out of luck as the previous php_fmp maintainer have drop their ppa when php 5.4 become relased. And the second aspect is the way I'm handling a second php-fmp pool for development propose (this pool listen to the port 9001). This let me display php error directly in the browser while I am doing development.

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

I plan top update all the

visualfox's picture

I plan to update all the recipes for the up coming LTS Ubuntu. This version will use a more recent (and apparently still in development) version of nginx. And php-fpm should be installable from the precise ppa.

Philippe Blanc

President and founder of VisualFox LLc http://www.visualfox.me
Founder of OYOAHA which helped to organize the first Drupal Con in Portland
President and founder of the short lived Blacktonic A

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: