Added files to get build to work
Try and create Berksfile that will work with berkshelf 2 or 3 Fixed style issues Also, added .gitreview file Change-Id: I47caf4930ac18bcfc62737e851fff1fe15dd9c9f
This commit is contained in:
parent
329ba259a5
commit
51fd328fef
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=stackforge/cookbook-monasca-schema
|
7
Berksfile
Normal file
7
Berksfile
Normal file
@ -0,0 +1,7 @@
|
||||
require 'rubygems'
|
||||
|
||||
if Gem::Specification::find_by_name('berkshelf').version.to_s[0] == '3'
|
||||
source 'https://api.berkshelf.com'
|
||||
end
|
||||
|
||||
metadata
|
11
Gemfile
Normal file
11
Gemfile
Normal file
@ -0,0 +1,11 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'chef', '~> 11.8'
|
||||
gem 'json', '<= 1.7.7' # chef 11 dependency
|
||||
gem 'berkshelf', '~> 2.0.18'
|
||||
gem 'hashie', '~> 2.0'
|
||||
gem 'chefspec', '~> 3.4.0'
|
||||
gem 'rspec', '~> 2.14.1'
|
||||
gem 'foodcritic', '~> 3.0.3'
|
||||
gem 'strainer'
|
||||
gem 'rubocop', '~> 0.18.1'
|
5
Strainerfile
Normal file
5
Strainerfile
Normal file
@ -0,0 +1,5 @@
|
||||
# Strainerfile
|
||||
rubocop: rubocop $SANDBOX/$COOKBOOK
|
||||
knife test: knife cookbook test $COOKBOOK
|
||||
foodcritic: foodcritic -f any -t ~FC003 -t ~FC023 $SANDBOX/$COOKBOOK
|
||||
chefspec: rspec $SANDBOX/$COOKBOOK/spec
|
@ -6,5 +6,5 @@ maintainer_email 'monasca@lists.launchpad.net'
|
||||
license 'All rights reserved'
|
||||
description 'Installs/Configures monasca_schema'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '0.1.0'
|
||||
version '0.1.1'
|
||||
depends 'influxdb'
|
||||
|
@ -1 +1,3 @@
|
||||
# encoding: UTF-8#
|
||||
#
|
||||
# Unused
|
||||
|
@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8#
|
||||
#
|
||||
# Create an influxdb database and users
|
||||
# Leverages the cookbook from https://github.com/SimpleFinance/chef-influxdb
|
||||
|
||||
@ -9,7 +11,7 @@ influxdb_database 'mon' do
|
||||
action :create
|
||||
end
|
||||
|
||||
['mon_api', 'mon_persister'].each do |user|
|
||||
%w[mon_api mon_persister].each do |user|
|
||||
influxdb_user user do
|
||||
action :create
|
||||
password 'password'
|
||||
|
@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8#
|
||||
#
|
||||
# Temporary way of loading in the mysql schema
|
||||
|
||||
bash 'mon_schema' do
|
||||
@ -10,5 +12,5 @@ cookbook_file '/var/lib/mysql/mon.sql' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
source 'mysql/mon.sql'
|
||||
notifies :run, "bash[mon_schema]"
|
||||
notifies :run, 'bash[mon_schema]'
|
||||
end
|
||||
|
@ -1,24 +1,28 @@
|
||||
# encoding: UTF-8#
|
||||
#
|
||||
# Lays down a db creation script and default schema
|
||||
|
||||
# There is a bug where $HOME is not set currectly for exec, I use sudo to avoid this
|
||||
# https://tickets.opscode.com/browse/CHEF-2288
|
||||
# There is a bug where $HOME is not set currectly for exec, I use sudo to
|
||||
# avoid this https://tickets.opscode.com/browse/CHEF-2288
|
||||
bash 'create_mon_db' do
|
||||
action :nothing
|
||||
user 'root'
|
||||
code <<-EOH
|
||||
ulimit -n 65536 # The max files open limit must be set for db creation to work.
|
||||
ulimit -n 65536 # Max files open limit must be set for db creation to work.
|
||||
sudo -Hu dbadmin /var/vertica/create_mon_db.sh
|
||||
EOH
|
||||
end
|
||||
|
||||
# Note: As projections based on k-safety are added this file list will need modification based on a clustered or not setup
|
||||
%w[ mon_grants.sql mon_schema.sql mon_metrics_schema.sql mon_alarms_schema.sql mon_users.sql ].each do |filename|
|
||||
# Note: As projections based on k-safety are added this file list will need
|
||||
# modification based on a clustered or not setup
|
||||
%w[ mon_grants.sql mon_schema.sql mon_metrics_schema.sql
|
||||
mon_alarms_schema.sql mon_users.sql ].each do |filename|
|
||||
cookbook_file "/var/vertica/#{filename}" do
|
||||
action :create
|
||||
source "vertica/#{filename}"
|
||||
owner node[:vertica][:dbadmin_user]
|
||||
group node[:vertica][:dbadmin_group]
|
||||
mode "644"
|
||||
mode '644'
|
||||
end
|
||||
end
|
||||
|
||||
@ -33,7 +37,6 @@ cookbook_file '/var/vertica/create_mon_db.sh' do
|
||||
source "vertica/#{setup_script}"
|
||||
owner node[:vertica][:dbadmin_user]
|
||||
group node[:vertica][:dbadmin_group]
|
||||
mode "755"
|
||||
notifies :run, "bash[create_mon_db]"
|
||||
mode '755'
|
||||
notifies :run, 'bash[create_mon_db]'
|
||||
end
|
||||
|
||||
|
2
spec/empty.rb
Normal file
2
spec/empty.rb
Normal file
@ -0,0 +1,2 @@
|
||||
# encoding: UTF-8
|
||||
# No unit tests at this time.
|
Loading…
Reference in New Issue
Block a user