【问题标题】:Tomact7 chef cookbook ssl problemsTomact7 厨师食谱 ssl 问题
【发布时间】:2016-02-22 10:35:23
【问题描述】:

我正在尝试设置一个厨师食谱,以便使用 tomcat chef cookbook 通过 ssl 自动部署我的应用程序。 没有 ssl 也可以正常工作,但是当我尝试设置 ssl 支持的属性时,我得到了错误:

undefined method `truststore_password' for Custom resource tomcat_instance from cookbook tomcat.

我的角色:

name "myapp"
override_attributes ({
    "java" => { 
        "jdk_version"=> "6"
    },
    "oracle" => {
        "accept_oracle_download_terms" => true
    },
    "tomcat" => {
        "base_version" => 7,
        "java_options" => "${JAVA_OPTS} -Xmx128M -Djava.awt.headless=true",
        "secure" => true,
        "client_auth" => true,
        "scheme" => "https",
        "ssl_enabled_protocols" => "TLSv1",
        "keystore_password" => "mypass",
        "truststore_password" => "mypass",
        "ciphers" => "SSL_RSA_WITH_RC4_128_SHA",
        "keystore_file" => "/etc/tomcat7/client.jks",
        "truststore_file" => "/etc/tomcat7/cert.jks"
    }
})
run_list "recipe[java]", "recipe[tomcat]"

也许我遗漏了一些东西,因为我找不到任何关于如何做到这一点的好教程我也在使用 chef-solo 和 vagrant。

【问题讨论】:

    标签: tomcat7 chef-infra chef-solo


    【解决方案1】:

    如果您查看 Tomcat 说明书文档,您将看到有关 truststore_password 属性的以下内容:

    node['tomcat']['truststore_password'] - Generated by the secure_password method from the 
                                            openssl cookbook; if you are using Chef Solo, 
                                            set this attribute on the node
    

    这可能意味着您在使用 Chef Solo 时无法在角色定义中设置属性,您必须手动将其添加到节点属性 JSON 文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-29
      • 2021-11-01
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多