mauchede/rancher-api-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Rancher API Bundle for the Symfony Framework

dev-master / 1.0.x-dev 2020-09-22 19:49 UTC

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. ⚠️

SensioLabsInsight

## 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.

Links