Vagrant CHEF 和 EC2
Vagrant CHEF and EC2
我正在使用 Vagrant 创建 EC2 VM。我的供应商是 CHEF。
我当前的挑战是如何在配置时检索 VM public 名称。
我发现 Ohai 正在捕获 EC2 元数据并且它在配置期间可用。这很棒。但是,我似乎无法让 Ohai 捕获元数据。
根据 this article,我需要创建 ec2 提示文件。
将命令添加到我的 CHEF 食谱中,但没有用。
创建提示文件的正确时机是什么?代码片段将不胜感激。
Tensibai 评论很有帮助。它回答了我的问题:
Use the shell provisionner of vagrant to create the file as per the documentation, before the the chef provisionner block, so it will be done before chef start...
我正在使用 Vagrant 创建 EC2 VM。我的供应商是 CHEF。
我当前的挑战是如何在配置时检索 VM public 名称。
我发现 Ohai 正在捕获 EC2 元数据并且它在配置期间可用。这很棒。但是,我似乎无法让 Ohai 捕获元数据。
根据 this article,我需要创建 ec2 提示文件。
将命令添加到我的 CHEF 食谱中,但没有用。
创建提示文件的正确时机是什么?代码片段将不胜感激。
Tensibai 评论很有帮助。它回答了我的问题:
Use the shell provisionner of vagrant to create the file as per the documentation, before the the chef provisionner block, so it will be done before chef start...