Sha256: 178957c02a94d3a77c2c43265a8afa222c59ade32f51eeee1d36182b7d12fd89
Contents?: true
Size: 1.89 KB
Versions: 4
Compression:
Stored size: 1.89 KB
Contents
Rna gem =========== [![Build History][2]][1] [1]: http://travis-ci.org/tongueroo/rna [2]: https://secure.travis-ci.org/tongueroo/rna.png?branch=master Rna is a ruby gem that provides simple DSL for generating node.json files required by chef-solo. Requirements ------------ <pre> $ gem install rna </pre> Usage ------------ <pre> $ mkdir rna_project $ cd rna_project $ rna init </pre> This will sets starter config/rna.rb and config/s3.yml files. Example rna.rb file ------------ ```ruby # This is starter example rna template. # This is meant be be modified to your needs. ################################### # Settings default_inherits 'base' global_attributes(:except => ['base']) do set 'framework_env', 'production' end ################################### # Post processing rules that run at the end rule do set 'framework_env', 'production' if name =~ /^prod/ set 'framework_env', 'staging' if name =~ /^stag/ end ################################### # Roles # base role 'base' do run_list ['base'] end # api role 'prod-api-redis', 'stag-api-redis' do run_list ['base','api_redis'] end role 'prod-api-app', 'stag-api-app' do run_list ['base','api_app'] set 'application', 'api' set 'deploy_code', true set 'repository', 'git@github.com:br/api.git' end role 'prod-api-resque', 'stag-api-resque' do inherits 'prod-api-app' run_list ['base','api_resque'] set 'workers', 8 end ``` <pre> $ rna build </pre> If you're using the starter config/rna.rb, this should build: * nodejson/base.json * nodejson/prod-api-app.json * nodejson/prod-api-redis.json * nodejson/prod-api-resque.json * nodejson/stag-api-app.json * nodejson/stag-api-redis.json * nodejson/stag-api-resque.json <pre> $ rna build -o s3 # saves s3 based on config/s3.yml settings </pre> The config/s3.yml should look like this: ```yaml access_key_id: hocuspocus secret_access_key: opensesame bucket: my-bucket folder: chef/nodejson ```
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rna-0.1.7 | README.md |
rna-0.1.6 | README.md |
rna-0.1.5 | README.md |
rna-0.1.4 | README.md |