I am writing this to communicate the general design, and project plan of my proposed install system. Unfortunately, to accomplish that I need to explain a fair amount of the background of how the project originated, and how it has evolved since then. This install system has been a goal I have been working towards for a while, and the plans I set into motion more than a year ago are busy reaching fruition now, and as such it is time for me to decloak the project, and follow the example of other big projects we have going on in the community at the moment by seeking more community assistance, and clearly defining the goals and requirements.

This post only aims to give a general overview of the install system. Each component will be discussed in depth in their own threads.

Project history

I first became interested in Drupal's install process in the run up to the Drupal 4.4.0 release. By this time I had been maintaining the PostgreSQL port for a few weeks, and I was thinking about a way to extend and manage the PostgreSQL support in Drupal, but not only in core, but contrib as well.

I spoke to Dries about it, and he was sufficiently interested that I started work on it. The first part of the problem I approached was the installation and upgrading of database schema's. This part of the system I christened the install API. It is an extension of the Drupal API to allow for the use of supporting files I called install files (they are like modules, but end with .install). The functionality of each of these files is essentially analogous to database.mysql, database.pgsql and updates.inc in Drupal core, but generalized into an API and made available to Drupal core and contributed modules alike. One of the other base requirements was that these files be external to the modules themselves, and not be required for normal operation.

I started coding, and at Dries' request, used Drupal itself as the first example of the system. I know now that was a mistake, as the Drupal system itself exists as a special case. The limitation I ran into, was that Drupal is structured to execute without any checks for such things as database availability. Meaning that all of Drupal's API's were unavailable in your typical installation scenario. This in turn meant that my fledgeling install.php file ended up exploding to several hundred / thousand lines of code copied verbatim from Drupal itself to be able to accomplish what I had set out to do, an extension to the Drupal API. Thus was exposed the single largest obstacle to getting the install system in core, and in an effort to continue development on the install API. I ended up hacking core, until it was in a state to at least bootstrap enough of the system to allow the install script to function.

After a lot of refinement, and several rewrites of my install script, I realized I was writing a piece of general functionality that deserved to exist on it's own, but be useable by the drupal install system. This system was the wizard API. This API's job was to generate a set of pages with questions on them, that had to be traversed in order, until all the validation was successfully passed. It was general purpose enough that it could be re-used for such things as node forms and surveys, but was powerful enough to drive the install script.

This is the point at which I stopped actively developing the install system and switched my focus to the new template system, and the theme that would become the PHPTemplate engine. This doesn't mean the project died however. Since that time, most of the code written has been running in production, and has been through several refinements. My goals however were very specific, and not aimed at allowing Drupal to become installer enabled.

My major contribution to the CivicSpace project was the initial development of their installation wizard using a completely rewritten version of the wizard API I had designed. It has been used successfully in their project for many months now, and it's kind of funny that every time I mention I am writing an install system that I should just use CivicSpace's. =) In CivicSpace, the limitation that I mentioned earlier has had the effect of requiring them to have several hundred (900 or so) lines of code copied directly from Drupal, in order to allow it to function. Once again, code like this will never be allowed in Drupal, and nor would we want it to.

As part of the hosting infrastructure I have written for Bryght, I further developed my install API to allow us to easily deploy, manage and upgrade Drupal sites. The system has been running in production there for several months, and has even been contributed to Drupal.org in patch form. I have not had time to follow up and get it into core yet however, but I hope that this post will offer the required incentives.

Being able to install a single module is all fine and well, but Drupal still lacked an essential understanding of module versioning or module dependencies, and this is the largest part of the install headache for many new users. There was a definite need for a dependency subsystem to be able to flag required packages, and not allow packages to be installed that would not operate. A prime example of this is modules which are installed on the wrong version of Drupal.

At the Drupal Conference in Antwerp, Vlado approached me about a dependency system he had been working on to allow him to quickly deploy and generate custom sites along with some fairly advanced distribution and configuration plans. Since then me and Vlado have been coordinating on his dependency system, and very recently his pet dependency system has reached a level where we will be integrating all our code and moving the project even farther ahead.

Install system components

Install API

  • Install and maintain database schemas.
  • Same mechanism used for maintaining core, through being ties to the system module.
  • Allow for automatic database prefixing.
  • Allow for easier maintenance and tracking of postgres port.

Wizard API

  • Used to generate the 2 installation wizards. Pre-configure and post-configure.
  • Allows for any modules to define their own wizards to use.
  • Allows for other method of specifying variables, that can be validated and executed on (external CLI tools).

Dependency API

  • Introduce packages.
  • Introduce meta-information for all packages (dependencies, versioning, etc.).
  • Used for installation, and for admin/modules.
  • Virtual packages. Example :
    • E-commerce package, and other bundles.
    • Install profiles (DrupalEDU, etc.), virtual packages can still have wizards and settings.

Packages

A package is a anything that can be distributed. Such as:

  • Modules
  • Themes
  • Styles
  • Translations
  • Theme-engines

Package manager

This component is not part of the core requirements of the install system but I am bringing it up because it will undoubtedly be mentioned by someone. It is planned, but there are several serious reprecussions to it.

  • App-casting of all Drupal packages, down to each site that runs Drupal. Will be useful to broadcast new releases, especially in the case of vulnerabilities
  • Allow for administrator user to automatically download and install / upgrade all packages.
  • Use dependency system to find packages that are needed, including flagging when an upgrade/install is not possible.
  • Allowing any external code to run on your system is a major security vulnerability, and will require write access to your install directory.
  • Requires serious rethink of Drupal release procedures, possibly including such avenues as digitally signed packages.
  • Essentially a web based apt-get for any running Drupal distribution.

Project plan

This is a short list, which I will extend in the near future to a full status list, much like the CCK status page. I am not the only person working on this, but we have reached a point where we can start integrating all the bits and pieces. This is the order in which I see the project completed, however it is not the order in which development has been taking place, as many of the components were designed to be as general as possible, and as such function completely on their own, we have a good amount of tested and production ready code already.

Phase 1: implementation of the install API

Goal: creation of install.inc and allow for upgrade and install of any contributed module that has a .install file. Minimal integration with admin/modules page, to allow for the least invasive basic functionality.
Status: PATCH

Phase 2: implementation of Dependency API

Goal: creation of dependency.inc and integration into Drupal administration system. Introduce the concept of packages, and meta-information. Build on phase one to allow for automatic install and upgrade of required components (no automatic download).
Status: IN PROGRESS

Phase 3: implementation of Wizard API

Goal: integration of Wizard API into system. It might need some refactoring, and I would like to see some features added, but it is pretty complete, and has been powering the CivicSpace installer for a very long time.
Status: IN PROGRESS

Phase 4: allow for 'safe' start up of Drupal, to allow for maximum re-usabilty of core.

Goal: the big issue that has been holding up the install system for over a year. This requires an extensive face-lift and re-think of the entire Drupal initialization process, and possibly reworking of part of Drupal's theme system (it needs a presentable fail-over theme in the absence of a database to tell it what theme to use, for instance). Recently, everyone's hero chx has independently started on a path of development with his variable bootstrapping patch, that might indeed form the core of the solution to this issue.
Status: IN PROGRESS

Phase 5: core install wizard

Goal: now that Drupal can initialize without a database, and it has all these API's that are designed specifically to facilitate installation of modules, we implement a clean, cohesive pre-install wizard for the system package, which allows for creation of config files. This should be triggered through an install.php file which is multisite aware, and capable of creating more than one site (I have a very good mechanism for this I will relate later.). If an already installed site is accessed, it would require the administrator to log in (not using user.module, to minimize dependencies on code that might get out of date) and update the site through an interface. It's actually a lo simpler than it sounds, and we have both my original installer code and the civicspace installer to base the install wizard on.
Status: IN PROGRESS

At this point, what I feel are the core requirements for the install system have been reached. What follows is how I feel future functionality should develop, using the groundwork we have built.

Phase 6: re-work release process

Goal:taking advantage of all the meta-information for packages and themes, rebuild the project module to show dependencies and all other information. Build RSS streams of all the available packages for each available version and allow user sites to check their modules against what have been installed and notify the administrator packages are available. For successfull upgrade of sites into the install system, it will likely mean we have to switch over contrib on a certain date, and all modules should be up to date and using the install api on that day. Modules that installed without it will cause problems, as they have no version info to inspect.

Phase 7: creation of install profiles

Goal: to allow new users to more easily install Drupal, and power-users to easily clone sites, we should probably develop several install profiles. DrupalED, DrupalBLOG and DrupalCOM are examples of what should be install profiles. Install profiles are nothing more than virtual packages that provide a custom wizard, and depend on a set of modules. Install profiles are essentially any package that 'provides: install-profile'. The post-configuration wizard (right after the database has been installed and the site can start up normally), will allow you to select one of the install profiles it found on the site. This is one of the places where the dependency system shows it's real power.

Phase 8: package manager

Goal: this is the big one. I absolutely love the idea, but the security minded among us have cold chills just thinking about it. Firstly, you will need write access to more than just your files directory. Secondly, it could irretrievably destroy your site. Thirdly, it opens up all sites with it enabled to a wide plethora of attacks (the recent firefox exploit should be proof enough). Furthermore, to do this responsibly, the release process on Drupal.org is going to have to include digitally signed packages of all developers, and it's going to require security auditing of anything we beam down to the sites.

All that said, I think this is the ultimate goal of the install system, and it is the piece of functionality that makes it all worth it. So, I will probably build the functionality, as carefully and as safely as I can, and then only allow someone to use it after they have A) downloaded it from contrib themselves, B) read and agreed to the terms of agreement, C) specifically enabled a variable in their settings.php to enable them to use it. Wordpress already has something like this. Although I'd hate to see what happens when we have a profile-Wordpress install profile package. *coff* *coff*

Closing words

I'm exhausted after typing that out, and I am quite busy this week, but I will try and type out / draw out the design document for each of the components. If all this seems like overkill, and way too complex, I assure you.. it isn't. You are looking at the very big picture of almost 2 years worth of development on several internally cohesive components. There's enough reason to include each of these components seperately into Drupal core, and they were designed to function as completely additional extensions to Drupal, so apart from the bootstrap re-shuffling, they are minimally invasive.

The order I have designated of the phases was assigned because I feel that each part builds on top of the other, and has enough merit. I chose to tackle contrib first, as an installation framework for core first, would mean phases 1 through 6 would have to be accomplished before patches could be accepted into core. Feel free to discuss additional requirements and thoughts, I will try to answer you timely, but I have a lot of backed up work along with some pretty cool theme system trickery I have up my sleeve.

Comments

davec611’s picture

Unlike most of the people who hang out around Drupal, I am a relatively unsophisticated user. As a result it took me at least two months to get my first Drupal install up and running. It took me two weeks to do my second site, and two days to do my third (with the help of an install script supplied by my host).

The point is I almost never got started, and when I did I almost quit. If Drupal is ever to be used as widely as it deserves to be, it needs to be easily installable by the thousands of guys like me. In its current state it really needs a fair amount of technical knowledge to put up, and that is going to limit the spread of Drupal severely.

So Adrian, I heartily applaud this initiative and wish you every success and full speed ahead. It seems a well thought out approach, although frankly I am not technical enough to really judge. I also think that it is really imortant to phase it as you are doing. An early release of a little bit of install capability is more important than waiting for a grand design to unfold.

Lots of Luck

Davec

Forest Lake Online

stevensj2’s picture

I agree with you, and I think most of the trouble new people find when installing Drupal is going into their database and uploading the correct file.

Even a small install script, that the user pre-configured (database name, username, password, MySQL or PostgreSQL?) before uploading, and once ran, the script set up the necessary tables. I think something like that would really work wonders for people new to Drupal.

It is my guess that most who are new to Drupal are not familiar with working with their database, and that the database work is actually the confusing stuff, not necessarily Drupal itself.

It's really good to see a strong effort being put towards the install, and as davec611 said, if anything is going to make Drupal as popular as it should be, it will definitely be the results of this.

-----------------
Josh Stevens
Nautilus7 Design | www.nautilus7.com

davec611’s picture

Josh,

For a newb like myself, certainly the database stuff is Greek. But it is even worse. The whole process of unpacking, figuring out what to do with it, getting it across to your host via FTP are all significant learning curves for people like myself just starting out.

Mind you, in a way I am glad i did have to figure this stuff out, but the fact remains that many more people will embrace Drupal when they can avoid all of the above.

Davec

Forest Lake Online

Owen Barton’s picture

Another (long term) possibility if we are really going to focus on ultra-newbies would be to put together a GUI desktop tool that would request the ftp/sql details (with lots of help, and as much intelligent guessing as possible), download the latest Drupal and do the basic install, then pass control over to the online wizard to guide the user through the post-install config. The install API would be a big help here, and ideally would allow this to be a simple, rarely changing, framework where all the actual install details are picked up from Drupal.org or the install package.

sepeck’s picture

You use ftp to get to your server? Why? heh, use scp. There are a lot of scenerios to install Drupal and many of them do not involve ftp. :)

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

adrian’s picture

The original deanspace install wizard worked that way.

I should mention that Vlado already has a command line apt-get-alike tool for his dependency system, and the entire install system is geared at automated cloning and installing of sites.

Think of the desktop installer at the synaptic to our apt-get.

We'd have to wait for the php-gtk project to mature before we could ship something like that though.
--
The future is so Bryght, I have to wear shades.

dikini’s picture

I've played a little with the dektop installer idea a month or so ago, and found that it caused bad karma. Not the idea itself, but the status and possibly (not sure about that) the implementation of php-gtk. It has a very bad tendency to encourage memory leaks, and very dirty hacks.

If a GUI-based desktop installer is to be created, we will need some clean frontend, possibly indedpendent of php, which is capable of communicating with the package manager. The reason I'm sayting that is that most of the GUI frameworks have highly integrated datastructures with them and this leads to very obscure coding, especially if we want to reuse code between drupal proper and the packaging/installation components.

Unfortunately, as far as I am aware, php-gtk is the only GUI framework with a php port.

Another possibility, is to create a 'specialised' local drupal install, which can do the selections, etc... task for you and then calls the proper distribution code. It has its merits as well as drawbacks.

---
save the kittens
vlado

adrian’s picture

This is how deanspace used to do it.

Their wizard was hosted on a server.

--
The future is so Bryght, I have to wear shades.

dikini’s picture

Probably the most feasible alternative is to provide some means to couple the command line tool with a GUI. For example a GUI program asks CLI "what packages are around?", gets the answer. The user selects the the ones they want in the GUI, which can afterwards pass all that for execution to the CLI.

This is just a sketch. The main point of it is to provide a communication mechanism, for examle STDIN,STDOUT,STDERR of the commindline tool can be used for that. I have planned an intercative mode for the tool anyway, so this is definitely possible.

The specialised drupall install will probably be an ovekill. I outlined in my previous comment just for completeness.

Bèr Kessels’s picture

I don't want to insult anyone! Please keep that in mind.

I, personally, do not really care whether a newb can install drupal easily. Why? because of how open source works.

The only people Drupal (and I) really benefit from is those who can help Those who write help texts, those who spread the word, thse wo write patches and modules.

We don"t at all benefit from Sztratumbu in west-Belugia running drupal to show off his Goldfish in a gallery. In fact, if any user just consumes, we loose. (Bandwith, time, etc)
The idea, of open source, indeed, is that with quantity (of users) comes quqality. If thousand users just use, chances are high there will be one professional writer wanting to help with a text.
Drupal experienced this when there was a server issue, we got so many donations, people want to help. great!

But, I, as developer, want a good tool, something I can use for my needs. And in that proces of "consuming" I manage to give something back. Then take some "fantastico user" (just an example). I really have no problem at all with them using drupal, or even a module I wrote, on contrary, if they like it, great, I made someone happy! But in the end, I do not really benefit from that fantastico user.
I find very often that people file issues against some of my projects that, after I spent some time on them, are only stupid mistakes, or even lazyness from that user. I dont want these users. I dont want lazy users.
When someone files a bug, and i ask him: could you please do This and That? and he helps me, help him find a bug, I am happy! I found a bug, and most prolly a way to fix it, he is happy because his issue is solved. Too often ,though the lazy newb, was just lazy 'I want feature Foo!!!!, your code is worthless without FOO!!!". and any OSS project can really do without them.

To make a long story short, spending loads of time on an installer script will enlarge the userbase, but also enlarge the trouble base.

---
if you dont like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]

niteshade’s picture

I'm a newb, really the newest of the newbs. Just getting started really in PHP. But I'm excited about the Drupal project, I've got some ideas, and once I get up to speed I'll be happy to contribute. True, I don't yet understand entirely how Drupal fits together, and true, I'll ask some dumb questions along the way. But maybe someday I'll contribute something that YOU find useful.

Nope, not insulted... actually, I agree with you that a small pool of dedicated developers is preferable to a large pool of "goldfish" people. But give us newbs a break, man. We don't try to be annoying... just trying to understand.

Monks in medieval Europe had a similar mentality... that if they keep knowledge in trusted hands it won't become corrupted by the masses. Usually people call those days the Dark Ages.

www.artechne.com

stephenrs’s picture

ber,

this is a pretty dangerous and destructive attitude toward developing open source software, and perhaps is one of the reasons drupal has failed to gain as much traction as some other cms projects. an open source project is nothing without users, and this includes newbies. developers can write as much code as they want, but if nobody is using it, then who cares? i've been following drupal for about 18 months, but i've been programming/sys admin-ing for about 15 years, and one of the things i've noticed is the lack of a "critical mass" within the drupal community. please don't get me wrong, i think drupal is excellent technology at its core and overall, but its inaccessiblity by semi-technical or non-technical people i believe is a problem.

