A PHP library that adds some functionality and support for knife-ec2.
The knife-ec2 integration depends on the knife-ec2 commands being available.
This package uses composer so you can just add traderinteractive/chef
as a dependency to your composer.json
file.
$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']);
Version 3.0 removed the class TraderInteractive\Chef\Chef. The interface was not compatible with PHP 7.