3

There is a good guide for drupal 7 which explains how to build a install profile for drupal 7. I built an install profile using it.

But I want to build an install profile using Drupal 8. What changes do I need to make to my Drupal 7 install profile to make it work for Drupal 8.

PS: I know Drupal 8 is not ready yet but I'm doing this for learning purposes.

closed as too broad by Anil Sagar, Bala, user49, Mołot, AjitS Mar 5 '14 at 11:20

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Try Analysing code of drupal.org/project/spark distribution for which 8.x version is available... – Anil Sagar Mar 1 '14 at 13:48
  • 1
    This is probably too broad for a single question, creating an install profile start to finish isn't a trivial task. I'd recommend having a go at creating one based off one of the included profiles (or Spark, as @Anil points out), and asking questions about specific problems you encounter. If you're just looking for links to tutorials we can't help, not something we do here – Clive Mar 1 '14 at 13:55
  • @Clive: Fair enough! I was also looking for some tutorials/articles/developer videos or any documentation that would help me doing this. – claws Mar 1 '14 at 14:28
  • 1
    @claws If you want to change this to be a bit more specific, maybe ask "what are the major differences in building an install profile for Drupal 8?" (and leave out distributions for now), that would be a pretty good question. Our Q+A format works best when questions and answers are self contained, so providing links (tutorials/videos/etc) to back up answers is great, encouraged even, but we need to see the bulk of an answer here to make sure this site remains a good source of info :) – Clive Mar 1 '14 at 16:01
  • @Clive: I've edited the question. Now please up vote my question :P. – claws Mar 1 '14 at 17:03
3

Apart from specific code changes like converting the .info file to a .info.yml, the biggest conceptual change is that most of what an install profile will contain are configuration files.

Basically, you can take the configuration directory of in installed site, copy it into the config folder of an install profile and then you're already pretty close to building an install profile that will at the end look like the site.

There will still be a few challenges, for example dependencies between configuration and content. Lee Rowlands (@larowlan) is working on a default content module that allows to import content entities from .yml files too https://github.com/larowlan/default_content, but you can't just stuff all of it into an install profile.

Take a custom block for example. You have a block configuration, which depends on a custom block content, which in turn depends on a custom block type (bundle of the custom block). I'm guessing the way to solve that will be to split an install profile in a set of modules, that depend on each other.

  • The corresponding community documentation to the Drupal 7 instructions cited now exist at How to Write a Drupal 8 Installation Profile - drupal.org/node/2210443 - which i've edited to add Berdir's important information here and some other useful stuff like drupal.org/project/config_installer if you just want to grab the configuration and don't need to end up with an install profile. – mlncn Dec 9 '15 at 13:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.