{"id":13878805,"url":"https://github.com/itamae-kitchen/mitamae","last_synced_at":"2025-05-16T00:00:28.279Z","repository":{"id":10237172,"uuid":"65066008","full_name":"itamae-kitchen/mitamae","owner":"itamae-kitchen","description":"mitamae is a fast, simple, and single-binary configuration management tool with a DSL like Chef","archived":false,"fork":false,"pushed_at":"2025-04-28T16:00:16.000Z","size":766,"stargazers_count":371,"open_issues_count":0,"forks_count":36,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-14T08:13:11.821Z","etag":null,"topics":["infrastructure-as-code","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itamae-kitchen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"k0kubun"}},"created_at":"2016-08-06T05:05:11.000Z","updated_at":"2025-05-13T15:40:21.000Z","dependencies_parsed_at":"2023-01-11T20:14:21.759Z","dependency_job_id":"888a8a82-39fe-4161-9745-bbe3a3a20d93","html_url":"https://github.com/itamae-kitchen/mitamae","commit_stats":{"total_commits":714,"total_committers":23,"mean_commits":"31.043478260869566","dds":0.2324929971988795,"last_synced_commit":"94720d5becb511aa9ef94385be0c948fc5cf8c77"},"previous_names":[],"tags_count":119,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itamae-kitchen%2Fmitamae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itamae-kitchen%2Fmitamae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itamae-kitchen%2Fmitamae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itamae-kitchen%2Fmitamae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itamae-kitchen","download_url":"https://codeload.github.com/itamae-kitchen/mitamae/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infrastructure-as-code","ruby"],"created_at":"2024-08-06T08:02:00.586Z","updated_at":"2025-05-16T00:00:28.143Z","avatar_url":"https://github.com/itamae-kitchen.png","language":"Ruby","funding_links":["https://github.com/sponsors/k0kubun"],"categories":["Ruby"],"sub_categories":[],"readme":"# :sushi: mitamae [![Latest Version](https://img.shields.io/github/v/release/itamae-kitchen/mitamae)](https://github.com/itamae-kitchen/mitamae/releases) [![Build Status](https://github.com/itamae-kitchen/mitamae/workflows/build/badge.svg?branch=master)](https://github.com/itamae-kitchen/mitamae/actions?query=workflow%3Abuild)\n\nmitamae is a tool to automate configuration management using a Chef-like DSL powered by mruby.\n\nIt's been used for provisioning servers, e.g. [RubyCI servers](https://github.com/ruby/ruby-infra-recipe)\nand [Ruby's git server](https://github.com/ruby/git.ruby-lang.org), and setting up local environments\nwith [dotfiles](https://github.com/search?q=dotfiles+mitamae\u0026type=code).\n\n### Key Features\n\n* **Fast** -\n  mitamae is optimized for local execution. It uses C functions via mruby libraries for core operations where possible,\n  instead of executing commands on a shell or over a SSH connection like other tools, which is very slow.\n\n* **Simple** -\n  Running mitamae doesn't require Chef Server, Berkshelf, Data Bags, or even RubyGems.\n  The mitamae core provides only essential features. You can quickly be a master of mitamae.\n\n* **Single Binary** -\n  mitamae can be deployed by just transferring a single binary to servers.\n  You don't need to rely on slow operations over a SSH connection to workaround deployment problems.\n\n## Installation\n\nDownload a binary for your platform from [GitHub Releases](https://github.com/itamae-kitchen/mitamae/releases).\n\n```bash\ncurl -L https://github.com/itamae-kitchen/mitamae/releases/latest/download/mitamae-x86_64-linux.tar.gz \\\n  | tar xvz\n./mitamae-x86_64-linux help\n```\n\n## Getting Started\n\nCreate a recipe file as `recipe.rb`:\n\n```rb\npackage 'nginx' do\n  action :install\nend\n\nservice 'nginx' do\n  action [:enable, :start]\nend\n```\n\nAnd then execute `mitamae local` command to apply a recipe to a local machine.\n\n```diff\n$ mv mitamae-x86_64-linux mitamae\n$ ./mitamae local recipe.rb\n INFO : Starting mitamae...\n INFO : Recipe: /home/user/recipe.rb\n INFO :   package[nginx] installed will change from 'false' to 'true'\n INFO :   service[nginx] enabled will change from 'false' to 'true'\n INFO :   service[nginx] running will change from 'false' to 'true'\n```\n\nSee `mitamae help local` for available options. `--log-level=debug` is helpful to inspect what's executed in detail.\n\n## Documentation\n\nmitamae was built as an alternative implementation of [Itamae](https://github.com/itamae-kitchen/itamae).\nTherefore you may refer to resources related to Itamae for mitamae as well.\n\n### How to write recipes\n\nPlease refer to [Itamae wiki](https://github.com/itamae-kitchen/itamae/wiki):\n\n* [Resources](https://github.com/itamae-kitchen/itamae/wiki/Resources)\n  - [directory resource](https://github.com/itamae-kitchen/itamae/wiki/directory-resource)\n  - [execute resource](https://github.com/itamae-kitchen/itamae/wiki/execute-resource)\n  - [file resource](https://github.com/itamae-kitchen/itamae/wiki/file-resource)\n  - [gem\\_package resource](https://github.com/itamae-kitchen/itamae/wiki/gem_package-resource)\n  - [git resource](https://github.com/itamae-kitchen/itamae/wiki/git-resource)\n  - [group resource](https://github.com/itamae-kitchen/itamae/wiki/group-resource)\n  - [http\\_request resource](https://github.com/itamae-kitchen/itamae/wiki/http_request-resource)\n  - [link resource](https://github.com/itamae-kitchen/itamae/wiki/link-resource)\n  - [local\\_ruby\\_block resource](https://github.com/itamae-kitchen/itamae/wiki/local_ruby_block-resource)\n  - [package resource](https://github.com/itamae-kitchen/itamae/wiki/package-resource)\n  - [remote\\_directory resource](https://github.com/itamae-kitchen/itamae/wiki/remote_directory-resource)\n  - [remote\\_file resource](https://github.com/itamae-kitchen/itamae/wiki/remote_file-resource)\n  - [service resource](https://github.com/itamae-kitchen/itamae/wiki/service-resource)\n  - [template resource](https://github.com/itamae-kitchen/itamae/wiki/template-resource)\n  - [user resource](https://github.com/itamae-kitchen/itamae/wiki/user-resource)\n* [Definitions](https://github.com/itamae-kitchen/itamae/wiki/Definitions)\n* [Including Recipes](https://github.com/itamae-kitchen/itamae/wiki/Including-Recipes)\n* [Node Attributes](https://github.com/itamae-kitchen/itamae/wiki/Node-Attributes)\n* [run\\_command](https://github.com/itamae-kitchen/itamae/wiki/run_command)\n* [Host Inventory](https://serverspec.org/host_inventory.html)\n\n#### mitamae's original features\n\nThey should be ported to Itamae at some point.\n\n* `not_if` / `only_if` can take a block instead of a command\n* `file`, `remote_file`, and `template` resources have `atomic_update` attribute\n* `run_command` streams log output with `--log-level debug` or `log_output: true` option.\n\n### Plugins\n\nPlease see [PLUGINS.md](./PLUGINS.md) for how to install or create plugins for mitamae.\n\nFind [mitamae plugins](https://github.com/search?q=mitamae-plugin) and\n[Itamae plugins supporting mitamae](https://github.com/search?q=itamae-plugin+mitamae) on GitHub.\n\n### mruby features\n\nThe DSL is based on mruby instead of standard Ruby unlike Chef and Itamae.\nYou may use the following mruby features in mitamae recipes.\n\n* [mruby's built-in features](http://mruby.org/docs/api/)\n  * Some features may not be available if not specified or used by\n    [mrbgem.rake dependencies](https://github.com/itamae-kitchen/mitamae/blob/master/mrbgem.rake).\n  * Check [`MRUBY_VERSION`](https://github.com/itamae-kitchen/mitamae/blob/master/Rakefile) used by mitamae\n    and Latest News on [mruby.org](http://mruby.org/).\n* [mruby-at\\_exit](https://github.com/ksss/mruby-at_exit)\n* [mruby-dir-glob](https://github.com/gromnitsky/mruby-dir-glob)\n* [mruby-dir](https://github.com/iij/mruby-dir)\n* [mruby-env](https://github.com/iij/mruby-env)\n* [mruby-erb](https://github.com/k0kubun/mruby-erb)\n* [mruby-etc](https://github.com/eagletmt/mruby-etc)\n* [mruby-file-stat](https://github.com/ksss/mruby-file-stat)\n* [mruby-hashie](https://github.com/k0kubun/mruby-hashie)\n* [mruby-json](https://github.com/mattn/mruby-json)\n* [mruby-open3](https://github.com/k0kubun/mruby-open3)\n* [mruby-shellwords](https://github.com/k0kubun/mruby-shellwords)\n* [mruby-tempfile](https://github.com/iij/mruby-tempfile)\n* [mruby-uri](https://github.com/zzak/mruby-uri)\n* [mruby-yaml](https://github.com/mrbgems/mruby-yaml)\n\n### Supported platforms\n\n* See [Releases](https://github.com/itamae-kitchen/mitamae/releases) for supported architectures.\n* All [operating systems supported by Serverspec](https://serverspec.org/tutorial.html#multi_os_support)\n  are supported since they share their underlying library, [Specinfra](https://github.com/mizzy/specinfra).\n  * See [CHANGELOG](./CHANGELOG.md) or [mruby-specinfra](https://github.com/itamae-kitchen/mruby-specinfra) to find what Specinfra version is used.\n\n### Running mitamae on servers\n\nWhen you want to use mitamae on remote servers, you need to distribute a mitamae binary\nand recipes to the servers and run them remotely. There are at least the following ways to do it:\n\n* **rsync and ssh** -\n  It's handy to send them using `rsync` and run them using `ssh` when you apply recipes to a few servers.\n  [hocho](https://github.com/sorah/hocho) is a convenient tool to do this. While it's over a SSH connection,\n  it's much faster than other tools which establish a SSH connection for each operation like `itamae ssh`.\n* **deployment tool** -\n  A more scalable way is to install an agent to each server and notify the agents to fetch mitamae\n  and recipes from an object storage and run them.\n  Deployment tools like [AWS CodeDeploy](https://aws.amazon.com/codedeploy/) are useful to achieve them.\n\n### Example recipes\n\nThe following recipes are open-source usages of mitamae.\n\n* [ruby/ruby-infra-recipe](https://github.com/ruby/ruby-infra-recipe)\n* [ruby/git.ruby-lang.org](https://github.com/ruby/git.ruby-lang.org)\n* [k0kubun/dotfiles](https://github.com/k0kubun/dotfiles)\n\n### Migrating from Chef\n\nWhile the DSL is inspired by Chef, there are some differences you need to keep in mind\nwhen you migrate Chef recipes to mitamae recipes.\n\n| Chef | mitamae |\n|:-----|:--------|\n| `cookbook_file` | Use `remote_file` or `template`, specifying a path with `source`. |\n| `directory`'s `recursive true` | `directory` is `recursive true` by default |\n| `ruby_block` | Use `local_ruby_block`. |\n| `shell_out!` | Use `run_command`. `Open3.capture3` or `system` might suffice too. |\n| `Chef::Log.*` | `MItamae.logger.*` |\n| `Digest::*.hexdigest` | Use `*sum` command (e.g. `sha1sum`) as a workaround. |\n| `bash` | Just use `execute` or specify `bash -c ...` with it. \u003cbr\u003e mitamae's `--shell=/bin/bash` might also help. |\n| `cron` | You may use [mitamae-plugin-resource-cron](https://github.com/k0kubun/mitamae-plugin-resource-cron). |\n| `deploy_revision` | You may use [mitamae-plugin-resource-deploy\\_revision](https://github.com/k0kubun/mitamae-plugin-resource-deploy_revision). \u003cbr\u003e See also: [mitamae-plugin-resource-deploy\\_directory](https://github.com/k0kubun/mitamae-plugin-resource-deploy_directory)|\n| `runit_service` | You may use [mitamae-plugin-resource-runit\\_service](https://github.com/k0kubun/mitamae-plugin-resource-runit_service). |\n\n### Change Log\n\nSee [CHANGELOG.md](./CHANGELOG.md).\n\n## Contributing\n\nWhen you develop your local changes, you can write an integration test under [`spec/`](./spec) and run it like:\n\n```\nbundle install\nbundle exec rake test:integration\n```\n\nThis requires Docker on your local environment.\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitamae-kitchen%2Fmitamae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitamae-kitchen%2Fmitamae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitamae-kitchen%2Fmitamae/lists"}