Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sorah/hocho
Hocho: Run Itamae easily with host inventory
https://github.com/sorah/hocho
hocho infrastructure-as-code itamae mitamae orchestration
Last synced: about 1 month ago
JSON representation
Hocho: Run Itamae easily with host inventory
- Host: GitHub
- URL: https://github.com/sorah/hocho
- Owner: sorah
- License: mit
- Created: 2016-01-17T17:09:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T11:06:27.000Z (9 months ago)
- Last Synced: 2024-12-01T10:27:51.350Z (2 months ago)
- Topics: hocho, infrastructure-as-code, itamae, mitamae, orchestration
- Language: Ruby
- Homepage:
- Size: 92.8 KB
- Stars: 38
- Watchers: 4
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Hocho: an itamae wrapper
Hocho is a wrapper of the provisioning tool [itamae](https://github.com/itamae-kitchen/itamae).
## Features
- Drivers
- `itamae ssh` support
- remote `itamae local` support on rsync+bundler
- remote `mitamae` support
- Simple pluggable host inventory, discovery## Installation
Add this line to your application's Gemfile:
```ruby
gem 'hocho'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install hocho
## Usage
``` yaml
# hocho.yml
inventory_providers:
file:
path: './hosts'property_providers:
## Provide default values to host properties (reverse_merge).
- add_default:
properties:
blah: blahblah
# preferred_driver: mitamae
attributes:
node_attributes_goes_here: hello## Run ruby script to mutate host properties
- ruby_script:
name: name-for-your-convenience # optional
script: 'host.properties[:hello] = Time.now.xmlschema'
## or
# file: path/to/script.rb# driver_options:
# mitamae:
# mitamae_prepare_script: 'wget -O /usr/local/bin/mitamae https://...'
`````` yaml
# ./hosts/test.yml
test.example.org:
# ssh_options:
# user: ...
properties:
# preferred_driver: bundler
# preferred_driver: mitamae
attributes:
node_attributes_goes_here: hello
run_list:
- roles/app/default.rb
``````
$ hocho list
$ hocho show test.example.org
$ hocho apply test.example.org
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hocho.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).