Bundle of PHP classes to interact with Rancher (Container Management System) API.
RancherAPI uses compose to make installation easier.
Install via composer
composer require tyldar/rancher-api
RancherAPI is incredibly intuitive to use.
<?php
require 'vendor/autoload.php';
use Tyldar\Rancher\Rancher;
try
{
$rancher = new Rancher("RANCHERHOSTURL", "RANCHERACCESSKEY", "RANCHERSECRETKEY", "PROJECT");
echo json_encode($rancher->containers()->getAll());
}
catch(Exception $e)
{
var_dump($e->getResponse()->getBody()->getContents());
}
?>