{"action":"created","comment":{"url":"https://api.github.com/repos/radiorabe/raar/pulls/comments/166423549","pull_request_review_id":94480013,"id":166423549,"diff_hunk":"@@ -0,0 +1,369 @@\n+# Recording\n+As stated on the [RAAR Import Recordings section](import.md#recordings), RAAR\n+is not responsible for the actual recording of the audio files. It simply\n+assumes that recordings are placed within directories defined by\n+`IMPORT_DIRECTORIES` waiting for the [RAAR Importer](import.md) to pick them\n+up.\n+\n+But don't panic :-) we've got you covered in case you haven't your own\n+recording solution already in place.\n+\n+The following sections describe a recording solution based on\n+[JACK](http://www.jackaudio.org/), [Rotter](https://www.aelius.com/njh/rotter/)\n+and some systemd service units, which plays nicely together with RAAR.\n+\n+## Overview\n+[Rotter](https://www.aelius.com/njh/rotter/) is a Recording of Transmission /\n+Audio Logger for [JACK](http://www.jackaudio.org/). It captures audio from\n+`jackd`, encodes it in a specified format and creates a new recording file\n+every hour by default. This makes it ideal to use together with RAAR.\n+\n+In the following deployment walk-through `rotter` will be configured to capture\n+the audio from the first two JACK input ports found, while storing the\n+recordings into the `/var/lib/rotter/raar` directory in the lossless\n+[FLAC](https://xiph.org/flac/) format. A separate recording-handler will move\n+the finished recordings from the `/var/lib/rotter/raar` directory to a final\n+RAAR import directory. Of course, the JACK configuration, audio codec and\n+directory locations can be customized to meet the requirements of your\n+environment.\n+\n+Also note, that the deployment was tested on [CentOS\n+7](#deployment-on-centos-7-systems), but should work on [other\n+distributions](#deployment-on-other-distributions) as well (with some minor\n+modifications).\n+\n+## Deployment\n+### Deployment on CentOS 7 systems\n+There are pre-built binary packages for CentOS 7 available from\n+[EPEL](https://fedoraproject.org/wiki/EPEL) (jack) and [RaBe APEL package\n+repository](https://build.opensuse.org/project/show/home:radiorabe:audio)\n+(rotter), which can be installed as follows:\n+```bash\n+# Add EPEL repository\n+yum install epel-release\n+\n+# Install jackd and helper tools (from EPEL)\n+yum install -y jack-audio-connection-kit \\\n+               jack-audio-connection-kit-example-clients\n+\n+# Add RaBe APEL repository\n+curl -o /etc/yum.repos.d/home:radiorabe:audio.repo \\\n+     http://download.opensuse.org/repositories/home:/radiorabe:/audio/CentOS_7/home:radiorabe:audio.repo\n+ \n+# Install rotter (which will also install \"jack-audio-connection-kit\" and\n+# \"jack-audio-connection-kit-example-clients\")\n+yum install rotter\n+```\n+\n+Install the [raar jackd systemd service instance\n+override](../config/systemd/jackd@raar.service.d/override.conf):\n+```bash\n+# Install the jackd@raar service instance unit override\n+mkdir \"/etc/systemd/system/jackd@raar.service.d\"\n+wget -O \"/etc/systemd/system/jackd@raar.service.d/override.conf\" \\\n+     https://raw.githubusercontent.com/radiorabe/raar/master/config/systemd/jackd%40raar.service.d/override.conf \n+\n+# You might need to adapt the jackd service instance unit override to suite\n+# your environment\n+vi /etc/systemd/system/jackd@raar.service.d/override.conf\n+\n+# Reload systemd manager configuration\n+systemctl daemon-reload\n+```\n+\n+Install the [raar rotter systemd service instance\n+override](../config/systemd/rotter@raar.service.d/override.conf):\n+```bash\n+# Install the rotter@raar service instance unit override\n+mkdir \"/etc/systemd/system/rotter@raar.service.d\"\n+wget -O \"/etc/systemd/system/rotter@raar.service.d/override.conf\" \\\n+     https://raw.githubusercontent.com/radiorabe/raar/master/config/systemd/rotter%40raar.service.d/override.conf \n+\n+# You might need to adapt the rotter service instance unit override to suite\n+# your environment\n+vi /etc/systemd/system/rotter@raar.service.d/override.conf\n+\n+# Reload systemd manager configuration\n+systemctl daemon-reload\n+```\n+\n+You can now enable and start the `raar@rotter.service` instance, which will\n+also trigger the start of the `raar@jackd.service` instance.\n+```bash\n+# Enable and start the service unit instance\n+systemctl enable raar@rotter.service\n+systemctl start raar@rotter.service\n+\n+# Check the status\n+systemctl status raar@rotter.service\n+systemctl status raar@jackd.service\n+\n+# In case of problems, inspect the systemd journal\n+journalctl -u raar@rotter.service\n+journalctl -u raar@jackd.service\n+```\n+\n+The recordings should appear in the `/var/lib/rotter/raar` directory.\n+\n+As a final step, install the [RAAR Record Handler](#raar-record-handler).\n+\n+### Deployment on other distributions\n+#### Dedicated system user for recording\n+First, a dedicated system user and group will be created under which all\n+involved processes will run. The user and group is named `rotter` (you might\n+need to adapt the supplementary groups, `audio` and `jackuser`, to match with\n+your distribution).\n+```bash\n+# Create a dedicated audio recording user which belongs to the audio and\n+# jackuser groups. The later is required in order to gain real-time priority\n+# see also /etc/security/limits.d/95-jack.conf\n+useradd --comment \"rotter system user\" \\\n+        --home-dir \"/var/lib/rotter\" \\\n+        --create-home \\\n+        --groups audio,jackuser \\\n+        --password '*' \\\n+        --system \\\n+        --shell /sbin/nologin \\\n+        --user-group \\\n+        rotter","path":"doc/recording.md","position":128,"original_position":128,"commit_id":"4b43d9a3a1ee9489f0f0300627ef0eab135d85d3","original_commit_id":"4b43d9a3a1ee9489f0f0300627ef0eab135d85d3","user":{"login":"hairmare","id":116588,"avatar_url":"https://avatars2.githubusercontent.com/u/116588?v=4","gravatar_id":"","url":"https://api.github.com/users/hairmare","html_url":"https://github.com/hairmare","followers_url":"https://api.github.com/users/hairmare/followers","following_url":"https://api.github.com/users/hairmare/following{/other_user}","gists_url":"https://api.github.com/users/hairmare/gists{/gist_id}","starred_url":"https://api.github.com/users/hairmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairmare/subscriptions","organizations_url":"https://api.github.com/users/hairmare/orgs","repos_url":"https://api.github.com/users/hairmare/repos","events_url":"https://api.github.com/users/hairmare/events{/privacy}","received_events_url":"https://api.github.com/users/hairmare/received_events","type":"User","site_admin":false},"body":"I'm not sure if you saw https://github.com/radiorabe/centos-rpm-rotter/issues/1 before writing this.","created_at":"2018-02-06T19:51:05Z","updated_at":"2018-02-06T19:56:03Z","html_url":"https://github.com/radiorabe/raar/pull/1#discussion_r166423549","pull_request_url":"https://api.github.com/repos/radiorabe/raar/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/comments/166423549"},"html":{"href":"https://github.com/radiorabe/raar/pull/1#discussion_r166423549"},"pull_request":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/radiorabe/raar/pulls/1","id":167482262,"html_url":"https://github.com/radiorabe/raar/pull/1","diff_url":"https://github.com/radiorabe/raar/pull/1.diff","patch_url":"https://github.com/radiorabe/raar/pull/1.patch","issue_url":"https://api.github.com/repos/radiorabe/raar/issues/1","number":1,"state":"closed","locked":false,"title":"Feature - Recording","user":{"login":"paraenggu","id":1186157,"avatar_url":"https://avatars1.githubusercontent.com/u/1186157?v=4","gravatar_id":"","url":"https://api.github.com/users/paraenggu","html_url":"https://github.com/paraenggu","followers_url":"https://api.github.com/users/paraenggu/followers","following_url":"https://api.github.com/users/paraenggu/following{/other_user}","gists_url":"https://api.github.com/users/paraenggu/gists{/gist_id}","starred_url":"https://api.github.com/users/paraenggu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paraenggu/subscriptions","organizations_url":"https://api.github.com/users/paraenggu/orgs","repos_url":"https://api.github.com/users/paraenggu/repos","events_url":"https://api.github.com/users/paraenggu/events{/privacy}","received_events_url":"https://api.github.com/users/paraenggu/received_events","type":"User","site_admin":false},"body":"The following PR adds documentation for an audio recording solution, as well as  the related Systemd instance service unit overrides and a little recording handler script.","created_at":"2018-02-06T17:39:15Z","updated_at":"2018-02-06T19:56:03Z","closed_at":"2018-02-06T19:48:17Z","merged_at":"2018-02-06T19:48:17Z","merge_commit_sha":"bb762fb5147b5b920dc8642708d9aaaf711079a0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"codez","id":271590,"avatar_url":"https://avatars2.githubusercontent.com/u/271590?v=4","gravatar_id":"","url":"https://api.github.com/users/codez","html_url":"https://github.com/codez","followers_url":"https://api.github.com/users/codez/followers","following_url":"https://api.github.com/users/codez/following{/other_user}","gists_url":"https://api.github.com/users/codez/gists{/gist_id}","starred_url":"https://api.github.com/users/codez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codez/subscriptions","organizations_url":"https://api.github.com/users/codez/orgs","repos_url":"https://api.github.com/users/codez/repos","events_url":"https://api.github.com/users/codez/events{/privacy}","received_events_url":"https://api.github.com/users/codez/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/radiorabe/raar/pulls/1/commits","review_comments_url":"https://api.github.com/repos/radiorabe/raar/pulls/1/comments","review_comment_url":"https://api.github.com/repos/radiorabe/raar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radiorabe/raar/issues/1/comments","statuses_url":"https://api.github.com/repos/radiorabe/raar/statuses/4b43d9a3a1ee9489f0f0300627ef0eab135d85d3","head":{"label":"paraenggu:feature/recording","ref":"feature/recording","sha":"4b43d9a3a1ee9489f0f0300627ef0eab135d85d3","user":{"login":"paraenggu","id":1186157,"avatar_url":"https://avatars1.githubusercontent.com/u/1186157?v=4","gravatar_id":"","url":"https://api.github.com/users/paraenggu","html_url":"https://github.com/paraenggu","followers_url":"https://api.github.com/users/paraenggu/followers","following_url":"https://api.github.com/users/paraenggu/following{/other_user}","gists_url":"https://api.github.com/users/paraenggu/gists{/gist_id}","starred_url":"https://api.github.com/users/paraenggu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paraenggu/subscriptions","organizations_url":"https://api.github.com/users/paraenggu/orgs","repos_url":"https://api.github.com/users/paraenggu/repos","events_url":"https://api.github.com/users/paraenggu/events{/privacy}","received_events_url":"https://api.github.com/users/paraenggu/received_events","type":"User","site_admin":false},"repo":{"id":120194837,"name":"raar","full_name":"paraenggu/raar","owner":{"login":"paraenggu","id":1186157,"avatar_url":"https://avatars1.githubusercontent.com/u/1186157?v=4","gravatar_id":"","url":"https://api.github.com/users/paraenggu","html_url":"https://github.com/paraenggu","followers_url":"https://api.github.com/users/paraenggu/followers","following_url":"https://api.github.com/users/paraenggu/following{/other_user}","gists_url":"https://api.github.com/users/paraenggu/gists{/gist_id}","starred_url":"https://api.github.com/users/paraenggu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paraenggu/subscriptions","organizations_url":"https://api.github.com/users/paraenggu/orgs","repos_url":"https://api.github.com/users/paraenggu/repos","events_url":"https://api.github.com/users/paraenggu/events{/privacy}","received_events_url":"https://api.github.com/users/paraenggu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paraenggu/raar","description":"RAAR is a ruby application to manage and browse an audio archive.","fork":true,"url":"https://api.github.com/repos/paraenggu/raar","forks_url":"https://api.github.com/repos/paraenggu/raar/forks","keys_url":"https://api.github.com/repos/paraenggu/raar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paraenggu/raar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paraenggu/raar/teams","hooks_url":"https://api.github.com/repos/paraenggu/raar/hooks","issue_events_url":"https://api.github.com/repos/paraenggu/raar/issues/events{/number}","events_url":"https://api.github.com/repos/paraenggu/raar/events","assignees_url":"https://api.github.com/repos/paraenggu/raar/assignees{/user}","branches_url":"https://api.github.com/repos/paraenggu/raar/branches{/branch}","tags_url":"https://api.github.com/repos/paraenggu/raar/tags","blobs_url":"https://api.github.com/repos/paraenggu/raar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paraenggu/raar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paraenggu/raar/git/refs{/sha}","trees_url":"https://api.github.com/repos/paraenggu/raar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paraenggu/raar/statuses/{sha}","languages_url":"https://api.github.com/repos/paraenggu/raar/languages","stargazers_url":"https://api.github.com/repos/paraenggu/raar/stargazers","contributors_url":"https://api.github.com/repos/paraenggu/raar/contributors","subscribers_url":"https://api.github.com/repos/paraenggu/raar/subscribers","subscription_url":"https://api.github.com/repos/paraenggu/raar/subscription","commits_url":"https://api.github.com/repos/paraenggu/raar/commits{/sha}","git_commits_url":"https://api.github.com/repos/paraenggu/raar/git/commits{/sha}","comments_url":"https://api.github.com/repos/paraenggu/raar/comments{/number}","issue_comment_url":"https://api.github.com/repos/paraenggu/raar/issues/comments{/number}","contents_url":"https://api.github.com/repos/paraenggu/raar/contents/{+path}","compare_url":"https://api.github.com/repos/paraenggu/raar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paraenggu/raar/merges","archive_url":"https://api.github.com/repos/paraenggu/raar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paraenggu/raar/downloads","issues_url":"https://api.github.com/repos/paraenggu/raar/issues{/number}","pulls_url":"https://api.github.com/repos/paraenggu/raar/pulls{/number}","milestones_url":"https://api.github.com/repos/paraenggu/raar/milestones{/number}","notifications_url":"https://api.github.com/repos/paraenggu/raar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paraenggu/raar/labels{/name}","releases_url":"https://api.github.com/repos/paraenggu/raar/releases{/id}","deployments_url":"https://api.github.com/repos/paraenggu/raar/deployments","created_at":"2018-02-04T15:02:23Z","updated_at":"2018-02-06T10:43:17Z","pushed_at":"2018-02-06T17:35:48Z","git_url":"git://github.com/paraenggu/raar.git","ssh_url":"git@github.com:paraenggu/raar.git","clone_url":"https://github.com/paraenggu/raar.git","svn_url":"https://github.com/paraenggu/raar","homepage":"","size":789,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"radiorabe:master","ref":"master","sha":"e1c46f62f33eccb460f80b0134d1cf0c5215e5e4","user":{"login":"radiorabe","id":3940873,"avatar_url":"https://avatars3.githubusercontent.com/u/3940873?v=4","gravatar_id":"","url":"https://api.github.com/users/radiorabe","html_url":"https://github.com/radiorabe","followers_url":"https://api.github.com/users/radiorabe/followers","following_url":"https://api.github.com/users/radiorabe/following{/other_user}","gists_url":"https://api.github.com/users/radiorabe/gists{/gist_id}","starred_url":"https://api.github.com/users/radiorabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiorabe/subscriptions","organizations_url":"https://api.github.com/users/radiorabe/orgs","repos_url":"https://api.github.com/users/radiorabe/repos","events_url":"https://api.github.com/users/radiorabe/events{/privacy}","received_events_url":"https://api.github.com/users/radiorabe/received_events","type":"Organization","site_admin":false},"repo":{"id":46887029,"name":"raar","full_name":"radiorabe/raar","owner":{"login":"radiorabe","id":3940873,"avatar_url":"https://avatars3.githubusercontent.com/u/3940873?v=4","gravatar_id":"","url":"https://api.github.com/users/radiorabe","html_url":"https://github.com/radiorabe","followers_url":"https://api.github.com/users/radiorabe/followers","following_url":"https://api.github.com/users/radiorabe/following{/other_user}","gists_url":"https://api.github.com/users/radiorabe/gists{/gist_id}","starred_url":"https://api.github.com/users/radiorabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radiorabe/subscriptions","organizations_url":"https://api.github.com/users/radiorabe/orgs","repos_url":"https://api.github.com/users/radiorabe/repos","events_url":"https://api.github.com/users/radiorabe/events{/privacy}","received_events_url":"https://api.github.com/users/radiorabe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/radiorabe/raar","description":"RAAR is a ruby application to manage and browse an audio archive.","fork":false,"url":"https://api.github.com/repos/radiorabe/raar","forks_url":"https://api.github.com/repos/radiorabe/raar/forks","keys_url":"https://api.github.com/repos/radiorabe/raar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radiorabe/raar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radiorabe/raar/teams","hooks_url":"https://api.github.com/repos/radiorabe/raar/hooks","issue_events_url":"https://api.github.com/repos/radiorabe/raar/issues/events{/number}","events_url":"https://api.github.com/repos/radiorabe/raar/events","assignees_url":"https://api.github.com/repos/radiorabe/raar/assignees{/user}","branches_url":"https://api.github.com/repos/radiorabe/raar/branches{/branch}","tags_url":"https://api.github.com/repos/radiorabe/raar/tags","blobs_url":"https://api.github.com/repos/radiorabe/raar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radiorabe/raar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radiorabe/raar/git/refs{/sha}","trees_url":"https://api.github.com/repos/radiorabe/raar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radiorabe/raar/statuses/{sha}","languages_url":"https://api.github.com/repos/radiorabe/raar/languages","stargazers_url":"https://api.github.com/repos/radiorabe/raar/stargazers","contributors_url":"https://api.github.com/repos/radiorabe/raar/contributors","subscribers_url":"https://api.github.com/repos/radiorabe/raar/subscribers","subscription_url":"https://api.github.com/repos/radiorabe/raar/subscription","commits_url":"https://api.github.com/repos/radiorabe/raar/commits{/sha}","git_commits_url":"https://api.github.com/repos/radiorabe/raar/git/commits{/sha}","comments_url":"https://api.github.com/repos/radiorabe/raar/comments{/number}","issue_comment_url":"https://api.github.com/repos/radiorabe/raar/issues/comments{/number}","contents_url":"https://api.github.com/repos/radiorabe/raar/contents/{+path}","compare_url":"https://api.github.com/repos/radiorabe/raar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radiorabe/raar/merges","archive_url":"https://api.github.com/repos/radiorabe/raar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radiorabe/raar/downloads","issues_url":"https://api.github.com/repos/radiorabe/raar/issues{/number}","pulls_url":"https://api.github.com/repos/radiorabe/raar/pulls{/number}","milestones_url":"https://api.github.com/repos/radiorabe/raar/milestones{/number}","notifications_url":"https://api.github.com/repos/radiorabe/raar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radiorabe/raar/labels{/name}","releases_url":"https://api.github.com/repos/radiorabe/raar/releases{/id}","deployments_url":"https://api.github.com/repos/radiorabe/raar/deployments","created_at":"2015-11-25T21:06:54Z","updated_at":"2018-02-06T10:43:10Z","pushed_at":"2018-02-06T19:48:17Z","git_url":"git://github.com/radiorabe/raar.git","ssh_url":"git@github.com:radiorabe/raar.git","clone_url":"https://github.com/radiorabe/raar.git","svn_url":"https://github.com/radiorabe/raar","homepage":"","size":780,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":1,"open_issues":0,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/1"},"html":{"href":"https://github.com/radiorabe/raar/pull/1"},"issue":{"href":"https://api.github.com/repos/radiorabe/raar/issues/1"},"comments":{"href":"https://api.github.com/repos/radiorabe/raar/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radiorabe/raar/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/radiorabe/raar/statuses/4b43d9a3a1ee9489f0f0300627ef0eab135d85d3"}},"author_association":"OWNER"}}
{"actor":{"display_login":"hairmare"}}