haswalt / rancher-php
RancherPHP is PHP client library for interacting with the Rancher API
dev-master / 1.0.x-dev
2015-11-17 23:50 UTC
Requires
- php: >=5.3.9
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- pdepend/pdepend: ^2.2
- phpdocumentor/phpdocumentor: ^2.8
- phploc/phploc: ^2.1
- phpmd/phpmd: ^2.3
- phpunit/phpunit: ^5.0
- sebastian/phpcpd: ^2.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-12-21 18:24:53 UTC
README
RancherPHP is a PHP client for interacting with the Rancher API. Rancher's API provides a traversable tree or resources and RancherPHP exposes these in a simple interface.
$client = new Rancher\Client('http://localhost:9000/v1', 'key', 'secret'); $projects = $client->getProjects(); $services = $projects->first()->getServices();
Installing RancherPHP
The recommended way to install RancherPHP is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of RancherPHP:
composer.phar require haswalt/rancher-php
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
You can then later update RancherPHP using composer:
composer.phar update
TODO
- Implement more resource types
- Add tests
- Implement complex actions