rocketeer
rocketeer copied to clipboard
Allow customizing matrix
Right now, when A servers are configured and B tasks needs to be performed the following A x B matrix is build automatically and is executed sequentially or in parallel.
In some cases multi-server deployment isn't as straightforward as possibility to reflect that through matrix usage would be great. For example:
- there are 10 servers inside
production
connection - the servers are grouped into a blocks of 3 (except last one that stays aside)
- the task needs to be in parallel on each group, while servers within same group are processed sequentially
- when all parallel work is completed execute task on 10th server
From looking at code this is controlled by TaskQueue
class.
This is more generalized way of #638 issue.
What ideally would you like the configuration to look like, to give me an idea of what would be a clear way to represent your use case? Then I'll worry about making it work :p
I have no idea, because I myself haven't ever configured such thing in other deployment system. What I was after is configurable deployment solution, when multiple servers are involved.
Probably I was looking at that from the wrong angle, because when there are multiple servers it means something like AWS is used and in there I can just start another scaling group with same configuration as current one, then do regular update on all servers and then just switch load balancer to point to new group.
Rocketeer indeed won't handle load balancing by itself. However if you use AWS for that or anything like that, they have PHP SDKs which you can use in your configuration (since it's PHP as well):
'production' => [
'host' => $awsSdk->getCurrentHostNameOrSomething(),
],
At least that should work, theoretically. Rocketeer 3 will make it easier to do those things by providing the user with a service provider for its internal container, allowing you to more easily swap core classes of Rocketeer with your own, and override methods, such as ConnectionsHandler::getAvailableConnections()
and such.
Rocketeer 2 is also built on a container but there isn't really any user friendly way to interact with it.
Nice. Will wait for v3 version then.