This looks like it should be a powerful tool and might come in handy for a project I hope to work on this summer.

I was glad to see Drush support and was wondering if it also works with Aegir(Drupal hosting system). With Drush in place you are already part way there.

http://community.aegirproject.org/

Comments

MacRonin’s picture

Title: Does this work with Aegir? » Does Subprofiles work with Aegir?

updating title of issue so it can be understood in activity list without having to open first

nedjo’s picture

Version: » 7.x-1.x-dev

Not as yet. It's something I'm looking at and would welcome ideas or tips.

lelizondo’s picture

I've been using Aegir just for a couple of weeks now, so I could be wrong with this, but in order to make this work (BTW great idea) with Aegir the change would have to be in Aegir.

MacRonin’s picture

Glad to hear that it is on the list of potential ideas.

I think that they made some modifications to handle prompts from the install process to work with CiviCRM's install process. That code may be helpful for you also.

nedjo’s picture

There's a useful tutorial here: http://community.aegirproject.org/node/75. Looks like we'd need a new module, e.g., subprofiles_hosting. Looks like this would be a lot easier to do after Aegir is upgraded to D7 and we have access e.g. to element #states.

MacRonin’s picture

The upgrade of the Aegir code base to D7 is one of the Google Summer of Code projects. (Although it can of course process D7 sites, that's not what you are thinking about at the moment)

http://groups.drupal.org/node/146704 Aegir 2.0: D7 port & DNS editor

nedjo’s picture

Currently Subprofiles alters the install_configure_form to add radios for the desired subprofile (based on the previously-selected profile). When a user selects a subprofile, form #states is used to make visible further selections for the specific features to be enabled.

In subprofiles_hosting (in D6, for now, since it needs to run on the aegir site), we'll need to do something similar, only with an additional level:

* user selects profile, and available subprofiles are displayed.
* user selects subprofile, and available features are displayed.

It would be handy, though not of course essential, to have #states to handle that.

niccolox’s picture

subscribing

nedjo’s picture

I haven't been able to get Aegir working on my dev machine. From looking at the code, though, the task seems to be a bit complicated.

Subprofile data are contained in profile .info files. The data are potentially unique per platform--different distributions might include different versions of profiles with distinct subprofiles.

Available profiles per platform are determined in Aegir via provision drush commands run on cron and stored as 'package' data. D7 profile .info files are parsed, but it doesn't look like the info data are saved in provision tables (at least, the hosting_package_instance table doesn't look to have a relevant field). Need to figure out how to access .info data at runtime to be able to alter the site_node_form to add subprofile selection (and, possibly, feature selection).

niccolox’s picture

Issue tags: +aegir, +hostmaster

I found the manual installation process of Aegir 1.0 to work fine (after loads of attempts, mostly a sysadmin learning curve)

there are debian packages for Aegir now.

MacRonin’s picture

I used the Barracuda/Octopus installers for my setup. it gives you Aegir and a whole bunch of other stuff and so works best on a new server. Although in your case Barracuda without Octopus is probably enough.
Warning: it wants to setup a few other things beyond Aegir and so is usually best on a new box.

http://drupal.org/project/barracuda
http://drupal.org/project/octopus

romaingar’s picture

Hi,
Very interresting question. I've plan tio use subprofile with aegir but in an non covenience way....
I will search how pre-define subprofiles in the installation of the profile. Maybe a hook with provision...

niccolox’s picture

Omega8cc are releasing a BOA VirtualBox image I think soon, for local testing/dev...

iaminawe’s picture

subscribing

deciphered’s picture

Bump. Any work on this in the last year?

I assume not, but I'd prefer not to duplicate efforts if there has been.

ergonlogic’s picture

Okay, I'm looking into this as part of a joint venture between Chocolate Lily and Praxis Labs. I'm going to ignore the custom selection of features, and focus on exposing pre-defined sub-profiles, such as those in OpenOutreach.

Here, we have the code in Subprofiles that handles non-interactive installs. The important bit for Aegir is:

// If not, look for a Drush option.
elseif (function_exists('drush_get_option')) {
  $subprofile_name = drush_get_option('subprofile', 'standard');
}

With that, all we need to do is set the Drush option during install. We have an example module specifically showing how to add arbitrary data to the site context, which then gets loaded as a Drush option whenever the alias (context) is used. That'll be the basic mechanism for passing the subprofile to the backend, as well as tracking it in the UI.

We'll also need to track which subprofiles are associated to which profiles. This'll involve hooking into verify tasks, so as to parse profile .info files, and save the subprofiles to the db. There'll also be further UI work needed to add subprofiles to the site_node_form in the hook_form_alter().

nedjo’s picture

Title: Does Subprofiles work with Aegir? » Make Subprofiles work with Aegir
Version: 7.x-1.x-dev » 8.x-1.x-dev
Category: Support request » Feature request
Issue summary: View changes

As of #2915919: Support passing subprofile as a parameter from Drush it should be possible to use drush site:install with a second argument to specify a subprofile to install:

drush site:install myinstallprofile install_configure_form.subprofile=mysubprofile