Giter VIP home page Giter VIP logo

idephix's Introduction

Idephix - Automation and Deploy tool

Idephix is a PHP tool useful to create automation scripts

Installation / Usage

  1. Download the idephix.phar executable.

    $ curl https://github.com/ideatosrl/Idephix/blob/master/bin/idephix.phar?raw=true >idephix.phar
  2. 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();
  3. 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.

  1. Change into a directory in your path like cd /usr/local/bin
  2. Get Idephix curl https://github.com/ideatosrl/Idephix/blob/master/bin/idephix.phar?raw=true >idephix.phar
  3. Make the phar executable chmod a+x idephix.phar
  4. Change into a project directory cd /path/to/my/project
  5. Define your tasks in idxfile.php
  6. Use idephix as you normally would idephix.phar
  7. 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

idephix's People

Contributors

fullo avatar kea avatar micheleorselli avatar p16 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.