All Idephix configurations are defined within the
By default Idephix will look for a file named
idxrc.php in the root
directory of your project, but you can store it wherever you want and
name it whatever you want. If you want to use a custom configuration file
you need to specify id by using
-c option with Idephix CLI.
The file must return an array of configurations. Idephix uses 3 main configuration elements:
None of them are mandatory, you’ll need environments (at least one) and ssh_client only to execute remote tasks and extensions only if you want to register some extension.
This example of
idxrc.php file will give you and idea of how define environments, ssh clients
<?php $environments = array( 'prod' => array( 'hosts' => array('127.0.0.1', '126.96.36.199'), 'ssh_params' => array( 'user' => 'ideato' ), ), 'stage' => array( 'hosts' => array('192.168.169.170'), 'ssh_params' => array( 'user' => 'ideato' ), ), 'test' => array( 'hosts' => array('127.0.0.1'), 'ssh_params' => array('user' => 'kea'), ), ); return array( 'envs' => $environments, 'ssh_client' => new \Idephix\SSH\SshClient(), 'extensions' => array(), );
Idephix use ssh-agent to authenticate to remote computers without password.
Otherwise you can specify the password in your script or use
(instead of the default
PeclSsh2Proxy) that ask you the password.
Once you have defined several environments you can specify which one you want to run
your remote task against, using
--env CLI option.