我正在尝试将EC2主机添加到我的Rancher设置中。我看过this教程,但是我想使用Docker-machine。
就此而言,我做了以下事情:
MAC:~ user1$ docker-machine create -d amazonec2 --amazonec2-vpc-id vpc-84fd6de0 --amazonec2-region eu-west-1 --amazonec2-ami ami-c5f1beb6 Rancher-node-aws-01Running pre-create checks...
Creating machine...
(Rancher-node-aws-01) Launching instance...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
注意:AMI ID对应于rancheros-v0.7.0-hvm-1。
如您所见,我无法通过SSH连接到RancherOS(SSH端口在AWS上打开)。任何想法为什么会这样?
答案 0 :(得分:1)
诀窍是使用名为“牧场主”的SSH用户。所以完整的命令将是:
docker-machine create -d amazonec2 --amazonec2-vpc-id vpc-84fd6de0 --amazonec2-region eu-west-1 --amazonec2-ami ami-c5f1beb6 --amazonec2-ssh-user rancher Rancher-node-aws-01