New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate Drush Aliases for all Sites in an Org? #779
Comments
Heads up @ossobuffo and @greg-1-anderson :) |
I can see the difficulty in implementation, but would be great for our organization needs. |
@joshkoenig I have two versions of this which work and we could use. This one does the processing in Terminus: This one makes the change on the API: @bensheldon Prefers an API change, otherwise the Dashboard aliases will not be consistent with Terminus'. IMHO, I agree that that is the best solution. Why would anybody want an incomplete list of aliases? |
Whichever solution is chosen, it should take into account HTTP timeouts for organizations with ludicrous numbers of sites. With the old drush-based terminus, I could no longer fetch an aliases list because my HTTP connection would time out. I don't know your internal architecture, but how about one task to queue generation of an aliases file on the server-side, and another task to fetch it once it's finished? |
Would love to see a performant solution for this with big organizations with lots of Pantheon sites and dev branches. |
For teams with a very large number of sites, we are discussing improvements to site-local aliases. Historically these have had problems, but the situation is improving. See: drush-ops/drush#1532 |
+1 on this request. I was just about to write this request up in the power users group, but assumed that I was just dumb and that it was already there somewhere. Ideally, I want to put whatever this command turns out to be into an "on-login" script that automatically runs every time I open Terminal. |
With the recent introduction of machine tokens, automatic updating of your Drush aliases is well within reach. Traditionally, this is what I have been doing:
I just run |
@kellybell I tried to get this change in a couple of ways, but it has been stymied by technical considerations. I adapted the command I wrote to do this task into a script using Terminus as a library. If you install pantheon-systems/cli from composer and use this script, you can generate all your aliases at once. |
I'm having issues getting terminus to work right now, but I'll try this as K On Jan 28, 2016, at 09:48, Sara McCutcheon notifications@github.com wrote: I tried to get this change in a couple of ways, but it has been stymied by — |
Addressed by the all-aliases Terminus plugin (https://github.com/pantheon-systems/all-aliases-plugin), closing issue. |
From a customer perspective, it's a PITA that the Download Drush aliases link on the my Dashboard page does not include sites which I have access to via Organizations. I don't use Terminus yet, not really sure if I want to. I will probably build the alias files manually. Please come up with a better solution, i.e. make Download Drush aliases do what customers expect it to do. |
That plugin has an unfixed known issue, which is resolved here: Kelly Bell On Sat, Feb 27, 2016 at 3:55 PM, Andy Inman notifications@github.com
|
Hi, came here also looking for an "all-aliases-plugin" that would work for organizations, and the link posted above now gives a 404 from github... Does anyone know what is the known issue with that plugin? There are zero issues on the github page for that plugin... |
nvm... I got it to work. Had to comment a line of code and increase the OS open file limit. This is my first day playing with terminus, so forgive any non-standard practices... Increased file limit on OSX with
For the code change, I am not sure this is recommended for any hosts other than your own development box, and maybe not even then... but what I did was:
After those 2 changes, the all-aliases plugin started to work for me. |
Might your version of Terminus be out of date, @aloyr? There was a problem with a big loop of file-openings, but I believe I'd fixed it. |
Hi @TeslaDethray, that's possible, although I believe I've updated terminus this morning via composer. I will check it tomorrow as that happened on my work computer. |
ok, composer seems to have only version 0.10.6 and github has 0.11.1, so I should probably just use the github version instead? |
Use pantheon-systems/terminus. The pantheon-systems/cli project has been abandoned. |
hi greg. thanks for the info. i had pantheon-systems/terminus, but i was stuck on an old version... just changed my composer version to pantheon-systems/terminus dev-master instead... |
Use '~0' if you only want to get tagged releases. |
Currently the generation of Drush aliases relies on an API call that only puts sites a user is a direct team member of into the file.
https://github.com/pantheon-systems/cli/blob/80f31bb1c4ae61a6f2dac5ccebd6113f374ad66b/php/Terminus/Commands/SitesCommand.php#L46
Members of organizations do not have an easy way to get an aliases file for all the sites in the org, and when there are many sites the
terminus drush ____
command is not very performant.We could construct an alias file for all sites in an organization that would work for most purposes. It could save to
$HOME/.drush/{orgname}.aliases.drushrc.php
.This would be a pretty heavy operation since it would require multiple API calls per site. If we wanted to support this we might need to develop something new on the backend to allow it to be efficient.
The text was updated successfully, but these errors were encountered: