{"id":18728745,"url":"https://github.com/rubyonworld/practicing-ruby-cookbook","last_synced_at":"2025-08-24T17:09:30.521Z","repository":{"id":174008040,"uuid":"542159218","full_name":"RubyOnWorld/practicing-ruby-cookbook","owner":"RubyOnWorld","description":"This Chef cookbook fully automates the process of setting up an environment that can run the Practicing Ruby Rails app. ","archived":false,"fork":false,"pushed_at":"2022-09-27T23:42:39.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:32:45.158Z","etag":null,"topics":["automatic","book","chef","coo","environment","process","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2022-09-27T15:31:44.000Z","updated_at":"2022-09-28T01:26:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a899276-f11f-435a-9549-3917eb2e53ae","html_url":"https://github.com/RubyOnWorld/practicing-ruby-cookbook","commit_stats":null,"previous_names":["rubyonworld/practicing-ruby-cookbook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/practicing-ruby-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpracticing-ruby-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpracticing-ruby-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpracticing-ruby-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpracticing-ruby-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/practicing-ruby-cookbook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpracticing-ruby-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271910596,"owners_count":24842375,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automatic","book","chef","coo","environment","process","ruby"],"created_at":"2024-11-07T14:24:12.886Z","updated_at":"2025-08-24T17:09:30.475Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Practicing Ruby Cookbook\n========================\n\nThis Chef cookbook fully automates the process of setting up an environment that\ncan run the [Practicing Ruby Rails app][pr-web]. It takes a bare Ubuntu system\nfrom zero to the point where Practicing Ruby can be deployed with Capistrano.\n\nThe cookbook was originally built for the Practicing Ruby article\n[\"Infrastructure automation by example\"][pr-article].\n\n## Requirements\n\nTo use this cookbook, you need the following software:\n\n* [VirtualBox] - Version 4.2 or higher\n* [Vagrant] - Version 1.3.4 or higher\n* [vagrant-omnibus] - installable via `vagrant plugin install vagrant-omnibus`\n* [Berkshelf] - installable via `bundle install`\n\nWhen you provision a VM using this cookbook, Chef will be installed for you via\n`vagrant-omnibus`, and if necessary an Ubuntu Linux base system image will be\ndownloaded automatically. See the project's `Vagrantfile` for exact versions\nused.\n\n## External Cookbooks\n\nOur recipes are built on top of the following external cookbooks: \n\n* [apt](https://github.com/opscode-cookbooks/apt)\n* [database](https://github.com/opscode-cookbooks/database)\n* [mailcatcher](https://github.com/andruby/mailcatcher)\n* [nginx](https://github.com/opscode-cookbooks/nginx)\n* [postgresql](https://github.com/opscode-cookbooks/postgresql)\n* [sudo](https://github.com/opscode-cookbooks/sudo)\n* [user](https://github.com/fnichol/chef-user)\n\nAll of these will be automatically installed by **Berkshelf**, so there is no\nneed to set them up manually.\n\n## Configuration\n\nMost of the web application's features will work without modifying any settings,\nbut a few features do need to have valid API keys or other bits of configuration\ndata to be set in order to run. To see what options are configurable, see\n`attributes/default.rb`. To override them, copy `chef.json.example` to\n`chef.json` and edit the latter accordingly. *Keep in mind that for many use\ncases, you may not need to override any settings at all.*\n\n## Provisioning\n\nRun the following two commands inside the Practicing Ruby cookbook to create a\nVagrant machine and boot it up:\n\n    $ bundle exec berks vendor vendor/cookbooks\n    $ vagrant up --provision\n\nIn case the VM is already up, you can always run Chef again with:\n\n    $ bundle exec berks vendor vendor/cookbooks\n    $ vagrant provision\n\nTo SSH into the running VM:\n\n    $ vagrant ssh\n\nLast but not least, here is how to stop and destroy the VM when you no longer\nneed it or when you want to start from scratch:\n\n    $ vagrant destroy -f\n\n### Using Rake\n\nInstead of running Vagrant directly on the command line, there is also a Rake\ntask you can use. With this command, you always end up with a Vagrant machine\nthat is fully provisioned:\n\n    $ bundle exec rake provision\n\n## Deploying\n\nIn order to deploy the Practicing Ruby app to a Vagrant VM that was provisioned\nwith the Practicing Ruby cookbook, you have to add the following settings to\nyour `~/.ssh/config` file (you might have to adapt `HostName` and `IdentityFile`\nto match your setup).\n\n```\nHost practicingruby.local\n    HostName 10.11.12.13\n    User deploy\n    UserKnownHostsFile /dev/null\n    StrictHostKeyChecking no\n    PasswordAuthentication no\n    IdentityFile ~/.vagrant.d/insecure_private_key\n    IdentitiesOnly yes\n```\n\nAfterwards, you will be able to deploy the Rails app with Capistrano:\n\n    $ cd /path/to/practicing-ruby-web\n    $ bundle install\n    $ bundle exec cap vagrant deploy:setup deploy seed\n\nAlso, you will be able to log into the VM via `ssh practicingruby.local`.\n\nTo visit the site from your browser, you'll probably also need to add the\nfollowing entries to your `/etc/hosts` file:\n\n```\n10.11.12.13 practicingruby.local\n10.11.12.13 www.practicingruby.local\n```\n\nA few users and some articles will already be populated in the DB. Try logging\nin as `admin` for an administrator account, and see the [full seed file][pr-seeds]\nfor all created users.\n\n### Using Rake\n\nInstead of manually switching to the `practicing-ruby-web` directory and running\nCapistrano, you can also use this handy Rake task to deploy the Rails app to the\nVagrant machine:\n\n    $ bundle exec rake deploy\n\n## Testing\n\n[![Build Status](https://travis-ci.org/elm-city-craftworks/practicing-ruby-cookbook.svg?branch=master)](https://travis-ci.org/elm-city-craftworks/practicing-ruby-cookbook)\n\nThe following Rake tasks are provided for automated testing of the cookbook:\n\n* `rake rubocop` - Run [RuboCop] style and lint checks\n* `rake foodcritic` - Run [Foodcritic] lint checks\n* `rake integration` - Run [Test Kitchen] integration tests (provisions a\n  Vagrant VM using this cookbook and then tests the infrastructure with\n  [Serverspec])\n* `rake test` - Run all tests\n\n## License and Authorship\n\nOriginally written in October 2013 by Mathias Lafeldt (\u003cmathias.lafeldt@gmail.com\u003e),\nwith contributions from the community. Individual contributors retain their\ncopyright, but agree to release the code under the same license as the project\nitself. For a complete list of contributors, see the git logs or visit:\nhttps://github.com/elm-city-craftworks/practicing-ruby-cookbook/graphs/contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n## Contributing\n\nWe welcome contributed improvements and bug fixes via the usual workflow:\n\n1. Fork this repository\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new pull request\n\n\n[Berkshelf]: http://berkshelf.com/\n[Foodcritic]: http://www.foodcritic.io/\n[pr-article]: https://practicingruby.com/articles/infrastructure-automation\n[pr-seeds]: https://github.com/elm-city-craftworks/practicing-ruby-web/blob/master/db/seeds.rb\n[pr-web]: https://github.com/elm-city-craftworks/practicing-ruby-web\n[RuboCop]: https://github.com/bbatsov/rubocop\n[Serverspec]: http://serverspec.org/\n[Test Kitchen]: http://kitchen.ci/\n[vagrant-omnibus]: https://github.com/schisamo/vagrant-omnibus\n[Vagrant]: http://vagrantup.com\n[VirtualBox]: https://www.virtualbox.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fpracticing-ruby-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fpracticing-ruby-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fpracticing-ruby-cookbook/lists"}