Idephix - Automation and Deploy tool
Idephix is a PHP tool useful to create automation scripts
Installation / Usage
-
Download the
idephix.phar
executable.$ curl https://github.com/ideatosrl/Idephix/blob/master/bin/idephix.phar?raw=true >idephix.phar
-
Create a idxfile.php in the root directory of you project. Define your tasks.
<?php use Idephix\Idephix; use Idephix\SSH\SshClient; $targets = array( 'test' => array( 'hosts' => array('127.0.0.1'), 'local_base_folder' => __DIR__, 'remote_base_folder' => "/tmp/my-project.idephix/", 'ssh_params' => array('user' => 'kea') ), ); $idx = new Idephix(new SshClient(), $targets); $idx-> /** * Execute the touch of a file specified in input * @param string $name the name of the file to be touch-ed * @param bool $go if not specified the script execute a dry-run */ add('idephix:test-params', function ($name, $go = false) use ($idx) { $idx->local('touch /tmp/'.$name); $idx->remote('touch /tmp/'.$name.'_remote'); }); $idx->run();
-
Run Idephix:
php idephix.phar --env=test idephix:test-params Nome_file
Global installation of Idephix
You can chose to install idephix where you prefer. Idephix will use the configuration file in the corrent path.
- Change into a directory in your path like
cd /usr/local/bin
- Get Idephix
curl https://github.com/ideatosrl/Idephix/blob/master/bin/idephix.phar?raw=true >idephix.phar
- Make the phar executable
chmod a+x idephix.phar
- Change into a project directory
cd /path/to/my/project
- Define your tasks in idxfile.php
- Use idephix as you normally would
idephix.phar
- Optionally you can rename the idephix.phar to idx to make it easier
Requirements
PHP 5.3.2 or above, at least 5.3.12 recommended
Authors
Manuel 'Kea' Baldssarri [email protected] Michele 'Orso' Orselli [email protected] Filippo De Santis [email protected]
License
Idephix is licensed under the MIT License - see the LICENSE file for details