Created
October 31, 2014 15:53
-
-
Save gavinrogers/4941fe8a1aee004881ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only ignored when associate_public_ip_address is set. i.e. with the following config it can ssh in just fine (but yum doesn't work obviously): | |
{ | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"access_key": "redacted", | |
"secret_key": "redacted", | |
"region": "eu-west-1", | |
"source_ami": "ami-8cff51fb", | |
"instance_type": "t2.micro", | |
"ssh_username": "ec2-user", | |
"ami_name": "packer_puppet {{timestamp}}", | |
"ssh_private_ip": true, | |
"subnet_id": "subnet-98fafbde", | |
"security_group_id": "sg-869e5de3", | |
"vpc_id": "vpc-273cd342", | |
"ssh_timeout": "5m" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"script": "setup_things.sh" | |
} | |
] | |
} | |
When I change the config to this (attempting to allow yum to do its thing during provisioning): | |
{ | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"access_key": "redacted", | |
"secret_key": "redacted", | |
"region": "eu-west-1", | |
"source_ami": "ami-8cff51fb", | |
"instance_type": "t2.micro", | |
"ssh_username": "ec2-user", | |
"ami_name": "packer_puppet {{timestamp}}", | |
"ssh_private_ip": true, | |
"subnet_id": "subnet-98fafbde", | |
"security_group_id": "sg-869e5de3", | |
"vpc_id": "vpc-273cd342", | |
"associate_public_ip_address": true, | |
"ssh_timeout": "5m" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"script": "setup_things.sh" | |
} | |
] | |
} | |
It fails: | |
2014/10/31 15:39:00 ui: ==> amazon-ebs: Waiting for instance (i-170c1c55) to become ready... | |
2014/10/31 15:39:00 packer-builder-amazon-ebs: 2014/10/31 15:39:00 Waiting for state to become: running | |
2014/10/31 15:39:00 packer-builder-amazon-ebs: 2014/10/31 15:39:00 Allowing 300s to complete (change with AWS_TIMEOUT_SECONDS) | |
2014/10/31 15:39:17 ui: amazon-ebs: Public DNS: ec2-54-72-189-72.eu-west-1.compute.amazonaws.com | |
2014/10/31 15:39:17 ui: amazon-ebs: Public IP: 54.72.189.72 | |
2014/10/31 15:39:17 ui: amazon-ebs: Private IP: 10.10.30.12 | |
2014/10/31 15:39:17 ui: ask: ==> amazon-ebs: Pausing after run of step 'StepRunSourceInstance'. Press enter to continue. | |
2014/10/31 15:40:39 ui: scan err: unexpected newline | |
2014/10/31 15:40:39 packer-builder-amazon-ebs: 2014/10/31 15:40:39 Waiting for SSH, up to timeout: 5m0s | |
2014/10/31 15:40:39 ui: ==> amazon-ebs: Waiting for SSH to become available... | |
2014/10/31 15:40:54 packer-builder-amazon-ebs: 2014/10/31 15:40:54 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:41:14 packer-builder-amazon-ebs: 2014/10/31 15:41:14 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:41:34 packer-builder-amazon-ebs: 2014/10/31 15:41:34 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:41:55 packer-builder-amazon-ebs: 2014/10/31 15:41:55 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:42:15 packer-builder-amazon-ebs: 2014/10/31 15:42:15 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:42:35 packer-builder-amazon-ebs: 2014/10/31 15:42:35 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:42:55 packer-builder-amazon-ebs: 2014/10/31 15:42:55 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:43:15 packer-builder-amazon-ebs: 2014/10/31 15:43:15 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:43:35 packer-builder-amazon-ebs: 2014/10/31 15:43:35 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:43:56 packer-builder-amazon-ebs: 2014/10/31 15:43:56 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:44:16 packer-builder-amazon-ebs: 2014/10/31 15:44:16 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:44:36 packer-builder-amazon-ebs: 2014/10/31 15:44:36 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:44:56 packer-builder-amazon-ebs: 2014/10/31 15:44:56 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:45:16 packer-builder-amazon-ebs: 2014/10/31 15:45:16 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:45:37 packer-builder-amazon-ebs: 2014/10/31 15:45:37 TCP connection to SSH ip/port failed: dial tcp 54.72.189.72:22: i/o timeout | |
2014/10/31 15:45:39 ui error: ==> amazon-ebs: Timeout waiting for SSH. | |
2014/10/31 15:45:39 packer-builder-amazon-ebs: 2014/10/31 15:45:39 SSH wait cancelled. Exiting loop. | |
2014/10/31 15:45:39 ui: ask: ==> amazon-ebs: Pausing before cleanup of step 'StepRunSourceInstance'. Press enter to continue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment