Download the PHP package muxx/dplr without Composer
On this page you can find all versions of the php package muxx/dplr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package dplr
Short Description Object oriented deployer based on GoSSHa
License MIT
Homepage https://github.com/muxx/dplr
Informations about the package dplr
dplr
Object oriented deployer based on GoSSHa which allows to execute tasks simultaneously and in parallel. Simple and fast.
- Installation
- Documentation
- Initialization
- Register servers
- Register tasks
- Running
- Result processing
- Tests
Usage
Example of usage:
Installation
Use composer to install dplr:
Important: dplr
requires GoSSHa.
Documentation
Initialization
Initialization of ssh authorization by key:
Register servers
Add multiply servers with adding in different group. Adding to groups allows you to execute tasks on servers of certain group.
Register tasks
dplr
allows to register two types of tasks:
- Command executing
- Upload local file to remote server
In example above file parameters.yml
will be uploaded on all servers simultaneously and in parallel. Second task executes only on servers from group app
(1.2.3.5
and 1.2.3.6
) in parallel. For second task defined execution timeouts (15 seconds).
Sometimes you have to execute different tasks in parallel. For this case Dplr
has multithread mode.
In example above command app build
will be executed on all servers. After that commands app init --mode=job
and app init --mode=app
will be executed on the servers of groups job
and front
in parallel. At the end command app run
will be executed on the servers of group front
.
Running
Running is simple:
Define callback if you want to show steps of execution:
Each dot at the end of task lines means executing of the one action (upload, command) on the certain server. Mark E
is indicator of failed executing. Mark J
is indicator of json parsing error. Mark T
is indicator of executing timeout.
Result processing
You can get the execution review or detail information about each task execution.
Display report:
Detail information about each task:
Each element in arrays returned by $dplr->getFailed()
and $dplr->getReports()
is instance of Dplr\TaskReport
and has methods:
isSuccessful()
- task executing is successfulgetHost()
- server where task executedgetTask()
- information about task (instance ofDplr\Task
)getOutput()
- output of taskgetErrorOutput()
- output of error task
Tests
Execute the commands below to run the tests.
All versions of dplr with dependencies
ext-json Version *