GithubHelp home page GithubHelp logo

shuujii / mitamae Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itamae-kitchen/mitamae

0.0 0.0 0.0 510 KB

Configuration management tool embedding mruby, which is alternative implementation of Itamae

License: Other

Ruby 97.81% HTML 0.62% C 0.61% Dockerfile 0.96%

mitamae's Introduction

mitamae Build Status

Itamae implementation that is runnable without Ruby, which is a lightweight configuration management tool inspired by Chef. With mitamae's standalone binary, you can write a configuration recipe in Ruby and apply it without Ruby.

Status

All features are implemented and tested.

Synopsis

Like original Itamae, you can manage configuration by Ruby DSL. But mitamae does not require MRI to run.

# cat recipe.rb
include_recipe 'included'

directory '/tmp/etc'

file '/tmp/etc/hello' do
  content 'This is mitamae'
end

template '/tmp/etc/config.yml' do
  source 'config.yml.erb'
end
# cat included.rb
define :vim, options: '--with-lua --with-luajit' do
  package 'vim' do
    version params[:name]
    options params[:options]
  end
end

vim '7.4.1910-1'

service 'mysqld' do
  action [:start, :enable]
end
# wget https://github.com/k0kubun/mitamae/releases/download/v0.4.0/mitamae-x86_64-linux
# chmod +x ./mitamae-x86_64-linux
# ./mitamae-x86_64-linux local -j node.json recipe.rb
 INFO : Starting mitamae...
 INFO : Recipe: /home/k0kubun/mitamae/recipe.rb
 INFO :   Recipe: /home/k0kubun/mitamae/included.rb
 INFO :     service[mysqld] running will change from 'false' to 'true'
 INFO :     service[mysqld] enabled will change from 'false' to 'true'
 INFO :   file[/tmp/etc/hello] exist will change from 'false' to 'true'
 INFO :   diff:
 INFO :   --- /dev/null 2016-07-23 16:06:36.583327464 +0900
 INFO :   +++ /tmp/1470446745.956       2016-08-06 10:25:45.967255508 +0900
 INFO :   @@ -0,0 +1 @@
 INFO :   +This is mitamae

How to write recipes

See Itamae's reference.

Plugins are implemented differently. See PLUGINS.md for details.

Supported features

itamae ssh is omitted by design because it's slow. If you want to provision a server, download mitamae binary, transfer recipes and execute it over ssh. For that reason, mitamae is more suitable for development environment bootstrap.

In recipes, you can use the features listed below.

  • Common Attributes
    • user
    • cwd
    • only_if
    • not_if
    • notifies
    • subscribes
    • verify
  • Resources
    • execute resource
    • package resource
    • directory resource
    • git resource
    • file resource
    • remote_file resource
    • template resource
    • link resource
    • service resource
    • gem_package resource
    • user resource
    • group resource
    • remote_directory resource
    • http_request resource
    • local_ruby_block resource
  • Definitions
  • Including Recipes
  • Node Attributes
  • run_command
  • Plugins
  • Host Inventory

Supported platforms

Currently following platforms are supported but others can be easily supported by porting specinfra modules.

  • Alpine Linux
  • Amazon Linux
  • Arch Linux
  • CentOS
  • Debian
  • Gentoo
  • Ubuntu
  • macOS
  • ...etc

Contributing

Development

$ rake compile && ./mruby/bin/mitamae local recipe.rb

# If you add mrbgem to mrbgem.rake, execute:
$ rake clean

Testing

# Run integration tests on Docker
$ bundle exec rspec

Cross compile

# Compile and copy binaries to ./mitamae-build
$ rake release:build

Release

$ git commit -m "Version vX.X.X"
$ git tag vX.X.X
$ git push origin --tags # released here
$ git push origin master

Notes

Thanks to the original implementation https://github.com/itamae-kitchen/itamae.
And this tools is built as the next generation of itamae-go https://github.com/k0kubun/itamae-go.

Author

Takashi Kokubun

mitamae's People

Contributors

civitaspo avatar dependabot[bot] avatar eagletmt avatar gfx avatar hanazuki avatar hatappi avatar k0kubun avatar makimoto avatar nonylene avatar take-cheeze avatar takumin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.