{"action":"created","comment":{"url":"https://api.github.com/repos/michaelsauter/crane/pulls/comments/27249453","id":27249453,"diff_hunk":"@@ -192,6 +192,25 @@ This could be used like so: `crane provision service1`, `crane run -v databases`\n \n When using targets, it is also possible to cascade the commands to related containers. There are 2 different flags, `--cascade-affected` and `--cascade-dependencies`. In our example configuration above, when targeting the `mysql` container, the `apache` container would be considered to be \"affected\". When targeting the `apache` container, the `mysql` container would be considered as a \"dependency\". Both flags take a string argument, which specifies which type of cascading is desired, options are `volumesFrom`, `link`, `net` and `all`.\n \n+### YAML advanced usage\n+YAML gives you some advanced features like [alias](http://www.yaml.org/spec/1.2/spec.html#id2786196) and [merge](http://yaml.org/type/merge.html). They allow you to easily avoid duplicated code in your `crane.yml` file. As a example, imagine you need to define 2 different containers: `web` and `admin`. They share almost the same configuration but the `cmd` declaration. And imagine you also need 2 instances for each one for using with a node balancer. Then you can declare them as simply:\n+\n+```\n+containers:\n+  web1: &web\n+    image: my-web-app\n+    run: &web-run\n+      link: [\"db:db\"]\n+      ...\n+      cmd: web\n+  web2: *web\n+\n+  admin1: &admin { <<: *web, run: { <<: *web-run , cmd: admin }}\n+  admin2: *admin\n+```\n+\n+As a summary, `&anchor` declares the anchor property, `*alias` is the alias indicator to simply copy the mapping it references, and `<<: *merge` includes all the mapping but let you to override some keys.","path":"README.md","position":21,"original_position":21,"commit_id":"bd0e578cac58bd2d7af4ba79c0dda2dbb017d40f","original_commit_id":"bd0e578cac58bd2d7af4ba79c0dda2dbb017d40f","user":{"login":"bjaglin","id":349077,"avatar_url":"https://avatars.githubusercontent.com/u/349077?v=3","gravatar_id":"","url":"https://api.github.com/users/bjaglin","html_url":"https://github.com/bjaglin","followers_url":"https://api.github.com/users/bjaglin/followers","following_url":"https://api.github.com/users/bjaglin/following{/other_user}","gists_url":"https://api.github.com/users/bjaglin/gists{/gist_id}","starred_url":"https://api.github.com/users/bjaglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjaglin/subscriptions","organizations_url":"https://api.github.com/users/bjaglin/orgs","repos_url":"https://api.github.com/users/bjaglin/repos","events_url":"https://api.github.com/users/bjaglin/events{/privacy}","received_events_url":"https://api.github.com/users/bjaglin/received_events","type":"User","site_admin":false},"body":"let you override some keys","created_at":"2015-03-26T19:53:23Z","updated_at":"2015-03-26T19:53:23Z","html_url":"https://github.com/michaelsauter/crane/pull/165#discussion_r27249453","pull_request_url":"https://api.github.com/repos/michaelsauter/crane/pulls/165","_links":{"self":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/comments/27249453"},"html":{"href":"https://github.com/michaelsauter/crane/pull/165#discussion_r27249453"},"pull_request":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/165"}}},"pull_request":{"url":"https://api.github.com/repos/michaelsauter/crane/pulls/165","id":31869958,"html_url":"https://github.com/michaelsauter/crane/pull/165","diff_url":"https://github.com/michaelsauter/crane/pull/165.diff","patch_url":"https://github.com/michaelsauter/crane/pull/165.patch","issue_url":"https://api.github.com/repos/michaelsauter/crane/issues/165","number":165,"state":"open","locked":false,"title":"Update README.md to include YAML advanced features","user":{"login":"adrianhurt","id":1089650,"avatar_url":"https://avatars.githubusercontent.com/u/1089650?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhurt","html_url":"https://github.com/adrianhurt","followers_url":"https://api.github.com/users/adrianhurt/followers","following_url":"https://api.github.com/users/adrianhurt/following{/other_user}","gists_url":"https://api.github.com/users/adrianhurt/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhurt/subscriptions","organizations_url":"https://api.github.com/users/adrianhurt/orgs","repos_url":"https://api.github.com/users/adrianhurt/repos","events_url":"https://api.github.com/users/adrianhurt/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhurt/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-24T21:06:24Z","updated_at":"2015-03-26T19:53:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30c0931fd42dcdd17284eebe4e3f69ad79c24fe9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/michaelsauter/crane/pulls/165/commits","review_comments_url":"https://api.github.com/repos/michaelsauter/crane/pulls/165/comments","review_comment_url":"https://api.github.com/repos/michaelsauter/crane/pulls/comments{/number}","comments_url":"https://api.github.com/repos/michaelsauter/crane/issues/165/comments","statuses_url":"https://api.github.com/repos/michaelsauter/crane/statuses/bd0e578cac58bd2d7af4ba79c0dda2dbb017d40f","head":{"label":"adrianhurt:patch-1","ref":"patch-1","sha":"bd0e578cac58bd2d7af4ba79c0dda2dbb017d40f","user":{"login":"adrianhurt","id":1089650,"avatar_url":"https://avatars.githubusercontent.com/u/1089650?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhurt","html_url":"https://github.com/adrianhurt","followers_url":"https://api.github.com/users/adrianhurt/followers","following_url":"https://api.github.com/users/adrianhurt/following{/other_user}","gists_url":"https://api.github.com/users/adrianhurt/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhurt/subscriptions","organizations_url":"https://api.github.com/users/adrianhurt/orgs","repos_url":"https://api.github.com/users/adrianhurt/repos","events_url":"https://api.github.com/users/adrianhurt/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhurt/received_events","type":"User","site_admin":false},"repo":{"id":32823691,"name":"crane","full_name":"adrianhurt/crane","owner":{"login":"adrianhurt","id":1089650,"avatar_url":"https://avatars.githubusercontent.com/u/1089650?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianhurt","html_url":"https://github.com/adrianhurt","followers_url":"https://api.github.com/users/adrianhurt/followers","following_url":"https://api.github.com/users/adrianhurt/following{/other_user}","gists_url":"https://api.github.com/users/adrianhurt/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianhurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianhurt/subscriptions","organizations_url":"https://api.github.com/users/adrianhurt/orgs","repos_url":"https://api.github.com/users/adrianhurt/repos","events_url":"https://api.github.com/users/adrianhurt/events{/privacy}","received_events_url":"https://api.github.com/users/adrianhurt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrianhurt/crane","description":"Crane - Lift containers with ease","fork":true,"url":"https://api.github.com/repos/adrianhurt/crane","forks_url":"https://api.github.com/repos/adrianhurt/crane/forks","keys_url":"https://api.github.com/repos/adrianhurt/crane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrianhurt/crane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrianhurt/crane/teams","hooks_url":"https://api.github.com/repos/adrianhurt/crane/hooks","issue_events_url":"https://api.github.com/repos/adrianhurt/crane/issues/events{/number}","events_url":"https://api.github.com/repos/adrianhurt/crane/events","assignees_url":"https://api.github.com/repos/adrianhurt/crane/assignees{/user}","branches_url":"https://api.github.com/repos/adrianhurt/crane/branches{/branch}","tags_url":"https://api.github.com/repos/adrianhurt/crane/tags","blobs_url":"https://api.github.com/repos/adrianhurt/crane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrianhurt/crane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrianhurt/crane/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrianhurt/crane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrianhurt/crane/statuses/{sha}","languages_url":"https://api.github.com/repos/adrianhurt/crane/languages","stargazers_url":"https://api.github.com/repos/adrianhurt/crane/stargazers","contributors_url":"https://api.github.com/repos/adrianhurt/crane/contributors","subscribers_url":"https://api.github.com/repos/adrianhurt/crane/subscribers","subscription_url":"https://api.github.com/repos/adrianhurt/crane/subscription","commits_url":"https://api.github.com/repos/adrianhurt/crane/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrianhurt/crane/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrianhurt/crane/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrianhurt/crane/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrianhurt/crane/contents/{+path}","compare_url":"https://api.github.com/repos/adrianhurt/crane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrianhurt/crane/merges","archive_url":"https://api.github.com/repos/adrianhurt/crane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrianhurt/crane/downloads","issues_url":"https://api.github.com/repos/adrianhurt/crane/issues{/number}","pulls_url":"https://api.github.com/repos/adrianhurt/crane/pulls{/number}","milestones_url":"https://api.github.com/repos/adrianhurt/crane/milestones{/number}","notifications_url":"https://api.github.com/repos/adrianhurt/crane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrianhurt/crane/labels{/name}","releases_url":"https://api.github.com/repos/adrianhurt/crane/releases{/id}","created_at":"2015-03-24T20:36:21Z","updated_at":"2015-03-26T14:39:10Z","pushed_at":"2015-03-26T14:39:10Z","git_url":"git://github.com/adrianhurt/crane.git","ssh_url":"git@github.com:adrianhurt/crane.git","clone_url":"https://github.com/adrianhurt/crane.git","svn_url":"https://github.com/adrianhurt/crane","homepage":null,"size":2464,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"michaelsauter:master","ref":"master","sha":"9e7207b40e333ba7527cd0c130b88754efad650d","user":{"login":"michaelsauter","id":215455,"avatar_url":"https://avatars.githubusercontent.com/u/215455?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsauter","html_url":"https://github.com/michaelsauter","followers_url":"https://api.github.com/users/michaelsauter/followers","following_url":"https://api.github.com/users/michaelsauter/following{/other_user}","gists_url":"https://api.github.com/users/michaelsauter/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsauter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsauter/subscriptions","organizations_url":"https://api.github.com/users/michaelsauter/orgs","repos_url":"https://api.github.com/users/michaelsauter/repos","events_url":"https://api.github.com/users/michaelsauter/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsauter/received_events","type":"User","site_admin":false},"repo":{"id":14361608,"name":"crane","full_name":"michaelsauter/crane","owner":{"login":"michaelsauter","id":215455,"avatar_url":"https://avatars.githubusercontent.com/u/215455?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsauter","html_url":"https://github.com/michaelsauter","followers_url":"https://api.github.com/users/michaelsauter/followers","following_url":"https://api.github.com/users/michaelsauter/following{/other_user}","gists_url":"https://api.github.com/users/michaelsauter/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsauter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsauter/subscriptions","organizations_url":"https://api.github.com/users/michaelsauter/orgs","repos_url":"https://api.github.com/users/michaelsauter/repos","events_url":"https://api.github.com/users/michaelsauter/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsauter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michaelsauter/crane","description":"Crane - Lift containers with ease","fork":false,"url":"https://api.github.com/repos/michaelsauter/crane","forks_url":"https://api.github.com/repos/michaelsauter/crane/forks","keys_url":"https://api.github.com/repos/michaelsauter/crane/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaelsauter/crane/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaelsauter/crane/teams","hooks_url":"https://api.github.com/repos/michaelsauter/crane/hooks","issue_events_url":"https://api.github.com/repos/michaelsauter/crane/issues/events{/number}","events_url":"https://api.github.com/repos/michaelsauter/crane/events","assignees_url":"https://api.github.com/repos/michaelsauter/crane/assignees{/user}","branches_url":"https://api.github.com/repos/michaelsauter/crane/branches{/branch}","tags_url":"https://api.github.com/repos/michaelsauter/crane/tags","blobs_url":"https://api.github.com/repos/michaelsauter/crane/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaelsauter/crane/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaelsauter/crane/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaelsauter/crane/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaelsauter/crane/statuses/{sha}","languages_url":"https://api.github.com/repos/michaelsauter/crane/languages","stargazers_url":"https://api.github.com/repos/michaelsauter/crane/stargazers","contributors_url":"https://api.github.com/repos/michaelsauter/crane/contributors","subscribers_url":"https://api.github.com/repos/michaelsauter/crane/subscribers","subscription_url":"https://api.github.com/repos/michaelsauter/crane/subscription","commits_url":"https://api.github.com/repos/michaelsauter/crane/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaelsauter/crane/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaelsauter/crane/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaelsauter/crane/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaelsauter/crane/contents/{+path}","compare_url":"https://api.github.com/repos/michaelsauter/crane/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaelsauter/crane/merges","archive_url":"https://api.github.com/repos/michaelsauter/crane/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaelsauter/crane/downloads","issues_url":"https://api.github.com/repos/michaelsauter/crane/issues{/number}","pulls_url":"https://api.github.com/repos/michaelsauter/crane/pulls{/number}","milestones_url":"https://api.github.com/repos/michaelsauter/crane/milestones{/number}","notifications_url":"https://api.github.com/repos/michaelsauter/crane/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaelsauter/crane/labels{/name}","releases_url":"https://api.github.com/repos/michaelsauter/crane/releases{/id}","created_at":"2013-11-13T10:58:54Z","updated_at":"2015-03-26T18:00:50Z","pushed_at":"2015-03-26T14:39:10Z","git_url":"git://github.com/michaelsauter/crane.git","ssh_url":"git@github.com:michaelsauter/crane.git","clone_url":"https://github.com/michaelsauter/crane.git","svn_url":"https://github.com/michaelsauter/crane","homepage":null,"size":2464,"stargazers_count":384,"watchers_count":384,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":30,"forks":24,"open_issues":30,"watchers":384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/165"},"html":{"href":"https://github.com/michaelsauter/crane/pull/165"},"issue":{"href":"https://api.github.com/repos/michaelsauter/crane/issues/165"},"comments":{"href":"https://api.github.com/repos/michaelsauter/crane/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/michaelsauter/crane/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/michaelsauter/crane/statuses/bd0e578cac58bd2d7af4ba79c0dda2dbb017d40f"}}}}