rocketeer icon indicating copy to clipboard operation
rocketeer copied to clipboard

Allow customizing matrix

Open aik099 opened this issue 8 years ago • 4 comments

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

rocketeer deployment scheme

From looking at code this is controlled by TaskQueue class.

This is more generalized way of #638 issue.

aik099 avatar Feb 24 '16 14:02 aik099

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

Anahkiasen avatar Jul 10 '16 19:07 Anahkiasen

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.

aik099 avatar Jul 10 '16 19:07 aik099

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.

Anahkiasen avatar Jul 10 '16 19:07 Anahkiasen

Nice. Will wait for v3 version then.

aik099 avatar Jul 10 '16 20:07 aik099