Submitted by mig5 on Mon, 23/11/2009 - 14:17
I did a screencast on how you can use Drush Make to generate 'builds' based on Drupal core, with optional components such as install profiles + module/theme/library dependencies. The example given is the Managing News news aggregation system.
I then show how you can add the build as a Platform in Aegir, and rapidly provision sites on it in a multisite structure.
Thanks Mig5, I've been
Thanks Mig5, I've been meaning to try this out for a while but it was great to see someone else do it :)
- Sean Bannister
quote
It does do stuff.. and that stuff is cool.Yes, it is! :)
Nice screen-cast Mig. Good
Nice screen-cast Mig.
Good quality (sound and video).
To understand the first part of the screen-cast, user need to know how work Drush.
Now that I've seen more about Aegir I think I'll create my own server !
Nice work !
A Drupal Installation directory cant be found
Hi Mig5
I am in my var/aegir/,
I have copied and pasted the code from your make file into a file called managingnews.build in this folder
I run php drush/drush.php make managingnews.build
A Drupal installation directory could not be found [error]
The command 'drush.php make managingnews.build' could not be found.
I guess a simple question to ask to start is if I have the latest build of aegir, do I need to download the drush make file? I was under the impression it was included already.
Any help would be appreciated
Thanks
Gregg
Hi Gregg, If you're using the
Hi Gregg,
If you're using the latest version of Aegir, then yes you should have drush_make already. It will be located in the /var/aegir/.drush directory.
I'm unsure why it thinks it needs to bootstrap Drupal at this early stage - that may indeed be a symptom of not having drush_make installed.
Hop onto IRC on #aegir at freenode if you get a chance, and I'll be happy to help you troubleshoot in real time.
Hmm its there but not working
I see that drush make is installed in the .drush folder
I am now trying to run it from my platforms folder /var/aegir/platforms
I use this command php ../drush/drush.php make managingnews.make
A Drupal installation directory could not be found [error]
The command 'drush.php make managingnews.make' could not be found. [error]
When I run php ../drush/drush.php make
A Drupal installation directory could not be found [error]
The command 'drush.php make' could not be found. [error]
When I run php ../drush/drush.php I get the following list of commands
There does not seem to be a make command listed anywhere. Should there be?
I used the Aegir install script install.sh for my setup
Thanks for any help
Gregg
Gregg
Commands:
help Print this help message. Use --filter to limit command
list to one command file (e.g. --filter=pm)
cron Run all cron hooks.
updatedb (updb) Execute the update.php process from the command line
status (st) Provides a birds-eye view of the current Drupal
installation, if any.
script Run php script(s).
cache clear (cc) Clear all caches.
watchdog show (ws) Shows recent watchdog log messages. Optionally filter
for a specific type.
watchdog delete (wd) Delete all messages or only those of a specified type.
search status Show how many items remain to be indexed out of the
total.
search index Index the remaining search items without wiping the
index.
search reindex Force the search index to be rebuilt.
sync Rsync the Drupal tree to/from another server using ssh.
eval Evaluate arbitrary php code after bootstrapping Drupal.
installcore (ic) Install Drupal core via the specified install profile.
enable (en) Enable one or more modules.
disable (dis) Disable one or more modules.
uninstall Uninstall one or more modules.
statusmodules (sm) Show module enabled/disabled status
refresh (rf) Refresh update status information
updatecode (upc) Update your project code
update (up) Update your project code and apply any database updates
required (update.php)
info Release information for a project
download (dl) Download core Drupal and projects like CCK, Zen, etc.
test mail Run all tests and mail the results to your team.
test clean Delete leftover tables and files from prior test runs.
sql conf Print database connection details.
sql connect A string for connecting to the DB.
sql dump Exports the Drupal DB as SQL using mysqldump.
sql query (sqlq) Execute a query against the site database.
sql load Copy source database to target database.
sql cli (sqlc) Open a SQL command-line interface using Drupal's
credentials.
variable get (vget) Get a list of some or all site variables and values.
variable set (vset) Set a variable.
variable delete Delete a variable.
(vdel)
The folder to download
Hi mig5, thanks a lot for the screencast!
I am just starting with the installation profiles and drush_make, and I found the modules specified in the makefile inside the installation profile package are downloaded to the profiles/name_or_install_profile directory, instead of sites/all/modules...
I see, for example, atrium modules are organized in the sites/all/modules directory. Is that packages generated with drush_make? How can I make drush_make to put the modules I want to sites/all instead the profile/name_of_profile dir?
Thanks!
Hi davebv, Your question is
Hi davebv,
Your question is the same as was asked here - basically per my comment there,, you could simply avoid using install profiles and makefiles contained therein, and generate Drupal builds with core + modules + themes directly all in the one main makefile - because the default destination for modules and themes *is* actually /sites/all/ in Drush Make. It's the recursive execution of the makefile inside the install profile that 'binds' the dependencies to that install profile. And that's on purpose.
I do want to stress that putting modules, themes and libraries into the subdir of the profile is very much the point of this process: it means the entire 'application' is contained within one location, and that's what makes it easy to package. It makes /sites/all/ kind of redundant in that you are starting to treat your Drupal sites as running instances of a self-contained application that can be controlled.
Also note that sites using that install profile can see those modules and themes and no other sites can. To me it's a feature, but then again, I don't use /sites/all/ . Basically my attitude is that I simply don't think about /sites/all/ - in my 'application' workflow design, it is redundant (and yes there is duplication, lots of copies of cck and so on lying around.. but disk is cheap to me, and if I have things in /sites/all/, I feel I can't keep control of the application properly if I want to move things, and other sites depend on that stuff, etc.)
Re: your question about Atrium: the reason Atrium's components are in sites/all is because Atrium predates Drush Make, which is why Atrium is shipped with a whole copy of core rather than just an install profile + makefile like Managing News. So /sites/all here is really just a victim of the pre-paradigm shift.
However, I actually made a proof of concept OpenAtrium makefile and split out all the modules into individual repos on github, and provided the work to DevelopmentSeed. So we will soon see Atrium available simply as an install profile with makefile, and the modules in /profiles/(atrium profile)/modules/ .. the guys are working on it as we speak.
Not a very satisfying answer, but as best an answer that I can give :) think of it as 'by design'.
Thanks a lot for the
Thanks a lot for the explanation. I am sorry I repeated the question. Now I think I understand the concepts of makefiles and organization of files, etc. Thanks again for the complete answer.
Post new comment