2017 © Pedro Peláez
 

library rancher-api

Rancher API client

image

cobak78/rancher-api

Rancher API client

  • Thursday, February 1, 2018
  • by cobak78
  • Repository
  • 1 Watchers
  • 2 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

rancher-api

Scrutinizer Code Quality, (*1)

Rancher api client with php7 and PSR7 specification, to execute bash actions on deployed containers, (*2)

Install via composer:

composer require cobak78/rancher-api

Docker

Rancher-api includes a base image with test dependencies installed in. Use docker-compose file to stand up a fpm container with the app code mounted., (*3)

Usage

Create an script to use api., (*4)


define('DOCUMENT_ROOT', dirname(__FILE__)); require_once DOCUMENT_ROOT . '/vendor/autoload.php'; use Dotenv\Dotenv; use Cobak78\RancherApi\Clients\HttpClient; use Cobak78\RancherApi\Clients\WSClient; use Cobak78\RancherApi\RancherApi; $dotenv = new Dotenv(DOCUMENT_ROOT); $dotenv->load(); $client = new HttpClient(); $wsClient = new WSClient(); $rancherApi = new RancherApi($client, $wsClient, $argv, $argc); $rancherApi->execute();

If you need to execute the same script on all deployed containers, modify script., (*5)

$rancherApi->execute(true);

this api expects at least three arguments: 1. project name 2. container name 3. command to execute 4. command parameters [optional], (*6)

php execute.php project-api fpm bin/console c:c
What it does

Rancher api, look for projects, service and containers deployed on rancher. If the connection need a web socket to execute bash action, retrieve token from rancher and creates a connection. Then decode and show the response on console., (*7)

The Versions

01/02 2018

dev-master

9999999-dev http://github.com/cobak78/rancher-api

Rancher API client

  Sources   Download

proprietary GNU

The Requires

 

The Development Requires

api client rancher

23/03 2017

dev-develop

dev-develop http://github.com/cobak78/rancher-api

Rancher API client

  Sources   Download

GNU

The Requires

 

The Development Requires

api client rancher

23/03 2017

v0.1.3

0.1.3.0 http://github.com/cobak78/rancher-api

Rancher API client

  Sources   Download

GNU

The Requires

 

The Development Requires

api client rancher

21/02 2017

v0.1.2

0.1.2.0 http://github.com/cobak78/rancher-api

Rancher API client

  Sources   Download

GNU

The Requires

 

The Development Requires

api client rancher

21/02 2017

v0.1.1

0.1.1.0 http://github.com/cobak78/rancher-api

Rancher API client

  Sources   Download

GNU

The Requires

 

The Development Requires

api client rancher

21/02 2017

v0.1

0.1.0.0 http://github.com/Cobak78/rancher-api

Rancher API client

  Sources   Download

GNU

The Requires

 

The Development Requires

api client rancher