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

Fix the database dependencies #198

Open
wants to merge 1 commit 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
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Installing the Database :

Installing all 3 - Database MUST come before Server

"recipe[database::mysql]",
"recipe[mysql::server]",
"recipe[zabbix]",
"recipe[zabbix::database]",
Expand Down Expand Up @@ -193,17 +192,6 @@ You can control the server and web installs with the following attributes:
node['zabbix']['server']['install_method'] = 'source'
node['zabbix']['web']['install'] = true

If you are using a MySql or RDS MySql database make sure your runlist
includes:

"recipe[database::mysql]",
"recipe[mysql::client]"

If you are user a Postgres database make sure your runlist includes:

"recipe[database::postgresql]",
"recipe[postgresql::client]",

## server\_source

Downloads and installs the Zabbix Server component from source
Expand Down
1 change: 0 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Vagrant.configure("2") do |config|
}
}

chef.add_recipe "database::mysql"
chef.add_recipe "mysql::server"
chef.add_recipe "zabbix"
chef.add_recipe "zabbix::database"
Expand Down
6 changes: 3 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
supports 'oracle', '>= 5.0'
supports 'windows'
depends 'apache2', '>= 1.0.8'
depends 'database', '>= 1.3.0'
depends 'mysql', '>= 1.3.0'
depends 'database', '>= 2.3.1'
depends 'ufw', '>= 0.6.1'
depends 'yum'
depends 'postgresql'
depends 'php-fpm'
depends 'nginx', '>= 1.0.0'
depends 'ark', '>= 0.7.2'
Expand All @@ -25,3 +23,5 @@
depends 'oracle-instantclient'
depends 'php'
depends 'yum-epel'
suggests 'mysql'
suggests 'postgresql'
6 changes: 3 additions & 3 deletions recipes/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)

include_recipe 'database::mysql'
include_recipe 'mysql::client'

# Generates passwords if they aren't already set
# This is INSECURE because node.normal persists the passwords to the chef
# server, making them visible to anybody with access
Expand All @@ -18,11 +15,13 @@

case node['zabbix']['database']['install_method']
when 'rds_mysql'
include_recipe 'database::mysql'
root_username = node['zabbix']['database']['rds_master_username']
root_password = node['zabbix']['database']['rds_master_password']
allowed_user_hosts = '%'
provider = Chef::Provider::ZabbixDatabaseMySql
when 'mysql'
include_recipe 'database::mysql'
unless node['mysql']['server_root_password']
node.normal['mysql']['server_root_password'] = secure_password
end
Expand All @@ -31,6 +30,7 @@
allowed_user_hosts = node['zabbix']['database']['allowed_user_hosts']
provider = Chef::Provider::ZabbixDatabaseMySql
when 'postgres'
include_recipe 'database::postgresql'
unless node['postgresql']['password']['postgres']
node.normal['postgresql']['password']['postgres'] = secure_password
end
Expand Down