【问题标题】:Kitchen test and reboot Vagrant boxes厨房测试并重启 Vagrant 盒子
【发布时间】:2017-07-29 07:30:46
【问题描述】:

我写了一些食谱。 现在我想在多个平台上使用厨房对其进行测试。 我想在安装 Visual Studio 之前重新启动我的 virtualbox istance。 但是当机器重新启动时,我的会话结束了,我无法安装 Visual Studio。 我使用厨师 12.5.1

是否可以安装 PowerShell 4,重新启动虚拟机,然后再次重新启动我的 run chef 并安装 visulstudio? 我说如果我从客户那里做饭怎么办,一切正常,但从厨房不工作

谢谢你

【问题讨论】:

    标签: chef-infra virtualbox recipe test-kitchen


    【解决方案1】:

    它不适用于旧版 Chef,您需要使用 12.11 或更高版本,但 Test Kitchen 通常支持此功能。相关配置器配置示例:

    provisioner:
      name: chef_zero # or chef_solo
      require_chef_omnibus: 12.11 # need the RFC 062 exit codes
      retry_on_exit_code:
        - 35 # 35 is the exit code signaling that the node is rebooting
      max_retries: 1
      client_rb:
        exit_status: :enabled # Opt-in to the standardized exit codes
        client_fork: false  # Forked instances don't return the real exit code
    

    【讨论】:

    • 谢谢。我尝试使用 chef 12.11.8,这是错误:异常类:Kitchen::ActionFailed 无法完成收敛操作。现在有什么问题?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多