CHAKE(1)
CHAKE(1) β straight outta the General Commands Manual π
β¨ NAME β¨
chake β serverless configuration management tool π
πΈ SYNOPSIS πΈ
chake init
chake [rake arguments]
π DESCRIPTION π
okay so bestie, here's the vibe: chake is the tool that lets you manage a whole squad of hosts without a central server. no puppetmaster, no fancy infra, none of that. your config lives in a local directory β and like, it should be under version control with git(1) or literally any other VCS (the manpage says "should (but doesn't need to)", and honestly? lowkey true, do it anyway π«Ά).
Config gets deployed to your managed hosts remotely, and there's two ways that goes down: either you invoke a config management tool that itself connects to the hosts, or you first upload the config you need and then run a tool remotely on the hosts. either way, chef's kiss π
π SUPPORTED CONFIGURATION MANAGERS π
chake rolls with these config management tools:
- itamae</> β config gets applied by running the
itamaecommand line tool on the management host; nothing needs to be uploaded to the managed hosts at all. Seechake-itamae(7)for the details π - shell</> β the local repository is copied to the host, and the shell commands you specified in the node configuration get executed from the directory where that copy lives. See
chake-shell(7)π - chef</> β the local repository is copied to the host, and
chef-solois executed remotely on the managed host. Seechake-chef(7)π©βπ³
and beyond just applying config management recipes onto hosts, chake also hands you a whole little toolkit for multi-host life: listing nodes, running commands against all of them at once, logging into interactive shells, etc etc. it's giving full toolbox energy β¨
π CREATING THE REPOSITORY π
$ chake init[:configmanager]
This is gonna make you an initial directory structure, slay. A few of the files are specific to whichever configmanager you picked, and that can be one of [SUPPORTED CONFIGURATION MANAGERS]. But these files right here? They're common to any usage of chake:
nodes.yamlβ this is where you list the hosts you're gonna be managing, plus what recipes to apply to each one πnodes.dβ a directory that can hold multiple files in the same format asnodes.yaml. Every file in it matching*.yamlgets added to the list of nodes ποΈRakefileβ contains just therequire 'chake'line. You can absolutely augment it with other tasks specific to your infrastructure, go off π
If you leave out configmanager, then itamae gets used by default, no cap.
And once the repository is created? You can call either chake or rake, because they are completely equivalent. pick your fighter π
π¦ MANAGING NODES π¦
Right after you create your repository, the contents of nodes.yaml look like this:
host1.mycompany.com:
itamae:
- roles/basic.rb
The exact contents depend on which configuration management tool you chose, iykyk.
You can list your hosts with rake nodes:
$ rake nodes
host1.mycompany.com ssh
Wanna add more nodes? Just append to nodes.yaml:
host1.mycompany.com:
itamae:
- roles/basic.rb
host2.mycompany.com:
itamae:
- roles/basic.rb
and boom, chake now knows about your new node:
$ rake nodes
host1.mycompany.com ssh
host2.mycompany.com ssh
look at them. two little icons. so cute π₯Ή
πΈ PREPARINGS NODES TO BE MANAGED πΈ
Nodes have, like, very few initial requirements to be manageable by chake:
- the node must be accessible via SSH π
- the user you connect to the node as must either be
root, or be allowed to runsudo(and in that case,sudomust be installed)
a note on password prompts π« β every time chake calls ssh on a node, you may be required to type in your password; every time chake calls sudo on the node, you may be required to type in your password too. For one or two nodes this is probably fine, but for larger numbers of nodes it is not practical. To dodge the password prompts entirely, you can:
- Configure SSH key-based authentication. This is more secure than using passwords. While you're at it, you also probably want to disable password authentication completely and only allow key-based authentication π
- Configure passwordless
sudoaccess for the user you use to connect to your nodes π
β CHECKING CONNECTIVITY AND INITIAL HOST SETUP β
To check whether your hosts are correctly configured, use the check task:
$ rake check
That runs the true command as root on each host (using sudo is necessary, bestie, that's the whole point). If it passes without you having to type any passwords, it means:
- you have SSH access to each host; and
- the user you're connecting as is
root, or has password-lesssudocorrectly set up β
vibe check: passed π
π₯ APPLYING CONFIGURATION π₯
heads up: by default, all tasks that apply to all hosts will run in parallel, using rake's support for multitasks. If for some reason you need to prevent that, you can pass -j1 (or --jobs=1) in the rake invocation.
Also note that by default rake will only run N+4 tasks in parallel, where N is the number of cores on the machine you're running it on. If you have more than N+4 hosts and you want all of them handled in parallel, you might want to pass -j (or --jobs), without any number, as the last argument; with that, rake will have no limit on the number of tasks to perform in parallel. go wild π
To apply the configuration to all nodes, run:
$ rake converge
To apply the configuration to a single node, run:
$ rake converge:$NODE
To preview the changes that would have been made when converge is run, you can issue the preview command:
$ rake preview
To preview the changes that would have been done to a single node, run:
$ rake preview:$NODE
To apply a single recipe on all nodes, run:
$ rake apply[myrecipe]
What "recipe" even is depends on your configuration manager π€·
To apply a single recipe on a specific node, run:
$ rake apply:$NODE[myrecipe]
If you don't inform a recipe in the command line, you'll be prompted for one π
To run a shell command on all nodes, run:
$ rake run
The above will prompt you for a command, then execute it on all nodes.
To pass the command to run straight in the command line, use this syntax:
$ rake run[command]
If the command you want to run contains spaces, or other characters that are special to the shell, you gotta quote them. For example:
$ rake run["cat /etc/hostname"]
To run a shell command on a specific node, run:
$ rake run:$NODE[command]
Same deal as before β if you run just rake run:$NODE, you'll be prompted for the command.
To list all existing tasks, run:
$ rake -T
π WRITING CONFIGURATION MANAGEMENT CODE π
Since chake supports different configuration management tools, the specifics of config management code depend on the tool you choose. See the corresponding documentation π (it's all in the chake-*(7) pages, bestie)
π§ THE NODE BOOTSTRAPPING PROCESS π§
Some of the configuration management tools need some software installed on the managed hosts. When that's the case, the first time chake acts on a node, it has to bootstrap it. The bootstrapping process includes doing the following:
- installing and configuring the needed software π¦
- setting up the hostname π·οΈ
π NODE URLS π
The keys in the hash that's represented in nodes.yaml are node URLs. All components of the URL except the hostname are optional, so just listing hostnames is the simplest possible form of specifying your nodes. Here are all the components of the node URLs:
[connection://][username@]hostname[:port][/path]
connectionβ what to use to connect to the host.sshorlocal(default:ssh) πusernameβ the user name to connect with (default: the username on your local workstation) πhostnameβ the hostname to connect to (default: none) πportβ the port number to connect to (default:22) πͺ/pathβ where to store the cookbooks at the node (default:/var/tmp/chef.$USERNAME) π
β¨ EXTRA FEATURES β¨
πͺ HOOKS
okay so you can define rake tasks that run before bootstrapping nodes, before uploading config-management content to nodes, and before converging. all you gotta do is beef up the matching tasks, bestie:
bootstrap_commonβ runs before bootstrapping nodes (yep, even if those nodes have already been bootstrapped π )upload_commonβ runs before uploading content to the nodeconverge_commonβ runs before converging (aka before running chef)connect_commonβ runs before doing any action that connects to any of the hosts. like, say you wanna generate an ssh config file based on what's in your node definition files? this is the hook for that π«Άconnect:HOSTNAMEβ runs before doing any action that connects to HOSTNAME specifically
Example, because seeing it hits different:
task :bootstrap_common do
sh './scripts/pre-bootstrap-checks'
end
π ENCRYPTED FILES
chake supports encrypted files matching either *.gpg or *.asc β¨. there are two ways of specifying per-host encrypted files:
- list them in the
encryptedattribute in the node configuration file. example:
host1.mycompany.com:
itamae:
- roles/basic.rb
encrypted:
- foo.txt.asc
- (deprecated π«£) any files matching
**/files/{default,host-#{node}}/*.{asc,gpg}and**/files/*.{asc,gpg}, ifencryptedis not defined in the node configuration.
they get decrypted with GnuPG before being sent to the node (for the config management tools that require files to be sent), and they arrive without the *.asc or *.gpg extension. so yes, you can stash passwords and other sensitive stuff (SSL keys, etc) in the repo right alongside the rest of your config. iconic behavior honestly π₯
for configuration managers that don't require uploading files to the managed node, this decryption happens right before converging or applying single recipes β and the decrypted files get wiped right after that. gone. poof. π
if you use this feature, make sure you have thewipeprogram installed! that waychakecan delete the decrypted files in a slightly more secure way once it's done with them. no cap, installwipe. π§
π REPOSITORY-LOCAL SSH CONFIGURATION
need special SSH configuration parameters? just drop a file called .ssh_config (or whatever name you put in the $CHAKE_SSH_CONFIG environment variable, details below π) at the root of your repository, and chake will use it when calling ssh. slay.
πͺ LOGGING IN TO A HOST
to easily login to one of your hosts, just run rake login:$HOSTNAME. this automatically uses the repository-local SSH configuration from above, so you don't have to type -F .ssh_config every single time. the way that saves your wrists?? obsessed ππ
π οΈ RUNNING ALL SSH INVOCATIONS WITH SOME PREFIX COMMAND
sometimes you'll want or need to prefix your SSH invocations with some prefix command, like to tunnel it through a central exit node. set $CHAKE_SSH_PREFIX in your environment. example:
CHAKE_SSH_PREFIX=tsocks rake converge
the above makes all SSH invocations to all hosts be called as tsocks ssh [...]. periodt.
π» CONVERGING LOCAL HOST
wanna manage your own local workstation with chake? declare a local node using the "local" connection type, like this (in nodes.yaml):
local://thunderbolt:
itamae:
- role/workstation.rb
to apply the configuration to the local host, use the conventional rake converge:thunderbolt, or the special target rake local. whatever vibes β¨
when converging all nodes, chake will skip nodes declared with the local:// connection whose hostname does not match the hostname in the declaration. for example:
local://desktop:
itamae:
- role/workstation.rb
local://laptop:
itamae:
- role/workstation.rb
when you run rake converge on desktop, laptop gets skipped β and vice-versa. main character energy, one machine at a time π
π ACCESSING NODE DATA FROM YOUR OWN TASKS
it's often useful to run arbitrary commands against the data you have about nodes. Chake.nodes is right there for you, bestie. for example, if you wanna geolocate each of your hosts:
task :geolocate do
Chake.nodes.each do |node|
puts "#{node.hostname}: %s" % `geoiplookup #{node.hostname}`.strip
end
end
π ENVIRONMENT VARIABLES π
$CHAKE_SSH_CONFIGβ local SSH configuration file. defaults to.ssh_config.$CHAKE_SSH_PREFIXβ command to prefix SSH (and rsync over SSH) calls with.$CHAKE_RSYNC_OPTIONSβ extra options to pass torsync. useful to, like, exclude large files from being uploaded to each server π$CHAKE_NODESβ file containing the list of servers to be managed. default:nodes.yaml.$CHAKE_NODES_Dβ directory containing node definition files for servers to be managed. default:nodes.d.$CHAKE_TMPDIRβ directory used to store temporary cache files. default:tmp/chake.$CHAKE_CHEF_CONFIGβ Chef configuration file, relative to the root of the repository. default:config.rb.
π SEE ALSO π
rake(1)chake-itamae(7),https://itamae.kitchen/chake-shell(7)chake-chef(7),chef-solo(1),https://docs.chef.io/
and that's the whole page, bestie π this was the CHAKE(1) manual, dated August 2026 β go forth and converge responsibly π¦β¨π
π¦ where this page comes from
- ubuntu stonking: chake 0.93.2-1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms