<commit_before>node.default[:java][:jdk_version]                           = 8
node.default[:java][:set_etc_environment]                   = true
node.default[:java][:install_flavor]                        = "oracle"
node.default[:java][:oracle][:accept_oracle_download_terms] = true

include_recipe "java"

node[:karamel][:default][:private_ips].each_with_index do |ip, index|
  hostsfile_entry "#{ip}" do
    hostname  "hopsworks#{index}.logicalclocks.com"
    aliases   ["hopsworks#{index}"]
    comment   "Created by karamel-chef"
    action    :create
    unique    true
  end
end

case node['platform']
when 'debian', 'ubuntu'

  ### BEGIN OF HACK

  # This is a hack to reduce the deployment time of the testing machines.
  # The default APT servers are the US ones. The next few likes overwrite
  # the mirror list putting on top the one of your region (Sweden by default)

  # Delete old sources.list file
  file "/etc/apt/sources.list" do
    user "root"
    action :delete
  end

  # Put the new one in
  template "/etc/apt/sources.list" do
    source "sources.list.erb"
    owner "root"<commit_msg>[HOPSWORKS-867] Remove Oracle JDK configuration from install recipe<commit_after>include_recipe "java"

node[:karamel][:default][:private_ips].each_with_index do |ip, index|
  hostsfile_entry "#{ip}" do
    hostname  "hopsworks#{index}.logicalclocks.com"
    aliases   ["hopsworks#{index}"]
    comment   "Created by karamel-chef"
    action    :create
    unique    true
  end
end

case node['platform']
when 'debian', 'ubuntu'

  ### BEGIN OF HACK

  # This is a hack to reduce the deployment time of the testing machines.
  # The default APT servers are the US ones. The next few likes overwrite
  # the mirror list putting on top the one of your region (Sweden by default)

  # Delete old sources.list file
  file "/etc/apt/sources.list" do
    user "root"
    action :delete
  end

  # Put the new one in
  template "/etc/apt/sources.list" do
    source "sources.list.erb"
    owner "root"
{'fraction_non_alphanumeric': 0.10379241516966067, 'fraction_numerical': 0.001996007984031936, 'mean_word_length': 3.20335429769392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6156564', 'n_tokens_mistral': 651, 'n_tokens_neox': 624, 'n_words': 204}