Require the user to supply Vertica JDBC jar
Vertica JDBC jar can't be redistributed so require user to place jar in directory where vagrant up is done. This cookbook will then place the jar in the correct place. Also, updated maintainer information in metadata.rb Change-Id: I426d9585b4564872b5ad43eed4e2082148b5597b
This commit is contained in:
parent
609d2599b7
commit
eb7b56fc50
@ -1,4 +1,7 @@
|
|||||||
# Description
|
# Description
|
||||||
Configures and sets up the MON api. Includes attributes for log backups, ossec file watching and ossec rules.
|
Configures and sets up the Monasca api. Includes attributes for log backups, ossec file watching and ossec rules.
|
||||||
Also included is an icinga check for the service health check.
|
Also included is an icinga check for the service health check.
|
||||||
|
|
||||||
|
Using Vertica
|
||||||
|
------------
|
||||||
|
If Vertica is used as the database for Monasca, the Vertica JDBC jar that matches the Vertica version must be placed in /opt/mon/vertica. The jar from Vertica will be named like vertica-jdbc-7.0.1-0.jar and must be renamed to vertica_jdbc.jar when placed in /opt/mon/vertica. You can find the Vertica JDBC jar in /opt/vertica/java on a system with the Vertica database installed. This cookbook will copy the Vertica JDBC Jar from /vagrant and place it in /opt/mon/vertica if run using Chef Solo.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# encoding: UTF-8#
|
# encoding: UTF-8#
|
||||||
#
|
#
|
||||||
name 'mon_api'
|
name 'mon_api'
|
||||||
maintainer 'MON Team'
|
maintainer 'Monasca Team'
|
||||||
maintainer_email 'hpcs-mon-som@hp.com'
|
maintainer_email 'monasca@lists.launchpad.net'
|
||||||
license 'All rights reserved'
|
license 'All rights reserved'
|
||||||
description 'Installs/Configures mon_api'
|
description 'Installs/Configures mon_api'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '0.0.12'
|
version '0.0.13'
|
||||||
|
@ -34,3 +34,37 @@ template '/etc/mon/mon-api-config.yml' do
|
|||||||
)
|
)
|
||||||
notifies :restart, 'service[mon-api]'
|
notifies :restart, 'service[mon-api]'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if setting['database-configuration']['database-type'] == 'vertica'
|
||||||
|
|
||||||
|
# Create the directory for the vertica JDBC jar
|
||||||
|
directory '/opt/mon/vertica' do
|
||||||
|
recursive true
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode 0755
|
||||||
|
action :create
|
||||||
|
end
|
||||||
|
|
||||||
|
# Copy the vertica jdbc jar from /vagrant
|
||||||
|
bash 'vertica_jdbc.jar' do
|
||||||
|
action :run
|
||||||
|
code <<-EOL
|
||||||
|
DEST=/opt/mon/vertica/vertica_jdbc.jar
|
||||||
|
if [ ! -s ${DEST} ]; then
|
||||||
|
SRC=`ls /vagrant/vertica-jdbc-*.jar`
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo 'You must place a Vertica JDBC jar in the directory where you do the "vagrant up"' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp "$SRC" $DEST
|
||||||
|
RC=$?
|
||||||
|
if [ $RC != 0 ]; then
|
||||||
|
exit $RC
|
||||||
|
fi
|
||||||
|
chown root:root $DEST
|
||||||
|
chmod 0555 $DEST
|
||||||
|
fi
|
||||||
|
EOL
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user