you should remember that accessiblity of a project by newbies is an important part of helping a project evolve and become better. not only do newbies help to find problems that lead to fixes, but they also increase the need for developer support in general. the more people who can easily get a drupal installation up and running, the more need there will be for people like me to come in and help them customize it to their long term needs. this leads to more drupal-focused code getting written, and more developers doing work that is centered around drupal - this is a good thing for any community.

for a specific example, i've also been closely following another cms which happens to be very easy to get up and running for newbies. i get calls and emails all the time for customization work related to this cms. because of this i am active in the forums, and have contributed code, feature suggestions that have been integrated, and helped out on related add-on projects. while my personal site is still built on drupal, i'm a couple weeks away from launching a site that is dedicated to the other cms, with several free add-ons and other resources that (hopefully) people in the community will find useful.

also, while a complex and comprehensive package management and installation script would be nice, a simple web-based installation script that sets up the drupal database and other basic settings would do wonders for this project - and is not very difficult to write. it's the first thing that i noticed missing the first time i set up drupal, and i'm a bit surprised that a year and a half later it still has not been added. and please don't tell me to write it myself, that's not the point.

so if the goal is to keep drupal as a secret among technical people, then we can call it a success, but i really hope that your sentiment is not shared by other drupal developers - in the interest of helping this project grow.

when it comes to open source, i say "the more the merrier".

sepeck’s picture

You completely missed the point.

Ber sees other developers as contributors who make a project grow and expand it's capabilities beyond that which it has now. I on the other hand work towards accessability and improving the documentation as an entry point to building the middle teir that would support those who do not understand but with some work might.

I see through tracker your few posts in this forum. If you think accessability is important, then please start helping make Drupal more accessable with documentation. WITHOUT the folks who are willing and able to do this, you will contine to play in the other cms's forums and your audience will never use Drupal.

Drupal has had an install project for some time now. It is a lot of work to do it right. 4.7 has a substantial number of API changes to help accomadate this in the future and lays the groundwork for stuff in 4.8. Change is evolutionary over time not instantaneous.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Owen Barton’s picture

A really great plan - should really improve peoples experience of Drupal!

I have a few random ideas to throw into the plan:

  • It would be worth thinking about having different 'levels of questions' in the install wizard - somewhat like Debian. A beginner user should be able to get it all up and running after 6 questions max. An advanced user should get all the questions, and be able to go back and reconfigure anything which was part of the install (also handy for a beginning user who needs to tweak their install). This should apply for both drupal-core and contrib modules.
  • The install process for beginners would be a good place to look at creating 'install-profiles' for a 'one-click' setup of modules and themes for various common site uses e.g. Community-post/discuss, Blogging, Content/Book collaboration, Project site...
  • If Drupal gets a package manager this might be worth thinking about: Even though users should be testing each upgrade on a testing server first it gets less likely many users will do this the easier the actual upgrade process gets. One thing that would be well worth looking at is making sure every module upgrade is 'roll-back-able'. i.e. There should be a .uninstall file, which can be demonstrated to return the user to the state before the upgrade. This check should be automated through some scripts on drupal.org - to diff the .module and the sql dump before and after an install/uninstall cycle.
  • If the file permissions are opened up (even temporarily) one thing that would make things easier (and possibly more secure) for newbies would be automated building/testing of a .htaccess file. Several of my recent installations of Drupal have required manual hacking the URL Alias rules in .htaccess to get clean URLs to work. This was on standard Debian & Red Hat installs.

Just some thoughts - great work, I look forward to seeing this in action!!

- Grugnog

adrian’s picture

It would be worth thinking about having different 'levels of questions' in the install wizard - somewhat like Debian. A beginner user should be able to get it all up and running after 6 questions max. An advanced user should get all the questions, and be able to go back and reconfigure anything which was part of the install (also handy for a beginning user who needs to tweak their install). This should apply for both drupal-core and contrib modules.

I disagree. I believe the only wizards available should be the absolute simplest ones. Advanced users must know how to configure their sites, or even write their own install profiles. Although it's possible to re-run a wizard, I believe the actual configuration needs to be made simple enough to be understood by users.

The install process for beginners would be a good place to look at creating 'install-profiles' for a 'one-click' setup of modules and themes for various common site uses e.g. Community-post/discuss, Blogging, Content/Book collaboration, Project site...

The install process should be the absolute minimum required, and then refer to the selected install profile for the rest of the post-installation configuration.

If Drupal gets a package manager this might be worth thinking about: Even though users should be testing each upgrade on a testing server first it gets less likely many users will do this the easier the actual upgrade process gets. One thing that would be well worth looking at is making sure every module upgrade is 'roll-back-able'. i.e. There should be a .uninstall file, which can be demonstrated to return the user to the state before the upgrade. This check should be automated through some scripts on drupal.org - to diff the .module and the sql dump before and after an install/uninstall cycle.

