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

CLOUD-464: Updates for Reconciliation #185

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
default['cloud']['cloudwatch']['download_url']['centos'] = "https://s3.amazonaws.com/amazoncloudwatch-agent/centos/amd64/#{node['cloud']['cloudwatch']['agent_version']}/amazon-cloudwatch-agent.rpm"

default['cloud']['init']['expat_dir'] = "#{node['cloud']['init']['install_dir']}/expat"
default['cloud']['ndb-agent']['version'] = "0.11.0-SNAPSHOT"
default['cloud']['ndb-agent']['version'] = "1.0"
default['cloud']['ndb-agent']['base_dir'] = "#{node['cloud']['install_dir']}/ndb-agent/ndb-agent-#{node['cloud']['ndb-agent']['version']}"
default['cloud']['ndb-agent']['home'] = "#{node['cloud']['install_dir']}/ndb-agent/ndb-agent"
default['cloud']['ndb-agent']['bin'] = "#{node['cloud']['ndb-agent']['home']}/bin"
default['cloud']['ndb-agent']['config'] = "#{node['cloud']['ndb-agent']['home']}/config"
default['cloud']['ndb-agent']['log-level'] = "debug"
default['cloud']['ndb-agent']['log-level'] = "info"
default['cloud']['ndb-agent']['templates-dir'] = "#{node['cloud']['ndb-agent']['home']}/templates"

default['cloud']['metrics']['dir'] = "#{node["cloud"]["install_dir"]}/cloud-metrics-collector"
Expand Down
22 changes: 0 additions & 22 deletions files/default/ndb_templates/autobench_dbt2.conf

This file was deleted.

57 changes: 0 additions & 57 deletions files/default/ndb_templates/autobench_sysbench.conf

This file was deleted.

109 changes: 0 additions & 109 deletions files/default/ndb_templates/ndb_config.ini

This file was deleted.

9 changes: 1 addition & 8 deletions recipes/ndb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
tar xzf #{Chef::Config['file_cache_path']}/#{filename} -C #{Chef::Config['file_cache_path']}
cp #{Chef::Config['file_cache_path']}/#{ndb_agent_folder}/ndb-agent #{node['cloud']['ndb-agent']['bin']}
chmod 750 #{node['cloud']['ndb-agent']['bin']}/ndb-agent

cp -r #{Chef::Config['file_cache_path']}/#{ndb_agent_folder}/contrib #{node['cloud']['ndb-agent']['bin']}
chmod -R 750 #{node['cloud']['ndb-agent']['bin']}/contrib
EOH
not_if { File.exist? "#{node['cloud']['ndb-agent']['bin']}/ndb-agent" }
end
Expand All @@ -67,14 +64,10 @@
})
end

remote_directory "#{node['cloud']['ndb-agent']['templates-dir']}" do
source 'ndb_templates'
directory "#{node['cloud']['ndb-agent']['templates-dir']}" do
owner 'root'
group 'root'
mode 0750
files_owner 'root'
files_group 'root'
files_mode 0550
end

template "#{node['cloud']['ndb-agent']['templates-dir']}/join_hopsworks_cluster.sh" do
Expand Down
23 changes: 7 additions & 16 deletions templates/default/ndb-agent/config.yml.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
general:
log-level: <%= node['cloud']['ndb-agent']['log-level'] %>
handler-channel-size: 20
cluster-topology-location: <%= node['cloud']['ndb-agent']['config'] %>/cluster-topology.json
backup-staging-directory: <%= node['ndb']['BackupDataDir'] %>
extra-mysqld-vms: 1
public-state-filepath: <%= node['cloud']['ndb-agent']['config'] %>/public-state.json
fallback-service-discovery: true
agent-running-since-filepath: <%= node['cloud']['ndb-agent']['config'] %>/agent-running-since.txt

http:
listen-port: 8181
api-key: API_KEY

heartbeat:
enabled: HEARTBEAT_ENABLED
endpoint: HEARTBEAT_ENDPOINT
leader:
is-leader: HEARTBEAT_ENABLED
cloud-base-endpoint: HEARTBEAT_ENDPOINT

Expand All @@ -20,18 +17,12 @@ templates:
ndb-config-target: <%= node['ndb']['root_dir'] %>/config.ini
benchmarks-target-home: <%= node['ndb']['user-home']%>/benchmarks

rondb-internal:
base:
mysqld-start-timeout: "2h"
timeouts:
start-ndbds: "2h"
start-mysqlds: "2h"

<% if @template_db_section -%>
database:
hostname: 127.0.0.1
username: root
<% end -%>

plugins:
unmarshal:
Clusterpoststartunmarshal: <%= node['cloud']['ndb-agent']['bin'] %>/contrib/plugins/hopsworks_plugin.so
handlers:
Clusterpoststarthandler: <%= node['cloud']['ndb-agent']['bin'] %>/contrib/plugins/hopsworks_plugin.so