Needs review
Project:
Quickstart: Prebuilt Drupal Development Environment
Component:
Drush
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
7 Jul 2010 at 11:33 UTC
Updated:
9 Dec 2019 at 08:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
MichaelCole commentedHi Davfigue,
This is an interesting idea, but I don't have time to devote to it. Would you be interested in submitting a patch?
-- Mike
Comment #2
MichaelCole commentedComment #3
MichaelCole commentedHi, I won't get around to this, but would accept a patch if it was submitted.
Comment #4
laceysanderson commentedSince I needed this functionality (the ability to create drupal sites with PostgreSQL backends for debugging purposes), I thought I might as well create a patch back to this project as requested. This is my first patch so hopefully it works!
I've tried my best to stay with the style of the quickstart module and have added to the drush quickstart-create and drush quickstart-destroy commands. I also added to the drush help to document a new option db-backend with can be either "pgsql" or "mysql" but defaults to "mysql". Thus if the --db-backend option is not supplied, the default behaviour is exactly what it was before these changes were made making them backward compatible.
This works when the "all" argument is supplied to either drush command as well as the "database" argument.
One small gotcha is that on site-install drush asks for the password of the newly created pgsql user in order to drop/re-create the database. This is because psql (the postgresql command-line utility) does not allow supplying a password automatically. I've added a drush_print that explains this to the user and supplies the password of the pgsql user so that they can just copy/paste in order to hopefully alleviate any confusion...
Anyway, just let me know if there are any problems or any other functionality I should have included and I'll see what I can do :)
~Lacey
Comment #5
laceysanderson commentedOh, and I documented how I set up postgresql 8.4 on the quickstart VM. Here are the step-by-step instructions:
1) First I installed postgresql:
sudo apt-get install postgresql libpq-dev2) Then I set the postgres user to have a password of quickstart
3) Set PostgreSQL to allow connections from apache by editing /etc/postgresql/8.4/main/pg_hba.conf
a) Comment out the following line by prefixing a #:
local all all identb) Add the following lines:
4) Restart postgresql so that the above changes can take place
sudo service postgresql restartAnd that's it!
NOTE: The quickstart pgsql user is the one used by the drush commands and by setting the access permissions to ident it ensures that only the ubuntu quickstart user can login to psql using it and also that the quickstart user doesn't need to supply a password. This is what allows the create/destroy database commands to happen without a password prompt.
Comment #6
laceysanderson commentedMoving this over to drush since that's the main functionality added by the patch.