itamae-go is Go implementation of itamae embedding mruby, which is a lightweight configuration management tool inspired by Chef. You can write a configuration recipe in Ruby and apply it without Ruby.
Experimental. Internal architecture is poor and many features are omitted or not tested.
Instead of itamae-go, mitamae is actively maintained.
Like original itamae, you can manage configuration by Ruby DSL. But itamae-go does not require Ruby to run.
# cat recipe.rb
include_recipe 'included.rb'
directory '/tmp/etc'
3.times do |i|
file "/tmp/etc/#{i}"
end
template '/tmp/etc/config.yml' do
source 'config.yml.erb'
end
# cat included.rb
define :vim, options: '--with-lua --with-luajit' do
ver = params[:name]
opts = params[:options]
package 'vim' do
version ver
options opts
end
end
vim '7.4.1910-1'
service 'mysqld' do
action [:start, :enable]
end
# ./itamae-go local -j node.json recipe.rb
INFO : Starting itamae...
INFO : Recipe: recipe.rb
INFO : Recipe: included.rb
INFO : package[vim] executed will change from 'false' to 'true'
INFO : service[mysqld] executed will change from 'false' to 'true'
INFO : service[mysqld] executed will change from 'false' to 'true'
INFO : directory[/tmp/etc] executed will change from 'false' to 'true'
INFO : file[/tmp/etc/0] executed will change from 'false' to 'true'
INFO : file[/tmp/etc/1] executed will change from 'false' to 'true'
INFO : file[/tmp/etc/2] executed will change from 'false' to 'true'
INFO : file[/tmp/etc/config.yml] executed will change from 'false' to 'true'
You can download itamae-go binary from Releases for OSX and Linux.
$ make
See itamae's reference.
You can use only the features listed below.
- Resources
- execute resource
- package resource
- directory resource
- git resource
- file resource
- template resource
- link resource
- service resource
- user resource
- group resource
- remote_file resource
- remote_directory resource
- gem_package resource
- http_request resource
- local_ruby_block resource
- Definitions
- Including Recipes
- Node Attributes
- run_command
- Host Inventory
- Plugins
- Arch Linux
- Debian
- OSX
- Ubuntu
- Fork (https://github.com/k0kubun/itamae-go/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create a new Pull Request
Thanks to the original implementation. https://github.com/itamae-kitchen/itamae
There is another standalone implementation of itamae. https://github.com/k0kubun/mitamae