{"id":19028390,"url":"https://github.com/zinovyev/bow","last_synced_at":"2025-07-22T01:05:46.453Z","repository":{"id":62554529,"uuid":"103709708","full_name":"zinovyev/bow","owner":"zinovyev","description":"  Simple provisioning with rake tasks","archived":false,"fork":false,"pushed_at":"2017-09-25T20:21:41.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T19:45:01.971Z","etag":null,"topics":["bow","provisioning","rake","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zinovyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-15T23:30:45.000Z","updated_at":"2017-09-20T22:47:52.000Z","dependencies_parsed_at":"2022-11-03T05:00:40.644Z","dependency_job_id":null,"html_url":"https://github.com/zinovyev/bow","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zinovyev/bow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Fbow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Fbow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Fbow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Fbow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zinovyev","download_url":"https://codeload.github.com/zinovyev/bow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Fbow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266405405,"owners_count":23923536,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["bow","provisioning","rake","ruby"],"created_at":"2024-11-08T21:10:58.315Z","updated_at":"2025-07-22T01:05:46.429Z","avatar_url":"https://github.com/zinovyev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bow\n\n  Automate your infrastructure provisioning and configuration with Rake.\n\n[![Build Status](https://travis-ci.org/zinovyev/bow.svg?branch=master)](https://travis-ci.org/zinovyev/bow)\n[![Gem Version](https://badge.fury.io/rb/bow.svg)](https://badge.fury.io/rb/bow)\n\n\n## About\n\nBow doesn't bring its own DSL to live, rather it uses regular Rake tasks\ninstead.\n\nIt can be handy for you if:\n\n * you need to configure a pure system of 2-5 VPSs;\n\n * you don't want to build a complex infrastructure;\n\n * you are already familiar with Rake and don't want to to learn Python;\n\n\n## Installation\n\nDownload and install bow with the following.\n\n```bash\n\n  gem install bow\n\n```\n\n\n## Usage\n\nFirst of all. If you're not familiar with Rake and Rake tasks, take a look at\nthis pages: [Rake docs](https://ruby.github.io/rake/) and [Rake home](https://github.com/ruby/rake). It can be a good place to start from.\n\n\n### Project structure\n\nThe basic bow project consists of two files: `Rakefile` and `targets.json`.\n\nRun `bow init` which will generate an example project structure to give you a\nbasic understanding of how to write your own configuration.\n\nSometimes it can be convinient to put tasks to separate files into the\n[rakelib](https://ruby.github.io/rake/doc/rakefile_rdoc.html#label-Multiple+Rake+Files)\nfolder. So Rake will automatically autoload them.\n\n\n**targets.json** contains a list of hosts grouped in categories:\n\n\n```json\n\n{\n  \"example_group1\": [\n    \"192.168.50.27\",\n    \"192.168.50.37\"\n  ],\n  \"example_group2\": [\n    \"192.168.50.47\",\n    \"192.168.50.57\"\n  ]\n}\n\n```\n\n\n**Rakefile** is actually an ordinary Rakefile) which contains several tasks\nfor provisioning packed in namespaces which are called by the name of the server\ngroups from the `targets.json` file.\n\nThe main task of the group MUST always be called **provision** and can be bound\nto any number of additional tasks.\n\n\n```ruby\n\nrequire 'bow/rake'\n\nRake.application.options.trace_rules = true\n\nPROVISION_DIR = '/tmp/rake_provision'.freeze\n\nnamespace :web do\n  task provision: :print_hello do\n  end\n\n  flow run: :once\n  task :print_hello do\n    sh 'echo \"Hello from example group #1 server!\"'\n  end\nend\n\nnamespace :example_group2 do\n  task provision: :print_hello do\n  end\n\n  # Change enabled value to \"false\" to run the reverting task (:print_goodbye)\n  flow enabled: true, revert_task: :print_goodbye\n  task :print_hello do\n    sh 'echo \"Hello from example group #2 server!\"'\n  end\n\n  task :print_goodbye do\n    sh 'echo \"Goodbye! The task at example group #2 is disabled!\"'\n  end\nend\n\n```\n\n\n### Commands\n\n\nTo **check the availability** of all configured hosts run:\n\n\n```bash\n\n  bow ping\n\n```\n\nTo **prepare soft on client** needed for bow to run\n(Ruby and 2 gems: rake and bow) execute\n\n```bash\n\n  bow prepare\n\n```\n\nTo **apply configured provision** run:\n\n```bash\n\n  bow apply\n\n```\n\nTo explore more options and commands run:\n\n```bash\n\n  bow -h\n\n```\n\n\n### Flow\n\nCommand **flow** from the upper example is a little extension added by the bow\ngem which allows you to controll the flow of the task. It consists of 3 options:\n\n* `run: :once` or `run: :always` sets the condition on how many times to run\nthe task;\n\n* `enabled: true` or `enabled: false` wich takes a boolean value allows you to\ndisable the task so it can be ommited or reverted (if a reverting task\nis given);\n\n* `revert: task_name` wich defines a task that can revert changes done\nby the original task when the original task is disabled (by `enabled: false`\noption). Actually it's something similar to the down migration when dealing\nwith ActiveRecord;\n\n\n### Run the example\n\nTo run the example locally this [Vagrantfile](doc/Vagrantfile) can be used to create a\ntesting environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzinovyev%2Fbow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzinovyev%2Fbow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzinovyev%2Fbow/lists"}