This cookbook provides various helpers for dealing with Java in Chef.
Java cookbook - This cookbook does not include_recipe "java"
, you should make sure java is installed.
java_ext::jce - installs java cryptography extensions (policies) from Oracle's web site. As in the Java cookbook, you must accept Oracle's license terms by changing the node['java']['oracle']['accept_oracle_download_terms']
attribute to true.
This LWRP will generate a self-signed keypair in a keystore. The example is pretty self explanatory.
include_recipe "java"
java_ext_keystore "/tmp/keystore" do
cert_alias "test-alias"
dn "CN=avishai ish-shalom/O=fewbytes/"
password "gargamel"
with_certificate do |c|
node.set["java_keys"]["my_cert"] = c
end
end
Attributes:
dn
- distinguinshed namekeystore_path
- name attribute, the path of the keystore filemode
- file permissions modeowner
- keystore file ownergroup
- keystore file groupcert_alias
- certificate alias in the keystorepassword
- keystore and private key password. Since the common use case is a single keystore housing a single keypair we use the same password for both.java_bin_path
- directory of java binaries. defaults to node["java"]["home_dir"]/bin
This LWRP will import a certificate into a truststore, e.g.
java_ext_truststore_certificate "test-alias" do
truststore_path "/tmp/truststore"
certificate node["java_ext"]["certificate"]
password "gargamel"
end
Attributes:
certificate
- the certificate to import in pem (rfc) formattruststore_path
- the path of the truststore filemode
- file permissions modeowner
- keystore file ownergroup
- keystore file groupcert_alias
- name attribute, certificate alias in the truststorepassword
- truststore passwordjava_bin_path
- directory of java binaries. defaults to node["java"]["home_dir"]/bin
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: Avishai Ish-Shalom License: Apache V2