Provide development environment for AI development using DDEV
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3532795. --> Reported by: [breidert](https://www.drupal.org/user/135619) Related to !745 !762 !714 >>> <h2>Description</h2> <p>To develop for Drupal AI we need a unified development environment using DDEV. This will allow developers to develop against the same codebase and configuration.</p> <p>Similar to Drupal CMS (not using Drupal CMS) we need a setup that any developer can use to contribute and review.</p> <h2>Requirements</h2> <p>Similar to Drupal CMS (see below) We need the following:</p> <ul> <li>Composer project to installs Drupal with selected recipes</li> <li>Standard recipes (we could use some from Dupal CMS) that include sensible demo content, so AI functionality can be tested</li> <li>Recipes that install and configure AI modules</li> <li>Documentation how to setup a local development environment</li> </ul> <p>After running the installer a fresh Drupal instance should be setup with a sensible CMS configuration with sensible demo content. AI modules should be already installed, and selected functionality should be pre-configured.</p> <p>Different AI configurations should live in different recipes. Some recipes should be installed by default. Others should be optional to install.</p> <p>One or more AI providers should be installed by default. API keys should be easy to configure (maybe during installation) or our demo environment should ship with an readyly configured AI provider (for example Amazee).</p> <p>Notes (feedback from the maintainers <a href="https://www.drupal.org/u/marcus_johansson">Marcus</a> and <a href="https://www.drupal.org/u/admitriiev">Artem</a>):</p> <ul> <li>Maybe an AI recipy is enough. Instead of having a custom composer project, <a href="https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates#s-drupalrecommended-project">Drupal's recommended project</a> could be used.</li> <li>Only minimal functionality should be installed. Additional recipes that provide AI configurations should be optional to avoid facing regressions in other AI functionality.</li> <li>Realistic demo content and some content types are necessary for AI search, but also important for reviews in general.</li> <li>Recipes from Drupal CMS (see below) can be added, but we should not have dependencies in AI development to avoid facing regressions in un-related Drupal functionality.</li> <li>Amazee only has chat + embeddings. However, we can work with that to start with and have requirements of adding other providers for other task.</li> <li>We should have Postgres vector db, since its easy to export/import from and also is what we will be using with DevPanel.</li> </ul> <h2>Examples and links for Drupal CMS</h2> <p>The documentation for setting up Drupal CMS with DDEV can be found here:</p> <ul> <li><a href="https://new.drupal.org/docs/drupal-cms/get-started/install-drupal-cms/install-drupal-cms-locally-with-ddev" target="_blank">Install Drupal CMS with DDEV</a></li> <li><a href="https://www.drupal.org/project/cms" target="_blank">Drupal CMS recipes</a></li> </ul> <p>The composer project is here:</p> <ul> <li><a href="https://git.drupalcode.org/project/cms/-/tree/1.2.x?ref_type=heads" target="_blank">Drupal CMS composer project</a></li> </ul> <p>A recipe including demo content for the first version of Drupal CMS was created<br> <a href="https://www.drupal.org/project/drupal_cms_demo_content" target="_blank">here</a>.</p> <h2>Todo</h2> <ul> <li>Align with <a href="https://www.drupal.org/u/marcus_johansson">Marcus</a> because some prior work exist for the integration of Drupal AI with <a href="https://www.drupalforge.org/" target="_blank">DrupalForge</a></li> <li><strong>Create a proposal before implementation as issue comment</strong></li> <li>Implement first version</li> <li>List follow up tasks as issue comment</li> </ul> <h2>Accept</h2> <ul> <li>When I follow the instructions in the comment, I can test the DDEV setup and verify setup works.</li> <li>When I setup the site I see a nicely configured Drupal CMS with sensible demo content.</li> <li>When I check the AI providers, I can verify that a provider is pre-configured or I can easily configure them myself.</li> <li>When I check the documentation in the comment, I can test selected AI functionality.</li> <li>Once the instructions and documentation have been verified, they are documented on Drupal.org.</li> </ul>
issue