以下是我的kitchen.yml
---
driver:
name: vagrant
provisioner:
name: chef_zero
# You may wish to disable always updating cookbooks in CI or other testing environments.
# For example:
# always_update_cookbooks: <%= !ENV['CI'] %>
always_update_cookbooks: true
verifier:
name: inspec
platforms:
- name: centos-7
suites:
- name: default
driver:
network:
- ["forwarded_port", {guest: 3000, host: 3000}]
run_list:
- recipe[meteor-app::default]
verifier:
inspec_tests:
- test/smoke/default
attributes:
然后我将访客端口号更改为以下
network:
- ["forwarded_port", {guest: 4500, host: 3000}]
有没有更好的方法来更新我的实例而不重新创建它。
答案 0 :(得分:2)
正如评论中所提到的,在Kitchen中没有正式的方法可以做到这一点。您可以直接进行操作并直接运行相关的vagrant命令,但最好只需kitchen destroy
并重建实例。