2017 © Pedro Peláez
 

library grizzwald

A client library to interact with the CoreOS fleet API

image

xenolope/grizzwald

A client library to interact with the CoreOS fleet API

  • Tuesday, August 11, 2015
  • by jonjomckay
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Grizzwald

"Grizz was in the Navy" - Tracy Jordan, 30 Rock (S01E01: The Aftermath), (*1)

Description

Grizzwald is a simple PHP library that interacts with the CoreOS fleet API, for easy management of your cluster's unit files., (*2)

Installation

The library can be installed with Composer, by including the following in your composer.json:, (*3)

{
    "require": {
        "xenolope/grizzwald": "~1.0"
    }
}

Usage

// Create a new instance of the client, passing in the base URL to your fleet instance
$client = new FleetClient('http://172.16.1.100:49153');

// Get a list of all the machines in the cluster
$machines = $client->listMachines(); // Returns an array of \Xenolope\Grizzwald\Entity\Machine objects

// Get a list of all the unit states in the cluster
$states = $client->listUnitStates(); // Returns an array of \Xenolope\Grizzwald\Entity\UnitState objects

// Get a list of all the units in the cluster
$units = $client->listUnits(); // Returns an array of \Xenolope\Grizzwald\Entity\Unit objects

// Get a single unit from the cluster
$unit = $client->getUnit('nginx.service'); // Returns a \Xenolope\Grizzwald\Entity\Unit object

// Create a new unit on the cluster
$unit = new Unit('nginx.service', [
    new UnitOption('Service', 'ExecStart', '/usr/sbin/nginx') // One or more UnitOptions are required 
], Unit::STATE_LAUNCHED);

$client->createUnit($unit);

// Modify an existing unit on the cluster
$unit = new Unit('nginx.service', Unit::STATE_LOADED);

$client->modifyUnit($unit);

// Destroy a unit on the cluster
$client->destroyUnit('nginx.service');

License

Grizzwald is released under the MIT License; please see LICENSE for more information., (*4)

The Versions

11/08 2015

dev-master

9999999-dev

A client library to interact with the CoreOS fleet API

  Sources   Download

MIT

The Requires

 

11/08 2015

1.0.0

1.0.0.0

A client library to interact with the CoreOS fleet API

  Sources   Download

MIT

The Requires