We’re excited to announce the release of Chef Workstation, providing everything you need to get started with Chef with a simple one-click installation.
Ad-Hoc Configuration Management with chef-run
Chef Workstation comes with the new
chef-run utility, which can be used to execute chef code on any remote system accessible via SSH or WinRM. This provides a quick way to apply config changes to the systems you manage whether or not they’re being actively managed by Chef, without requiring any pre-installed software. With
chef-run, you can execute individual resources, or pre-existing Chef recipes on any number of servers with a single, simple command.
In the simple example above, we see
chef-run used in tandem with InSpec, Chef’s compliance automation framework. First, InSpec is checking to see whether our host is configured with the
ntp package installed, which is responsible for ensuring server clocks are kept in sync. Since our InSpec profile is reporting a failure, we then use
chef-run to install ntp using Chef’s
package resource, like so:
chef-run -i ~/path/to/sshkey user@host package ntp action=install
Finally, we re-run the previously failing InSpec profile for immediate validation that our update was successfully applied.
NOTE: The inspec exec command in the above example is executing a local InSpec profile to evaluate whether NTP is installed. To learn more about creating InSpec profiles, check out the Compliance Automation track in Learn Chef Rally.
Robust Testing & Development Tools
Chef Workstation also includes everything already packaged within the ChefDK. Development tools for testing, dependency resolution, and cookbook generation are all included alongside chef-run, ensuring that whether you’re consuming existing chef policies, or creating your own, you have everything you need to get up and running quickly.