我正在尝试使用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]"
也许我错过了一些东西,因为我找不到任何关于如何做到这一点的好教程我也使用厨师独奏和流浪汉。
答案 0 :(得分:0)
如果您查看Tomcat cookbook文档,您将看到有关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文件中。