My development environment so far

Intro

These are my notes when doing my first (drupal) presentation @ FrOSCon 2008 Drupal Room This method uses the concepts
  1. All drupal sites in directory www
  2. All site-config in a separate directory
  3. All site-data in a separate directory
This way an upgrade to another drupal version runs smoothly. Hmmm this was about developer environment.

Add new local domain

Why do I need this? To make sites like http://nf.test http://nf.dev or http://froscon.demo
sudo su -
echo 127.0.0.254  froscon.demo >> /etc/hosts
exit

add apache site

We need a new website with a configured drupal install somewhere. Key words are VirtualRoot and DocumentRoot. This is my template TEMPLATE
sudo su -
cd /etc/apache2/sites-available
cp TEMPLATE.tmp froscon.demo
vi froscon.demo
# :%s/HOSTNAME/froscon.demo/g
# DON'T FORGET TO CHANGE DocumentRoot and log file locations
# :wq
exit

Let apache know of the new site

a2ensite froscon.demo
/etc/init.d/apache2 reload
exit

Installing drupal

cd /home/clemens/www

Get and unpack your drupal version

cd /home/clemens/usr/lib/drupal/core
wget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz
tar xvf drupal-6.4.tar.gz

create site

This is my new-site.php script.
cd /home/clemens/www
vi new-site.php
# change site name
# change drupal version

php new-site.php | bash

install site

cd ~/www/sites-data/froscon.demo/
cp default.settings.php settings.php 
chmod 777 settings.php

Create the database

This is my new-db.php script.
vi new-db.php
# edit hostname
# :wq
php new-db.php | mysql -u root

Fire up drupal

http://froscon.demo Do as drupal tells you
chmod 777 settings.php
and then reset it again
chmod 755 settings.php

install drush

cd /home/clemens/www/site-config/froscon.demo/modules
wget http://ftp.drupal.org/files/projects/drush-6.x-1.x-dev.tar.gz
wget http://ftp.drupal.org/files/projects/drush_mm-6.x-1.x-dev.tar.gz
tar xzf drush_*
http://froscon.demo/admin/build/modules

Running wild on the command line

Install my drush script runner to follow along with the commands.
cd ~/www
./drush froscon.demo help

./drush froscon.demo pm install simpletest cck node_factory

./drush froscon.demo mm dot | neato -o ~/froscon/2008/frosdem.png -T png

./drush froscon.demo -s -v mm enable drush_simpletest

./drush froscon.demo mm enable drush_simpletest nodereference

Running simpletest

http://froscon.demo/admin/build/simpletest
vi ~/www/sites-config/froscon.demo/settings.php 
http://froscon.demo/admin/build/simpletest

uninstall modules

./drush froscon.demo -v -s mm uninstall content

./drush froscon.demo mm uninstall content
rm -r sites-config/froscon.demo/modules/cck/

./drush froscon.demo mm dot | neato -o ~/froscon/2008/frosdem.png -T png

eclipse

- a test from node_factory - mylyn task tracking
AttachmentSize
Plain text icon TEMPLATE.txt434 bytes
Plain text icon new-site.php_.txt2.21 KB
Plain text icon new-db.php_.txt451 bytes
Plain text icon drush.txt581 bytes