{"id":20841558,"url":"https://github.com/wavesoftware/gem-puppet-herald","last_synced_at":"2025-05-08T22:14:06.454Z","repository":{"id":24539905,"uuid":"27946441","full_name":"wavesoftware/gem-puppet-herald","owner":"wavesoftware","description":"Herald - Consums puppet reports and display them in a simple Web app. Also a REST API.","archived":false,"fork":false,"pushed_at":"2017-03-29T09:27:20.000Z","size":799,"stargazers_count":6,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-05-08T22:14:00.483Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wavesoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-13T02:20:01.000Z","updated_at":"2018-05-15T00:39:22.000Z","dependencies_parsed_at":"2022-08-20T14:30:08.183Z","dependency_job_id":null,"html_url":"https://github.com/wavesoftware/gem-puppet-herald","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoftware%2Fgem-puppet-herald","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoftware%2Fgem-puppet-herald/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoftware%2Fgem-puppet-herald/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesoftware%2Fgem-puppet-herald/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavesoftware","download_url":"https://codeload.github.com/wavesoftware/gem-puppet-herald/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154977,"owners_count":21862623,"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":[],"created_at":"2024-11-18T01:20:43.086Z","updated_at":"2025-05-08T22:14:06.438Z","avatar_url":"https://github.com/wavesoftware.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"puppet-herald gem\n========\n\n##### Status Info\n[![GitHub Issues](https://img.shields.io/github/issues/wavesoftware/gem-puppet-herald.svg)](https://github.com/wavesoftware/gem-puppet-herald/issues) [![Gem](http://img.shields.io/gem/v/puppet-herald.svg)](https://rubygems.org/gems/puppet-herald) [![GitHub Release](https://img.shields.io/github/release/wavesoftware/gem-puppet-herald.svg)](https://github.com/wavesoftware/gem-puppet-herald/releases) [![Apache 2.0 License](http://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/wavesoftware/gem-puppet-herald/develop/LICENSE)\n\n##### Master (stable) branch\n[![Build Status](https://img.shields.io/travis/wavesoftware/gem-puppet-herald/master.svg)](https://travis-ci.org/wavesoftware/gem-puppet-herald) [![Dependency Status](https://gemnasium.com/wavesoftware/gem-puppet-herald.svg)](https://gemnasium.com/wavesoftware/gem-puppet-herald) [![Coverage Status](https://img.shields.io/coveralls/wavesoftware/gem-puppet-herald/master.svg)](https://coveralls.io/r/wavesoftware/gem-puppet-herald?branch=master) [![Code Climate](https://codeclimate.com/github/wavesoftware/gem-puppet-herald/badges/gpa.svg?branch=master)](https://codeclimate.com/github/wavesoftware/gem-puppet-herald) [![Inline docs](http://inch-ci.org/github/wavesoftware/gem-puppet-herald.svg?branch=master)](http://inch-ci.org/github/wavesoftware/gem-puppet-herald)\n\n##### Development branch\n[![Build Status](https://img.shields.io/travis/wavesoftware/gem-puppet-herald/develop.svg)](https://travis-ci.org/wavesoftware/gem-puppet-herald) [![Dependency Status](https://gemnasium.com/wavesoftware/gem-puppet-herald.svg)](https://gemnasium.com/wavesoftware/gem-puppet-herald) [![Coverage Status](https://img.shields.io/coveralls/wavesoftware/gem-puppet-herald/develop.svg)](https://coveralls.io/r/wavesoftware/gem-puppet-herald?branch=develop) [![Code Climate](https://codeclimate.com/github/wavesoftware/gem-puppet-herald/badges/gpa.svg?branch=develop)](https://codeclimate.com/github/wavesoftware/gem-puppet-herald) [![Inline docs](http://inch-ci.org/github/wavesoftware/gem-puppet-herald.svg?branch=develop)](http://inch-ci.org/github/wavesoftware/gem-puppet-herald) \n\nOverview\n--------\n\nHerald is a puppet report processor. He provides a gateway for consuming puppet reports, a REST API and a simple Web app to display reports.\n\n![A reports list](https://raw.githubusercontent.com/wavesoftware/gem-puppet-herald/gh-pages/images/reports.png)\n\n![A logs of single report](https://raw.githubusercontent.com/wavesoftware/gem-puppet-herald/gh-pages/images/logs.png)\n\nPuppet module\n-----\n\nThere is/will be a puppet module that handle installation and configuration of Herald and prerequisites. Installing configuring and running with puppet is recommended. If you decided to take that approch check out: https://github.com/wavesoftware/puppet-herald\n\nInstallation, configuration and usage point seen below does not apply to installing with puppet!\n\n\nInstallation\n-----\n\nHerald typically should be installed on the same node or in management network of your puppet master. It will listen by default to localhost (this can be changed by `--bind` option). You should take care to properlly secure Herald if its publicly avialable (SSL, Authorization, Access List, Firewalls etc.). This could be easily done with Apache web server. Is approch is taken in puppet module (see above).\n\nIf you decided to install Herald by yourself, issue just:\n\n```shell\nsudo gem install puppet-herald\n```\n\nConfiguration\n-----\n\n###PostgreSQL\n\nPostgreSQL is recommended database backend for Herald. If you like to use PostgreSQL database to hold reports, you will need to configure it. By default, Herald will use a sqlite file that he tries to create in your home directory. Check out `puppet-herald --help` for description.\n\n###Prerequisites for PostgreSQL\n\n * `libpq-dev` system package\n * `pg` gem package\n\nOn Ubuntu/Debian system install them with:\n\n```shell\nsudo apt-get install libpq-dev\nsudo gem install pg\n```\n\n###Create a database\n\nJust create a database for Herald (this is just a sample for PostgreSQL):\n\n```sql\nCREATE ROLE pherald LOGIN PASSWORD '\u003cYOUR PASSWORD\u003e'\n  NOSUPERUSER INHERIT NOCREATEDB\n  NOCREATEROLE NOREPLICATION;\nCREATE DATABASE \"pherald\" WITH OWNER = pherald\n  ENCODING = 'UTF8'\n  TABLESPACE = pg_default;\n```\n\nUsage\n-----\n\n```shell\n$ puppet-herald --help\n```\n\nExample usage of Herald with defaults:\n\n```shell\npuppet-herald # Navigate to http://localhost:11303/\n```\n\nExample usage of Herald with PostgreSQL and binding 127.0.1.1:\n\n```shell\npuppet-herald \\\n  --dbconn postgresql://pherald@master.cluster.vm:5432/pherald \\\n  --passfile /etc/pherald/passfile \\\n  --bind 127.0.1.1 # Navigate to http://127.0.1.1:11303/\n```\n\nExample usage of Herald with SQLite3 and binding to other host and port:\n\n```shell\npuppet-herald \\\n  --dbconn sqlite:///var/lib/puppet/reports/pherald.db \\\n  --bind master.cluster.vm \\\n  --port 8081 # Navigate to http://master.cluster.vm:8081/\n```\n\nConfiguring puppet master\n-------------------------\n\nTo send reports to Herald, you need to configure your puppet master to use custom report proccessor. This processor is also automatically configured if you choose to use a puppet module installation version. If not you must configure it by yourself.\n\nFirst install a puppet-herald gem if you didn't do it already on puppet master:\n\n```shell\nsudo gem install puppet-herald\n```\n\nIf you are running PE, run instead:\n\n```shell\nsudo /opt/puppet/bin/gem install puppet-herald\n```\n\nThen create a file in your puppet module directory (you can get modulepath with command: `puppet config print modulepath`). For example: `\u003cpuppet modules\u003e/herald/lib/puppet/reports/herald.rb` with contents:\n\n```ruby\nrequire 'puppet'\nrequire 'puppet-herald/client'\n\nPuppet::Reports.register_report(:herald) do\n  desc \"Process reports via the Herald API.\"\n  def process\n    PuppetHerald::Client.new.process(self)\n  end\nend\n```\n\nIf you need to post to other host or port use (defaults are: `localhost` and `11303`):\n\n```ruby\nrequire 'puppet'\nrequire 'puppet-herald/client'\n\nPuppet::Reports.register_report(:herald) do\n  desc \"Process reports via the Herald API.\"\n  def process\n    PuppetHerald::Client.new('master.secure.vm', 8082).process(self)\n  end\nend\n```\n\nThen edit your `puppet.conf` file and set `herald` as your report processor in section `main`:\n\n```ini\n[main]\n   reports = puppetdb,herald\n```\n\n###Testing a ruby code\n\nThere are two types of tests distributed with the module. Unit tests and integration tests that uses sqlite as database backend in memory.\n\nFor unit testing, make sure you have:\n\n * rake\n * bundler\n\nInstall the necessary gems (gems will be downloaded to private .vendor directory):\n\n```shell\nbundle install --path .vendor\n```\n\nAnd then run the unit tests (for integration tests simply swap `unit` to `integration`):\n\n```shell\nbundle exec rake spec:unit\n```\n\nYou can run single test with:\n\n```shell\nbundle exec rspec spec/unit/puppet-herald/version_spec.rb\n```\n\nYou can also run all test with `test` target\n\n###Testing a javascript code\n\nTo test javascript code, make sure you have:\n\n * nodejs\n\nIf so, issue this command to bootstart testing environment:\n\n```shell\nnpm install\n```\n\nAnd then test Javascript code with:\n\n```shell\nbundle exec rake js:test\n```\n\nCheck your code for quality with:\n\n```shell\nbundle exec rake rucocop\nbundle exec rake inch\n```\n\n###Contributing\n\nContributions are welcome!\n\nTo contribute, follow the standard [git flow](http://danielkummer.github.io/git-flow-cheatsheet/) of:\n\n1. Fork it\n1. Create your feature branch (`git checkout -b feature/my-new-feature`)\n1. Commit your changes (`git commit -am 'Add some feature'`)\n1. Push to the branch (`git push origin feature/my-new-feature`)\n1. Create new Pull Request\n\nEven if you can't contribute code, if you have an idea for an improvement please open an [issue](https://github.com/wavesoftware/gem-puppet-herald/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesoftware%2Fgem-puppet-herald","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavesoftware%2Fgem-puppet-herald","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesoftware%2Fgem-puppet-herald/lists"}