A library that wraps jenssegers/php-chef and adds some functionality and support for knife-ec2.

v3.0.1 2023-05-01 14:33 UTC

This package is auto-updated.

Last update: 2024-11-30 01:59:19 UTC


README

Scrutinizer Code Quality

Latest Stable Version Latest Unstable Version License

Total Downloads Daily Downloads Monthly Downloads

A PHP library that adds some functionality and support for knife-ec2.

Requirements

The knife-ec2 integration depends on the knife-ec2 commands being available.

Installation

This package uses composer so you can just add traderinteractive/chef as a dependency to your composer.json file.

Usage

Chef API Wrapper

$chefEc2 = new TraderInteractive\Chef\ChefEc2(
    'bundle exec knife',
    $chefServer,
    [
        'chefClientName' => $chefClientName,
        'chefClientKey' => $chefClientKey,
        'awsAccessKeyId' => $awsId,
        'awsSecretAccessKey' => $awsSecret,
        'ec2SshUser' => $ec2SshUser,
        'ec2SshKey' => $sshKey,
    ]
);

$chefEc2->updateServers("role:{$roleToQuery}", null, [], ['--override-runlist' => "role[{$roleToExecute}]", '--no-color']);

Upgrading from old versions

Version 3.0 removed the class TraderInteractive\Chef\Chef. The interface was not compatible with PHP 7.