rocketpath / rancher-api
Interaction with Rancher API
dev-master / 1.0.x-dev
2020-01-03 11:46 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ^6.0
- jms/serializer: ^1.0
Requires (Dev)
- phpunit/phpunit: ~4
This package is auto-updated.
Last update: 2020-01-03 11:46:51 UTC
README
Rancher API is a set of PHP classes for interacting with Rancher.
## Installation
Rancher API can be installed via composer:
composer require Rocketpath/rancher-api
Note: To use the JMS annotation, you may have to configure your autoload
. You can find an example in bootstrap.php.dist.
Usage
use Rocketpath\RancherApi\Client\Client; use Rocketpath\RancherApi\Resource\Project; $client = new Client('access_key', 'secret_key'); $project = $client->get('endpoint', Project::class); $containers = $project->getContainers();
endpoint
and the API Keys (access_key
and secret_key
) can be found in Rancher settings ([Rancher URL]/settings/api
).
Note: API keys are only available for one project/environment.