mauchede / rancher-api-bundle
Rancher API Bundle for the Symfony Framework
Requires
- php: >=5.5
- mauchede/rancher-api: 1.0.x-dev
- symfony/framework-bundle: ^2.7
Requires (Dev)
- phpunit/phpunit: ~4
This package is not auto-updated.
Last update: 2020-10-23 05:47:58 UTC
README
Rancher API Bundle for the Symfony Framework.
⚠️ This project is no longer maintained. ⚠️
## Installation
- Install Rancher API Bundle via composer:
composer require mauchede/rancher-api
- Enable the bundle in
AppKernel
:
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Mauchede\RancherApiBundle\MauchedeRancherApiBundle(), // ... ); // ... } // ... }
- Configure the projects in
config.yml
:
rancher_api: projects: project_A: endpoint: #... access_key: #... secret_key: #... project_B: endpoint: #... access_key: #... secret_key: #...
Note: endpoint
and the API Keys (access_key
and secret_key
) can be found in Rancher settings ([Rancher URL]/settings/api
).
Project name (here project_A
and project_B
) does not match with the Rancher's project/environment: you are free to choose the best name.
Usage
The Bundle will create a service rancher_api.projects.[project_name]
. This service will be an instance of Mauchede\RancherApi\Resource\Project
.
With the example of configuration, two services will be created:
rancher_api.projects.project_A
rancher_api.projects.project_B
.
You can inject these services to another service or to use them in yours controllers.