PHP code example of weesee / yii2-rancher

1. Go to this page and download the library: Download weesee/yii2-rancher library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

weesee / yii2-rancher example snippets


{
    ""weesee/yii2-rancher": "~1.0.0"
    }
}

use weesee\Rancher;

// Get Rancher stacks
$rancher = new RancherApi([
    'apiEndpointUrl' => '...',  // Rancher Endpoint (v2-beta)
    'apiUsername' => '...', // Rancher Access Key (Username)
    'apiPassword' => '...', // Rancher Secret Key (Password)
]);
// get system details as Yii2 model
$stacks = $rancher->getStacks();

Rancher.php
bash
$ php composer.phar update