Test kitchen 测试厨房、商店凭证
使用测试厨房,在yaml配置中。。。哪里是存储适用于多个平台和多个套件的全球使用属性的最佳位置 以my.kitchen.yml为例:Test kitchen 测试厨房、商店凭证,test-kitchen,chefdk,Test Kitchen,Chefdk,使用测试厨房,在yaml配置中。。。哪里是存储适用于多个平台和多个套件的全球使用属性的最佳位置 以my.kitchen.yml为例: --- provisioner: name: chef_solo platforms: - name: centos-6.5 driver: name: vagrant - name: amazon driver: name: ec2 image_id: ami-ed8e9284 fl
---
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: <snip>
ssh_key: <snip>
availability_zone: us-east-1a
subnet_id: subnet-<snip>
require_chef_omnibus: true
iam_profile_name: <snip>
ebs_delete_on_termination: true
security_group_ids: sg-<snip>
# area in question (does not work here)
attributes:
teamcity:
server: 'build.example.com'
port: 80
username: 'example'
password: 'example'
# end area in question
suites:
- name: resin4
run_list:
- recipe[example_server::resin4]
- recipe[example_server::deploy_all_artifacts]
- name: deploy
run_list:
- recipe[example_server::deploy_all_artifacts]
- name: default
run_list:
- recipe[example_server::elasticsearch]
- recipe[example_server::resin4]
- recipe[example_server::deploy_all_artifacts]
---
供应人:
姓名:厨师长
平台:
-名称:centos-6.5
司机:
姓名:流浪汉
-名称:亚马逊
司机:
姓名:ec2
图像id:ami-ed8e9284
风味:t2。中等
aws\u ssh\u密钥\u id:
ssh_密钥:
可用区域:us-east-1a
子网\u id:子网-
需要厨师长综合:正确
iam_配置文件_名称:
ebs\u终止时删除\u:真
安全组标识:sg-
#问题区域(此处不适用)
属性:
团队城市:
服务器:“build.example.com”
港口:80
用户名:“示例”
密码:“示例”
#有问题的终端区域
套房:
-姓名:resin4
运行列表:
-配方[示例\服务器::resin4]
-配方[示例\u服务器::部署所有\u工件]
-名称:部署
运行列表:
-配方[示例\u服务器::部署所有\u工件]
-名称:默认值
运行列表:
-配方[示例服务器::elasticsearch]
-配方[示例\服务器::resin4]
-配方[示例\u服务器::部署所有\u工件]
我知道还有其他厨房文件,比如~/kitchen/config.yml和.kitchen.local.yml,但我一直无法找到一个方法来获取应用于所有平台和套件的属性。将属性复制和粘贴到平台是最好的方法吗?是否有理由在kitchen的yaml中指定这些属性而不是
配方[示例\u服务器::部署\u所有\u工件]
?如有必要,您可以在厨房设置覆盖
此外,这篇文章可能会有所帮助:这正是我写这篇文章后所做的。谢谢