{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/43267742","id":43267742,"diff_hunk":"@@ -0,0 +1,32 @@\n+# Amazon Web Services - Elastic Compute Cloud (EC2)\n+\n+EC2 is a \"web service that provides resizable compute capacity in the cloud.\"\n+\n+[EC2 site](https://aws.amazon.com/ec2/).\n+\n+# AWS Keys\n+\n+For any particular Beaker run, a new AWS key with a name of the form\n+\n+    Beaker-<username>-<sanitized_hostname>-<aws_keyname_modifier>-<readable_timestamp>\n+\n+will be created at the beginning of the run, & cleaned up at the end of the run.\n+\n+Everything up to _aws_keyname_modifier_ will be the same if run from the same\n+user on the same machine no matter when it's run.\n+\n+_readable_timestamp_'s most fine grained unit is seconds. This means that if you\n+have two Beaker runs kick off in the same second on the same host (which can\n+happen often in CI environments), you can get collisions.  This will show\n+itself through the `AWS::EC2::Errors::InvalidKeyPair::Duplicate` exception.\n+\n+The way to deal with this is to use the _aws_keyname_modifier_ variable.\n+\n+You can set the _aws_keyname_modifier_ variable in the host file in the options\n+section:\n+\n+    CONFIG:\n+      aws_keyname_modifier => unique_value,\n+\n+In CI systems, setting this to something like job name would make it unique enough","path":"docs/hypervisors/aws.md","position":31,"original_position":31,"commit_id":"f6bc68478b8e8ffcf29d80de44150b64ba44a6e3","original_commit_id":"f6bc68478b8e8ffcf29d80de44150b64ba44a6e3","user":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"body":"Is JOB_NAME, what is recommended here? I'm a bit wary, so I went and tested what that string results to in our tests. Here is a JOB_NAME from one of our master runs:\r\n\r\n```\r\n+ echo 'Testing JOB_NAME'\r\nTesting JOB_NAME\r\n+ echo enterprise_puppetdb_integration-system-puppetdb_full-master/INSTALL_TYPE=install,LAYOUT=ec2-west-el7-64mda-el7-64a,PUPPETDB_DATABASE=embedded_db,label=beaker\r\nenterprise_puppetdb_integration-system-puppetdb_full-master/INSTALL_TYPE=install,LAYOUT=ec2-west-el7-64mda-el7-64a,PUPPETDB_DATABASE=embedded_db,label=beaker\r\n```\r\n\r\nI'm not sure from memory what the rules are but we need to make sure this is going to be a valid resultant string that AWS would accept as a keypair name. I notice already we are being cautious around hostnames, and replacing the dots with hyphens from the hostname in #key_name_prefix. Those strings can sometimes contain weird stuff also.\r\n\r\nSomething to notice here, is that there is no other uniqueness element in JOB_NAME, the job number doesn't get included for example. If two jobs are running in parallel, they can still collide if JOB_NAME is the only thing used, and the tests start in the same second.","created_at":"2015-10-28T15:07:29Z","updated_at":"2015-10-28T15:07:29Z","html_url":"https://github.com/puppetlabs/beaker/pull/998#discussion_r43267742","pull_request_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/998","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments/43267742"},"html":{"href":"https://github.com/puppetlabs/beaker/pull/998#discussion_r43267742"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/998"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/beaker/pulls/998","id":48906546,"html_url":"https://github.com/puppetlabs/beaker/pull/998","diff_url":"https://github.com/puppetlabs/beaker/pull/998.diff","patch_url":"https://github.com/puppetlabs/beaker/pull/998.patch","issue_url":"https://api.github.com/repos/puppetlabs/beaker/issues/998","number":998,"state":"open","locked":false,"title":"(BKR-598) added :aws_key_modifier property","user":{"login":"kevpl","id":8973629,"avatar_url":"https://avatars.githubusercontent.com/u/8973629?v=3","gravatar_id":"","url":"https://api.github.com/users/kevpl","html_url":"https://github.com/kevpl","followers_url":"https://api.github.com/users/kevpl/followers","following_url":"https://api.github.com/users/kevpl/following{/other_user}","gists_url":"https://api.github.com/users/kevpl/gists{/gist_id}","starred_url":"https://api.github.com/users/kevpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevpl/subscriptions","organizations_url":"https://api.github.com/users/kevpl/orgs","repos_url":"https://api.github.com/users/kevpl/repos","events_url":"https://api.github.com/users/kevpl/events{/privacy}","received_events_url":"https://api.github.com/users/kevpl/received_events","type":"User","site_admin":false},"body":"This property allows the user to make the AWS EC2 key name unique in their\r\nBeaker runs. This property can be set from the CONFIG section of the hosts\r\nfile.","created_at":"2015-10-27T17:44:45Z","updated_at":"2015-10-28T15:07:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a100926227a8d600e16053317eded3b152a24314","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/998/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/998/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/beaker/issues/998/comments","statuses_url":"https://api.github.com/repos/puppetlabs/beaker/statuses/f6bc68478b8e8ffcf29d80de44150b64ba44a6e3","head":{"label":"kevpl:bkr598_aws_keymod","ref":"bkr598_aws_keymod","sha":"f6bc68478b8e8ffcf29d80de44150b64ba44a6e3","user":{"login":"kevpl","id":8973629,"avatar_url":"https://avatars.githubusercontent.com/u/8973629?v=3","gravatar_id":"","url":"https://api.github.com/users/kevpl","html_url":"https://github.com/kevpl","followers_url":"https://api.github.com/users/kevpl/followers","following_url":"https://api.github.com/users/kevpl/following{/other_user}","gists_url":"https://api.github.com/users/kevpl/gists{/gist_id}","starred_url":"https://api.github.com/users/kevpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevpl/subscriptions","organizations_url":"https://api.github.com/users/kevpl/orgs","repos_url":"https://api.github.com/users/kevpl/repos","events_url":"https://api.github.com/users/kevpl/events{/privacy}","received_events_url":"https://api.github.com/users/kevpl/received_events","type":"User","site_admin":false},"repo":{"id":24955690,"name":"beaker","full_name":"kevpl/beaker","owner":{"login":"kevpl","id":8973629,"avatar_url":"https://avatars.githubusercontent.com/u/8973629?v=3","gravatar_id":"","url":"https://api.github.com/users/kevpl","html_url":"https://github.com/kevpl","followers_url":"https://api.github.com/users/kevpl/followers","following_url":"https://api.github.com/users/kevpl/following{/other_user}","gists_url":"https://api.github.com/users/kevpl/gists{/gist_id}","starred_url":"https://api.github.com/users/kevpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevpl/subscriptions","organizations_url":"https://api.github.com/users/kevpl/orgs","repos_url":"https://api.github.com/users/kevpl/repos","events_url":"https://api.github.com/users/kevpl/events{/privacy}","received_events_url":"https://api.github.com/users/kevpl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kevpl/beaker","description":"Puppet acceptance testing harness","fork":true,"url":"https://api.github.com/repos/kevpl/beaker","forks_url":"https://api.github.com/repos/kevpl/beaker/forks","keys_url":"https://api.github.com/repos/kevpl/beaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kevpl/beaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kevpl/beaker/teams","hooks_url":"https://api.github.com/repos/kevpl/beaker/hooks","issue_events_url":"https://api.github.com/repos/kevpl/beaker/issues/events{/number}","events_url":"https://api.github.com/repos/kevpl/beaker/events","assignees_url":"https://api.github.com/repos/kevpl/beaker/assignees{/user}","branches_url":"https://api.github.com/repos/kevpl/beaker/branches{/branch}","tags_url":"https://api.github.com/repos/kevpl/beaker/tags","blobs_url":"https://api.github.com/repos/kevpl/beaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kevpl/beaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kevpl/beaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/kevpl/beaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kevpl/beaker/statuses/{sha}","languages_url":"https://api.github.com/repos/kevpl/beaker/languages","stargazers_url":"https://api.github.com/repos/kevpl/beaker/stargazers","contributors_url":"https://api.github.com/repos/kevpl/beaker/contributors","subscribers_url":"https://api.github.com/repos/kevpl/beaker/subscribers","subscription_url":"https://api.github.com/repos/kevpl/beaker/subscription","commits_url":"https://api.github.com/repos/kevpl/beaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/kevpl/beaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/kevpl/beaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/kevpl/beaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/kevpl/beaker/contents/{+path}","compare_url":"https://api.github.com/repos/kevpl/beaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kevpl/beaker/merges","archive_url":"https://api.github.com/repos/kevpl/beaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kevpl/beaker/downloads","issues_url":"https://api.github.com/repos/kevpl/beaker/issues{/number}","pulls_url":"https://api.github.com/repos/kevpl/beaker/pulls{/number}","milestones_url":"https://api.github.com/repos/kevpl/beaker/milestones{/number}","notifications_url":"https://api.github.com/repos/kevpl/beaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kevpl/beaker/labels{/name}","releases_url":"https://api.github.com/repos/kevpl/beaker/releases{/id}","created_at":"2014-10-08T18:55:37Z","updated_at":"2015-10-13T22:57:59Z","pushed_at":"2015-10-27T17:57:45Z","git_url":"git://github.com/kevpl/beaker.git","ssh_url":"git@github.com:kevpl/beaker.git","clone_url":"https://github.com/kevpl/beaker.git","svn_url":"https://github.com/kevpl/beaker","homepage":null,"size":11749,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"3558e0bf52ee656d59842b7869decfb1b7046746","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":12164675,"name":"beaker","full_name":"puppetlabs/beaker","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/beaker","description":"Puppet Acceptance Testing Harness","fork":false,"url":"https://api.github.com/repos/puppetlabs/beaker","forks_url":"https://api.github.com/repos/puppetlabs/beaker/forks","keys_url":"https://api.github.com/repos/puppetlabs/beaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/beaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/beaker/teams","hooks_url":"https://api.github.com/repos/puppetlabs/beaker/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/beaker/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/beaker/events","assignees_url":"https://api.github.com/repos/puppetlabs/beaker/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/beaker/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/beaker/tags","blobs_url":"https://api.github.com/repos/puppetlabs/beaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/beaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/beaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/beaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/beaker/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/beaker/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/beaker/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/beaker/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/beaker/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/beaker/subscription","commits_url":"https://api.github.com/repos/puppetlabs/beaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/beaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/beaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/beaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/beaker/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/beaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/beaker/merges","archive_url":"https://api.github.com/repos/puppetlabs/beaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/beaker/downloads","issues_url":"https://api.github.com/repos/puppetlabs/beaker/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/beaker/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/beaker/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/beaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/beaker/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/beaker/releases{/id}","created_at":"2013-08-16T17:57:03Z","updated_at":"2015-10-28T14:54:34Z","pushed_at":"2015-10-28T15:00:24Z","git_url":"git://github.com/puppetlabs/beaker.git","ssh_url":"git@github.com:puppetlabs/beaker.git","clone_url":"https://github.com/puppetlabs/beaker.git","svn_url":"https://github.com/puppetlabs/beaker","homepage":"https://groups.google.com/forum/#!forum/puppet-beaker","size":20752,"stargazers_count":207,"watchers_count":207,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":171,"mirror_url":null,"open_issues_count":10,"forks":171,"open_issues":10,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/998"},"html":{"href":"https://github.com/puppetlabs/beaker/pull/998"},"issue":{"href":"https://api.github.com/repos/puppetlabs/beaker/issues/998"},"comments":{"href":"https://api.github.com/repos/puppetlabs/beaker/issues/998/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/998/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/beaker/pulls/998/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/beaker/statuses/f6bc68478b8e8ffcf29d80de44150b64ba44a6e3"}}}}