Skip to content

Instantly share code, notes, and snippets.

@dave-tucker
Created October 8, 2015 19:37
Show Gist options
  • Save dave-tucker/e3a701bd77718fb8d7ad to your computer and use it in GitHub Desktop.
Save dave-tucker/e3a701bd77718fb8d7ad to your computer and use it in GitHub Desktop.
$ group_name="docker-networking"
$ export AWS_AMI="ami-e31a6594"
$ export AWS_DEFAULT_REGION="eu-west-1"
$ export AWS_VPC_ID="vpc-69c9a10c"
$ export AWS_SSH_USER="admin"
$ docker-machine -D create \
-d amazonec2 \
--amazonec2-security-group ${group_name} \
consul22
Running pre-create checks...
Making AWS API call with values:
{
"Action": [
"DescribeKeyPairs"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeSubnets"
],
"Filter.1.Name": [
"availabilityZone"
],
"Filter.1.Value": [
"eu-west-1a"
],
"Filter.2.Name": [
"vpc-id"
],
"Filter.2.Value": [
"vpc-69c9a10c"
],
"Version": [
"2014-06-15"
]
}
Creating machine...
Making AWS API call with values:
{
"Action": [
"DescribeKeyPairs"
],
"Version": [
"2014-06-15"
]
}
Launching instance...
creating key pair: consul22
Making AWS API call with values:
{
"Action": [
"ImportKeyPair"
],
"KeyName": [
"consul22"
],
"PublicKeyMaterial": [
"c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDMVFuNHQrVzdXdjNDWjNtRGJSVC9zU2RFUGh3K1lvWnYzaUcwWWg4RjF4TzVBRHNwMkJDTHlmZ0RaVWhSbFBIRnVxUDN5OXpFUGo3dlpaZHF1WFRpVUV5SWt4TXdJcXQvODR6cEhDa0cxZjJFZjU0RE9uc0s3eHVteFRnc2lSdVRqMlFsNHUydlMzNnd2a2RmdEc2cWZzNGFtM2J5MXErUk1GYXBGZStzVUFlZ1V6MDhmK1Nod3lzWFhHWXJJcFZmRjV0aTJZN0dER09jT0ZlM1g0V3U5MmpOdjFJQW9TVTFjQy9COVlSYUR4N3RkR3JPaFo1UUltOHIrc1ZET1IvaW10OC9VVGRxWVBvZUJHTkgydm5RbkpaV3g2Y2NSZURkMndmUjNtalFkWmZXSFRVWW52YkR0ZVlad1poVUdTaE03S09IMTVVRGJnRE9UdTZMOXZicnIK"
],
"Version": [
"2014-06-15"
]
}
configuring security group in vpc-69c9a10c
Making AWS API call with values:
{
"Action": [
"DescribeSecurityGroups"
],
"Version": [
"2014-06-15"
]
}
found existing security group (docker-networking) in vpc-69c9a10c
configuring security group authorization for 0.0.0.0/0
launching instance in subnet subnet-866726f1
Making AWS API call with values:
{
"Action": [
"RunInstances"
],
"BlockDeviceMapping.0.DeviceName": [
"/dev/sda1"
],
"BlockDeviceMapping.0.Ebs.DeleteOnTermination": [
"1"
],
"BlockDeviceMapping.0.Ebs.VolumeSize": [
"16"
],
"BlockDeviceMapping.0.Ebs.VolumeType": [
"gp2"
],
"BlockDeviceMapping.0.VirtualName": [
""
],
"ImageId": [
"ami-e31a6594"
],
"InstanceType": [
"t2.micro"
],
"KeyName": [
"consul22"
],
"MaxCount": [
"1"
],
"MinCount": [
"1"
],
"Monitoring.Enabled": [
"0"
],
"NetworkInterface.0.AssociatePublicIpAddress": [
"1"
],
"NetworkInterface.0.DeviceIndex": [
"0"
],
"NetworkInterface.0.SecurityGroupId.0": [
"sg-576fbe33"
],
"NetworkInterface.0.SubnetId": [
"subnet-866726f1"
],
"Placement.AvailabilityZone": [
"eu-west-1a"
],
"Version": [
"2014-06-15"
]
}
waiting for ip address to become available
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Got the IP Address, it's "52.30.35.2"
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
created instance ID i-249f0b9d, IP address 52.30.35.2, Private IP address 172.31.19.207
Settings tags for instance
Making AWS API call with values:
{
"Action": [
"CreateTags"
],
"ResourceId.1": [
"i-249f0b9d"
],
"Tag.1.Key": [
"Name"
],
"Tag.1.Value": [
"consul22"
],
"Version": [
"2014-06-15"
]
}
Waiting for machine to be running, this may take a few minutes...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Machine is running, waiting for SSH to be available...
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no [email protected] -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no [email protected] -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no admin@ -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no admin@ -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no admin@ -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no admin@ -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
Making AWS API call with values:
{
"Action": [
"DescribeInstances"
],
"InstanceId.1": [
"i-249f0b9d"
],
"Version": [
"2014-06-15"
]
}
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=no admin@ -i /Users/dave/.docker/machine/machines/consul22/id_rsa -p 22 exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
command : exit 0
err : exit status 255
output :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment