Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Salt: improve drush provisioning. Fixes #2616.#2796

Merged
sergiitk merged 1 commit intoDoSomethingArchive:devfrom
sergiitk:drush-provisioning-improvements
Jul 8, 2014
Merged

Salt: improve drush provisioning. Fixes #2616.#2796
sergiitk merged 1 commit intoDoSomethingArchive:devfrom
sergiitk:drush-provisioning-improvements

Conversation

@sergiitk
Copy link
Contributor

@sergiitk sergiitk commented Jul 8, 2014

Improve drush provisioning

  1. Move drush salt state rules to dedicated drush.sls
  2. Move drush installation from lamp-drupal.sls to drush.sls
  3. Simplify drush installation:
    • Use git state plugin instead of complex command chain
    • Create drush symbolic link in the same drush task using cmd.wait
    • Run all commands as vagrant user
  4. Simplify terminus drush module installation
    • Use git state plugin instead of complex command chain
    • Checkout all files as vagrant user so chown not needed anymore
    • Run all commands as vagrant user
  5. Set state dependencies
  6. Clear drush cache at the end of drush salt state script

Fix and improve drush user settings

  1. Ensure that /home/vagrant/.drush/ exists. Fixes Salt: drush config files are not moved into place #2616
  2. Move ds drush aliases and policy provisioning to drush.sls.
    Since make_local and terminus plugins are installed
    to /home/vagrant anyway, it didn't make sense to keep aliases and policy
    in dosomething.sls. It just impaired code readability.
  3. Move ds.aliases.drushrc.php and policy.drush.inc to drush folder
  4. Provision all files from drush to /home/vagrant/.drush/ recursively

Testing

Improve drush provisioning
------

1. Move drush salt state rules to dedicated `drush.sls`
2. Move drush installation from `lamp-drupal.sls` to `drush.sls`
3. Simplify drush installation:
   - Use git state plugin instead of complex command chain
   - Create drush symbolic link in the same `drush` task using `cmd.wait`
   - Run all commands as `vagrant` user
4. Simplify terminus drush module installation
   - Use git state plugin instead of complex command chain
   - Checkout all files as `vagrant` user so `chown` not needed anymore
   - Run all commands as `vagrant` user
5. Set state dependencies
6. Clear drush cache at the end of drush salt state script

Fix and improve drush user settings
------

1. Ensure that `/home/vagrant/.drush/` exists. Fixes #2616
2. Move ds drush aliases and policy provisioning to `drush.sls`.
   Since make_local and terminus plugins are installed
   to `/home/vagrant` anyway, it didn't make sense to keep aliases and policy
   in `dosomething.sls`. It just impaired code readability.
3. Move `ds.aliases.drushrc.php` and `policy.drush.inc` to `drush` folder
4. Provision all files from `drush` to `/home/vagrant/.drush/` recursively

Testing
------
- You can fix #2616 issue simply by running `vagrant provision`
- New build: `drush`, `terminus` and `make_local` plugins should work as usual,
  `bin/ds pull stage` should not throw "no aliases" error
@blisteringherb
Copy link
Contributor

👍

sergiitk pushed a commit that referenced this pull request Jul 8, 2014
…rovements

Salt: improve drush provisioning. Fixes #2616.
@sergiitk sergiitk merged commit c05edcd into DoSomethingArchive:dev Jul 8, 2014
@sergiitk sergiitk deleted the drush-provisioning-improvements branch July 8, 2014 19:42
@sergiitk sergiitk added the devOps label Sep 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

Salt: drush config files are not moved into place

2 participants