itamae-go

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2016 License: MIT Imports: 4 Imported by: 0

README

itamae-go

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.

Status

Experimental. Internal architecture is poor and many features are omitted or not tested.

Synopsis

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'

Installation

You can download itamae-go binary from Releases for OSX and Linux.

Build
$ make

How to write recipes

See itamae's reference.

Supported features

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
Supported platforms
  • Arch Linux
  • Debian
  • OSX
  • Ubuntu

Contribution

  1. Fork (https://github.com/k0kubun/itamae-go/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Notes

Thanks to the original implementation.

https://github.com/itamae-kitchen/itamae

Author

Takashi Kokubun

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
dsl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL