Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HWORKS-830] Configurable jvm tmp dir #1072

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions providers/configure_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,19 @@
admin_port admin_port
secure false
end

if not node['install']['tmp_directory'].eql?("")
glassfish_jvm_options "JvmOptions java.io.tmpdir" do
domain_name domain_name
admin_port admin_port
username username
password_file password_file
target target_config
secure false
options ["-Djava.io.tmpdir=#{node['install']['tmp_directory']}/glassfish"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to create the dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tmp_directory is provided and Payara will create the glassfish sub-directory

not_if "#{asadmin_cmd} list-jvm-options --target #{target_config} | grep tmpdir"
end
end
end

action :glassfish_configure_realm do
Expand Down
12 changes: 11 additions & 1 deletion recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@
group node['glassfish']['group']
end

jvm_options = [
"-DHADOOP_HOME=#{node['hops']['dir']}/hadoop",
"-DHADOOP_CONF_DIR=#{node['hops']['dir']}/hadoop/etc/hadoop",
"-Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true"
]

if not node['install']['tmp_directory'].eql?("")
jvm_options.push("-Djava.io.tmpdir=#{node['install']['tmp_directory']}/glassfish")
end

node.override = {
'java' => {
'install_flavor' => node['java']['install_flavor'],
Expand Down Expand Up @@ -241,7 +251,7 @@
'remote_access' => false,
'secure' => false,
'environment_file' => node['hopsworks']['env_var_file'],
'jvm_options' => ["-DHADOOP_HOME=#{node['hops']['dir']}/hadoop", "-DHADOOP_CONF_DIR=#{node['hops']['dir']}/hadoop/etc/hadoop", '-Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true']
'jvm_options' => jvm_options
},
'extra_libraries' => {
'jdbcdriver' => {
Expand Down