我试图让KitchenCI在我的Amazon中构建测试实例。但是,当Vagrant尝试连接到ec2实例时,它使用实例的外部(公共) IP与内部(VPC) IP。在瓦格兰特有什么办法改变这一点吗?
.kitchen.yml:
---
provisioner:
name: chef_solo
platforms:
- name: centos-6.5
driver:
name: vagrant
- name: amazon
driver:
name: ec2
image_id: ami-ed8e9284
flavor_id: t2.medium
aws_ssh_key_id: DevOps
ssh_key: /Users/djimenez/.ssh/devops_rsa.pub
availability_zone: us-east-1a
subnet_id: subnet-1903a976
require_chef_omnibus: true
iam_profile_name: atc
ebs_delete_on_termination: true
security_group_ids: sg-7461ae1b
suites:
<snip>发布于 2015-03-06 22:12:18
看起来我需要将以下内容添加到我的.kitchen.yml中:
driver:
name: ec2
interface: private文档说:
接口 导出与实例通信的主机名的位置。可能是dns,公共的或私有的。如果取消设置,驱动程序将按以下顺序返回失败,从而派生主机名:
默认设置为unset。
https://stackoverflow.com/questions/28659772
复制相似问题