-
-
Notifications
You must be signed in to change notification settings - Fork 641
More granular install_site #484
Comments
Oh, and, what would be really slick is if I can somehow pull down an existing database to perform the site install (whether that's a local SQL file or a Drush alias) |
Not sure if there's a good way to solve this as the drush installation step just calls Drupal cores Where I work we do the following:
The two last steps could be added to a post provisioning script. Out of experience host key verification is a nightmare to figure out properly though. I opted for less magic and just going with good docs. |
@oxyc I don't foresee a need to always invoke Drupal's built-in installation. The term "install_site" is a bit ambiguous then. I think there is merit to evaluating some more granular configuration where we separate the installation of DrupalVM's database and other scaffolding needed (like the set up of a VirtualHost) from DrupalVM's site installation routine. Some configuration like "provision_database", "provision_vhost", "provision_drupal_site" (equating to a DrupalVM specific multi site), etc would be really beneficial. |
Might need some better docs. The only tasks that are done if
Neither of these are something you want to do when importing an existing database and it seems like these are the only two steps you wish to exclude as well. In retrospect I guess |
I believe @geerlingguy mentioned he would be interested in adding ansible tags if vagrant adds support for it. Meaning that if vagrant supported |
Sorry for spamming... One last thing. The site installation will only occur during the first provision when Besides support for |
@oxyc - you bring up a great point. We should really emphasize the use cases and try to articulate them more clearly. I'm not fully convinced this doesn't warrant some development attention. As such, here goes:
I would be curious to discuss this with @oxyc or @geerlingguy |
Currently not supported. My personal opinion would be that an example post provisioning script would be enough. Otherwise might be something worth adding to geerlingguy.drupal if it gets cleaned up. @geerlingguy probably has better input.
The way I see it is a project should be entirely contained within a version controlled repository. Currently you can store drush aliases in
This is a constant work in progress and needs improvement for sure. http://docs.drupalvm.com/en/latest/deployment/local-codebase/ covers some of these already.
Setting |
This was kind of the idea behind the Yeoman config generator, to abstract the config overrides to question prompts that explain it a bit more. https://github.com/kevinquillen/generator-drupalvm In any case, this is something that is likely solvable from updating or extending on the current documentation. |
I actually value DrupalVM because I don't have to script around it :) I'd love to find some way to incorporate this because I see it as a principle use case for installing a local VM and working with an existing site locally.
While I agree, I think most hosting providers and agencies maintain their aliases outside of repositories to centrally control them. It would be helpful if DrupalVM provided a construct to specify a list of local alias files (e.g. ~/.drush/mysite.aliases.php, ~/.drush/mysite2.aliases.php) to bring over and install upon provision.
Yes, but there may be merit to having another utility upon provision to create a DrupalVM specific settings file, as noted before. Maybe an additional user story is: As a developer, I want my DrupalVM specific settings to be added into my code-base as it's own settings file and potentially as it's own site. Adding hooks to do so would be a huge time saver, in my opinion. |
@kevinquillen I'm not familiar with the approach, but if it solves one or more of the user stories I mentioned, I'd be happy to try it |
True, and me too :) My concern is that there's quite a few steps to integrate this properly. Eg. in my case I need to use a ssh proxy to access our production environments as I keep signing in from weird IP locations around the globe. The VM also need to have the private key required to access production (or have a ssh agent running). And then we need to have ansible fetch and authorize the RSA fingerprints (and in my case I need a proxy for this). There are probably more scenarios which I missed and everyone uses a different combination of these. Doing all these things from simple config settings sounds difficult and might not even make it easier than just editing an example post provisioning script. Edit: I had something like this in a custom
Oh. You mean you have a separate repository for aliases only or how do you distribute these to everyone in the organisation? Also, why is this better than bundling the aliases with the repo in question?
I agree, this would make a nice addition now that Drupal actually has core support for it! |
I'm going to close this in favor of keeping the discussion around #305. For personal use, I have about 12 clones of Drupal VM with different config.yml files and different post-provisioning scripts, along with self-managed Drush alias files that allow me to do things like:
That syncs the database back. Then I have another drush command, or a shell script, ansible playbook, etc., that resets everything locally. In a team environment, there might be a set of Phing tasks, or a shell script, etc. that is called to finish the provisioning or resetting of a local developer's environment. But in general, overarching changes to the individual "site synchronization" or "reset" (I shy away from calling that installation, because in my mind install means you have no database, no files... just a codebase, and you install a fresh database with either a standin Acquia has an internal system called 'Bolt' that manages all those aspects (building, syncing, testing, resetting and debugging a site that's installed inside Drupal VM). I don't want to maintain both a development environment and a full deployment system all in one—there are too many variables there to make a nice, simple, maintainable solution. I'd rather the deployment/synchronization solutions be managed separately. For myself, that almost always means a drush alias and a couple shell scripts. |
Also, for team-based aliases, I do something like a #!/bin/bash
#
# Configure Drush aliases for VMs.
DRUSH_HOME=/home/vagrant/.drush
mkdir -p $DRUSH_HOME
chown vagrant:vagrant $DRUSH_HOME
chmod 775 $DRUSH_HOME
cp /vagrant/scripts/projectname.aliases.drushrc.php $DRUSH_HOME/projectname.aliases.drushrc.php And then I just stick the aliases (e.g. |
I read over #305 and yes I think it makes sense. I was thinking of creating a DrupalVM utilities Ansible role for these types of use cases. I may explore this on my own accord with the intent as a bolt-on set of candidate functionality. |
Any plans for Acquia to release Bolt? ;) For deployment I'm using capistrano and love it. |
I hope, but not my battle to fight right now :( Have you seen the ansistrano role for Ansible? |
Oh, I haven't. I'll take a look. Thanks |
Nice, saw that Acquia recently released Bolt 👍 |
@oxyc - Was it formally announced anywhere yet? I know they stuck it on GitHub... but I've been waiting for a more formal announcement before spreading the good news elsewhere :/ |
Not that I've seen. I just found it by snooping around randomly. I solved one of the issues with my own base repo thanks to it \o/ |
In a lot of ways, I want the functionality of the following line:
install_site = TRUE
Here is a problem: when I have an existing codebase, this line blows away my settings.php file.
In some sites I work on, this is the place in which global configuration is placed. It also may contain database settings, and such.
Blowing this away with Drupal's default.settings.php, while desirable for spinning up a brand new site, is not ideal for an existing code base.
However, I do want the ability for the following:
I am more than confident you have thought of this but I have yet to determine how to set this up.
The text was updated successfully, but these errors were encountered: