Answers.Body: <p>As a bit of background, it may help to check out "<a href="https://buildkit.civicrm.org/#/welcome" rel="nofollow">What's a build?</a>" and "<a href="https://buildkit.civicrm.org/#/welcome" rel="nofollow">What are the basic build techniques?</a>".</p>
  
  <p>There are a few directions one can take on that topic:</p>
  
  <ul>
  <li>Install an extension once, locally, for a single build.</li>
  <li>Modify the <em>build-document</em> of an existing <a href="https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md#build-types" rel="nofollow">build-type</a> so that the extension will always be installed in the future. (For example, if you modify the build-document for <code>wp-demo</code>, then the extension would be installed on <code>wp45.demo.civicrm.org</code>, <code>wp46.demo.civicrm.org</code>, etc. every night when the demo sites are rebuilt.)</li>
  <li>Create a custom <em>build-type</em> with a custom <em>build-document</em> using your own curated list of extensions/modules.</li>
  </ul>
  
  <p>Installing once is easiest -- you can use basically any extension-management practice that you'd use normally (with or without civibuild). The web-based manager or <code>drush cvapi</code> will be fine.</p>
  
  <p>To modify a build-document, you would create or edit files in <a href="https://github.com/civicrm/civicrm-buildkit/tree/master/app/config" rel="nofollow">app/config</a> -- you'll need to create steps for <em>download</em> and <em>install</em>. For example, in <a href="https://github.com/civicrm/civicrm-buildkit/tree/master/app/config/drupal-demo" rel="nofollow">drupal-demo</a>:</p>
  
  <ul>
  <li>The file <a href="https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/drupal-demo/drush.make.tmpl" rel="nofollow">drush.make.tmpl</a> defines all the download steps</li>
  <li>The file <a href="https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/drupal-demo/install.sh" rel="nofollow">install.sh</a> defines the installation steps.</li>
  </ul>
  
  <p>Digging into those files, you can see how it handles the CiviVolunteer extension. (Search for "volunteer".)</p>
  
  <p>To create a new build-document, you should copy one of the existing build-types. The best starting points are (IMHO) <code>drupal-demo</code> (which uses <code>drush</code> with <code>drush-make</code>), <code>wp-demo</code> (which uses <code>wp-cli</code> and <code>git</code>), and <code>wmff</code> (which uses <code>git submodules</code>).</p>
  
  <p>When editing a build-document, the development-feedback-loop (edit=>run=>validate=>repeat) can be a bit slow. To mitigate that, buildkit includes caches and <a href="https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md#rebuilds" rel="nofollow">nuanced rebuild commands</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-18T04:26:11.043Z
Answers.LastActivityDate: 2015-04-18T04:26:11.043Z
Answers.UserDisplayName: Tim Otten
Answers.Body: <p>If your aim it to automatically install an extension, you will need to change a few files. 
  I did it with Tim last time I was in SF for civisualize, search for "civisualize" to find them.</p>
  
  <p>If the aim is simply to add an extension, I simply symlink it into the ext folder and run:</p>
  
  <p>drush -y cvapi extension.install key=org.whatever.yourext debug=1</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T07:43:24.417Z
Answers.LastActivityDate: 2015-04-15T07:43:24.417Z
Answers.UserDisplayName: Xavier
Body: <p>When using civicrm-buildkit, it automatically configures an extension directory with something like:</p>
  
  <pre><code>/home/jon/local/civicrm-buildkit/build/d46/sites/default/ext
  </code></pre>
  
  <p>However, there are no extensions in that directory, though there are clearly extensions installed in the built site.  Moreover, extensions added to the extensions directory don't appear.  What's the preferred method to get extensions installed on a site built with civicrm-buildkit?</p>
  
Tags: <extension><developer><civicrm-buildkit>
Title: Installing extensions with civicrm-buildkit
ThreadText: # Installing extensions with civicrm-buildkit
  
  (Asked by: username_0 on 2015-04-14)
  
  When using civicrm-buildkit, it automatically configures an extension directory with something like:
  /home/jon/local/civicrm-buildkit/build/d46/sites/default/ext
  
  However, there are no extensions in that directory, though there are clearly extensions installed in the built site.  Moreover, extensions added to the extensions directory don't appear.  What's the preferred method to get extensions installed on a site built with civicrm-buildkit?
  
  **Tags:** extension, developer, civicrm-buildkit
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-04-18. Score: 3
  
  As a bit of background, it may help to check out "[What's a build?](https://buildkit.civicrm.org/#/welcome)" and "[What are the basic build techniques?](https://buildkit.civicrm.org/#/welcome)".
  
  There are a few directions one can take on that topic:
  
  * Install an extension once, locally, for a single build.
  * Modify the *build-document* of an existing [build-type](https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md#build-types) so that the extension will always be installed in the future. (For example, if you modify the build-document for `wp-demo`, then the extension would be installed on `wp45.demo.civicrm.org`, `wp46.demo.civicrm.org`, etc. every night when the demo sites are rebuilt.)
  * Create a custom *build-type* with a custom *build-document* using your own curated list of extensions/modules.
  
  Installing once is easiest -- you can use basically any extension-management practice that you'd use normally (with or without civibuild). The web-based manager or `drush cvapi` will be fine.
  
  To modify a build-document, you would create or edit files in [app/config](https://github.com/civicrm/civicrm-buildkit/tree/master/app/config) -- you'll need to create steps for *download* and *install*. For example, in [drupal-demo](https://github.com/civicrm/civicrm-buildkit/tree/master/app/config/drupal-demo):
  
  * The file [drush.make.tmpl](https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/drupal-demo/drush.make.tmpl) defines all the download steps
  * The file [install.sh](https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/drupal-demo/install.sh) defines the installation steps.
  
  Digging into those files, you can see how it handles the CiviVolunteer extension. (Search for "volunteer".)
  
  To create a new build-document, you should copy one of the existing build-types. The best starting points are (IMHO) `drupal-demo` (which uses `drush` with `drush-make`), `wp-demo` (which uses `wp-cli` and `git`), and `wmff` (which uses `git submodules`).
  
  When editing a build-document, the development-feedback-loop (edit=>run=>validate=>repeat) can be a bit slow. To mitigate that, buildkit includes caches and [nuanced rebuild commands](https://github.com/civicrm/civicrm-buildkit/blob/master/doc/civibuild.md#rebuilds).
  
  
  ---
  
  ### Answer by username_2 on 2015-04-15. Score: 1
  
  If your aim it to automatically install an extension, you will need to change a few files.
  I did it with Tim last time I was in SF for civisualize, search for "civisualize" to find them.
  
  If the aim is simply to add an extension, I simply symlink it into the ext folder and run:
  
  drush -y cvapi extension.install key=org.whatever.yourext debug=1
  
  
  ---
  
  