The dependency system will stop you from installing until all the themes/modules you have installed are available for your version. If you force an upgrade, unsupported modules will be disabled. If you force a module to load.. it's your own fault if it breaks.

While a backup database can be created before install, on large sites however, this would not scale well. I have databases that are > 50mb in size, when tar.bz2'd. Also, in most cases there exist no realistic uninstall method for modules. Think for instance of node modules that have extra tables. Uninstalling them could mean bad things for database integrity.

Managing patches are out of scope for the install system.
If you are smart enough to modify the source of modules that have been sent to you, you need to be smart enough to manage your patches. We could even checksum all module files at install time, to check for modified sources. But diffing and patching anything automatically is out of scope, as it often requires a human to fix conflicts.

If the file permissions are opened up (even temporarily) one thing that would make things easier (and possibly more secure) for newbies would be automated building/testing of a .htaccess file. Several of my recent installations of Drupal have required manual hacking the URL Alias rules in .htaccess to get clean URLs to work. This was on standard Debian & Red Hat installs.

Creation of a custom .htaccess file could be added to the pre-configure wizard for the system module, but it should only be configured if it is found to be needed.

Oddly, I have never had to modify my .htaccess file, on debian and redhat. I needed to modify my httpd.conf on OSX to be able to AllowOverride all, however. There is no way that any core Drupal install wizard will ever try to configure a file of this importance. It will however notify you that clean url's are not supported and instruct you on how you can fix the problem.

--
The future is so Bryght, I have to wear shades.

Owen Barton’s picture

I agree with your responses and, after all, you have spent much more time thinking about this than me!!

With the third point I wanted to clarify what I meant. My point was that a package system is risky for users who do not religiously test each change becuase if a buggy/broken module gets installed there is no clear way of going back. While I agree that for some modules an .uninstall file could be overly complex (especially for major releases) for a lot of modules the uninstall could be as simple as removing a couple of fields from a table and overwriting .module with .module.backup.

Anyway, just 2c - great work!

dikini’s picture

In my mind, a package shouldn't be released until thorougly tested. It is true though that quality control varies. I think that some form of QA is required for contrib as well. Maybe not so strict as core, but with the introduction of packaging and install this will become a nessesity, if drupal wants to maintain a quality software image. Downgrading might be an option, but with the current release scheme it makes little sence - you will need to downgrade the whole release, not just the single module, which is something I wouldn't dream of maintaining.

While I plan of maintaining packaging off cvs as well, this is risky, whoever uses that should be prepared to suffer the consequences, and at minimum accidental hair loss and an attack of vampire butterflies.

sepeck’s picture

The current CivicSpace installer fails on a Windows IIS system. Is the goal of the final install script to be cross platform? *nix/Apache, Windows/Apache, Windows/IIS?

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

drumm’s picture

The errant function call is being handled better in the next CivicSpace release. And the CivicSpace installer probably doesn't resemble what the end of this process will look like.

adrian’s picture

The goal of the install system is to be cross platform.

--
The future is so Bryght, I have to wear shades.

dikini’s picture

The core of the install system must and will be cross-platform. Actually it is being written in php, so we can have code reuse as much as possible as well as common bugs between the package manager and drupal proper.

We need to provide the capability for making user-friendly interfaces to the package manager. What I would dream of is competition between those. Look at the various apt/drpkg frontends dselect/aptitude/synaptic/... There are enough taleneted people around who'll get upset by how an GUI package manager feels or looks.

As much as I like it, this part is to come a bit later. We need to focus on the install system first. It is probably a chicken and egg problem, but I suppose that drupal is the chicken here. While we can prepare the packages via scripting and have a good maybe not very newbie-friendly solution at the moment, the main improvement will come from the install sytem. The off-line tools will be the icing on the cake.

sepeck’s picture

now I am confused. I understand from adrian that the goal is cross platform... Are you saying that the short term is not? I don't care about a desktop installer (I like the current manual install myself) but I do care about anything that complicates the installation. I am willing to test on my systems when things are ready to test.

My issue with the CivicSpace installer is that even the manual install does not work after the installer fails (drumm indicated that it is being addressed for CS).

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

kbahey’s picture

A web based installer is just fine.

I mean you untar the stuff in a directory, point your browser somewhere, then answer a few questions, and you are magically installed or upgraded.

That is fine for me. A desktop installer at this stage is overkill. Perhaps later maybe, but not a priority compared to things like dependancies, upgrades, ...etc.
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

dikini’s picture

And that is not going to change. In the end everything is in php, and where php runs, installer will run.

There will be problems with a desktop installer because php-gtk is bad. At least I think it is bad. So there is a high chance that a GUI installer won't be cross platform. I personally don't care much about the desktop installer myself, but I'll try to make it possible for people to develop that for their preffered platform. I think that is fair.

kbahey’s picture

Adrian

Just want to say a big thank you for all of this.

Well thought out, very comprehensive, and will be a huge leap for Drupal.

My hat is off for you, and chx and all who assisted in this.
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

sami_k’s picture

Here, here! 3 Cheers for Adrian!

--
Etopian (Support & Hosting)
http://drupal.etopian.net

Hosting Geek’s picture

thx

sunnymonkey’s picture

Ok, this isntantly made me remember a script I wanted to install many years ago. And luckily, they have a new and improved version here:

***Link removed as it now links to spam***

May very well be worth getting in touch with them and I HIGHLY recommend making your way through the install to see how they do it.

It auto sets up the entire script via FTP on YOUR server including lots of "guessing" and step by step hand holding along the way :)

Helped me back when I was a noob to script installing ;)

I had no problems with drupal really, in fact I had a harder time configuring it than installing it.

Anyway, look at ***Link removed as it now links to spam*** and see how great it is :)

Dave

adrian’s picture

that type of installer could be built using the install system.

--
The future is so Bryght, I have to wear shades.

Zen’s picture

Hi,

Slightly OT, but are there any plans to reorganise the directory structure? I would like to see just three items in the root directory:

.htaccess
index.php
drupal/

and better organisation of the modules directory as well I think..

Just a thought :)
thanks and I look forward to seeing this in action :)
-K
P.S Is this slated for 4.7?

--------
Quillem.com

kbahey’s picture

I should add:

.htaccess
index.php
drupal/core
drupal/local

See this issue http://drupal.org/node/22336 which is exactly what you want. Also read the linked discussions on the mailing lists, since there is a lot of debate and viewpoints.
--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

Zen’s picture

Thanks :)

-K

--------
Quillem.com

gordon’s picture

The description of the wizardapi looks extremely useful for other projects. Where abouts is the wizardapi, so I can download it and see what it can do.
--
Gordon Heydon
Heydon Consulting

--
Gordon Heydon

lopolencastredealmeida’s picture

I'm a Drupal newbie so I don't really know how things roll here.

Mambo uses a very simple install system for itself and a XML based system for all addons that you can read more at Mambo's documentation

All files in a package are included in a ZIP file so you only upload a single file.

This is a sample module definition file that will be included in the ZIP:

<?xml version="1.0" ?>
<mosinstall type="component" version="4.5.1">
  <name>My component</name>
  <creationDate>01/08/2004</creationDate>
  <author>Test developer</author>
  <copyright>This component is released under the GNU/GPL License</copyright>
  <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
  <authorEmail>info@example.com</authorEmail>
  <authorUrl>www.example.com</authorUrl>
  <version>1.0</version>
  <description>This is a brief description of the component</description>
  <files>
    <filename>mycomponent.php</filename>
    <filename>mycomponent.html.php</filename>
    <filename>images/approve.png</filename>
  </files>
  <install>
    <queries>
      <query id="1"># create a table</query>
      <query id="2"># populate new table</query>
    </queries>
  </install>
  <uninstall>
    <queries>
      <query id="1"># delete the table</query>
    </queries>
  </uninstall>
  <installfile>install.mycomponent.php</installfile>
  <uninstallfile>uninstall.mycomponent.php</uninstallfile>
  <administration>
    <menu>My component</menu>
      <submenu>
        <menu act="sub1">Sub menu 1</menu>
        <menu act="sub2">Sub menu 2</menu>
      </submenu>
    <files>
      <filename>admin.mycomponent.php</filename>
      <filename>admin.mycomponent.html.php</filename>
      <filename>toolbar.mycomponent.php</filename>
      <filename>toolbar.mycomponent.html.php</filename>
    </files>
    <images>
      <filename>administrator/images/approve.png</filename>
      </images>
  </administration>
</mosinstall>

The query could be something like:

<query><![CDATA[ INSERT INTO #__mytable VALUES
   (1, '<P>HTML tags in queries</P><br><a href="http://www.mysite.com">My Site</a>');]]>
</query>

Hope it helps somehow.

Best,

Lopo
--
Humaneasy Consulting

Humaneasy Consulting
iPublicis!COM
www.humaneasy.com
www.ipublicis.com

CSM & CSPO

Arto’s picture

As a developer coming from the Mambo side of the fence myself, I'd comment that it'd be good to avoid unnecessary dependencies on XML. A lightweight alternative to XML, used to good effect in e.g. configuration files in Ruby on Rails, would be YAML (http://www.yaml.org/). It's easier on the fingers, eyes and parser ;-)

dikini’s picture

just had a look in YAML, it's cool. I like it, but for the installer it will be an overkill. It's like implementing a min programming language. But thanks for the bookmark.

Arto’s picture

No need to implement the whole standard, or even 10% of it :-) For example, this is how the database.yml configuration file for Ruby on Rails looks like:

development:
  adapter: mysql
  database: rails_development
  host: localhost
  username: root
  password:

Simple enough to parse, without any external libraries. This is on the whole pretty close to what Adrian wrote below about Debian's plain text standards. (Not that I care what the exact format is, as long as it follows the KISS principle, i.e. the opposite of XML and bloat.)

dikini’s picture

sorry, was offline(ish) for a long time.

Currently I'm looking at a package description, wich looks as follows:

package: name
schema:  database schema version
version: package version
depends: package 1, package 2
.....

There shouldn't be a big problem of defining any right hand side words. They are (sort-of) recognised by using callbacks. At least the intent is there. I had queries about other meta-data. So extensibility is definitely a "must have" feature.

That said, the initial implementation should be minimal to allow for better testing. We want something robust but simple, since people will depend on it for their site maintanance. If a compromise needs to be struck between robustness and extensibility I know what my choice will be.

adrian’s picture

are overkill.

We are following debian's standards of plain text files

variable: value

ie:
name: paypal
version: 23
requires: system = 4.7, ecommerce, somemodule

Also, all files in packages will always remain in their own directory, so files do not get moved around.

At install time, checksums of all the files in the directory can be made, and the queries are not part of the package meta-information.

--
The future is so Bryght, I have to wear shades.

walkah’s picture

i agree XML is probably overkill ... and not the most fun to hand edit .

why not use standard "ini" file format? it's fairly common, and there's a php built-in that will parse it directly:

http://ca.php.net/manual/en/function.parse-ini-file.php
--
James Walker :: Bryght Guy

--
James Walker :: http://walkah.net/

sneakin@nolan.eakins.net’s picture

How about something like a little PHP snippet that can get included? Something like a dictionary or something just as simple. From my slight excursions into the code for the modules there might be some ideas on how things get added to menus and stuff.

Nolan Eakins
SemanticGap™

Toe’s picture

For example, phpBB has a generic converter system and packages for various other forum systems (XMB, YaBB, etc) that define where/how to pull the data in. They're also planning to use this converter system as the upgrade script from phpBB 2.x to 3.0.

Could the new Drupal install system be adapted to a purpose like this? Like say I want to convert a phpNuke site/database to Drupal. I'd grab the convertor definitions package for phpNuke, plug it into the Drupal install system, and be able to pull the data over. Understandably, CMS converters are a dicier proposition than forum converters, especially for modules. Still, I think it could be useful.

dikini’s picture

I can't see this being done directly within the install system. It will complicate the code too much.

Having said that, I don't see a reason to have a package/module reusing the facilities provided by the install system, or extending it which does that.

For example:

Configure the basic drupal - database, admin, initial modules,...
Install nuke_importer module.
Use the nuke import wizard to convert a current nuke site to drupal.

Souvent22’s picture

Nice project.

jonathan_hunt’s picture

I agree that drupal could do with a better packaging and installation system and your approach seems comprehensive. But why re-invent a packaging and installation system when PHP already has PEAR? What will your system do that PEAR packaging can't or won't? Or is this a case of NIH?

dikini’s picture

I uploaded this to bryght's svn. It belongs to core and it is too early to suggest to add it to that. drpkg.inc.
You might want to have a look at dependency.inc
as well.
I posted a few notes in this post. I hope this will stirr the installer effor a bit. I don't have time at the moment to work on the installer proper routines, but I can generate template or kick-start files for all contrib modules, which ahve a mysql and pgsql files.

dman’s picture

I'm shelving my issue suggesting a hook_setup() functions for modules to impliment their run-once code in favour of this project.

Each custom module either has to create a database table, or check a couple of other module dependancies, or both. Some of the smarter modules do a little bit of look-ahead, but they do it each time!

... but is this proposal still alive? has it moved to another thread?

Should it not be moved to Drupal Enhancement Proposals which has been sitting empty for as long as I've seen it?

.dan.
http://www.coders.co.nz/