Commit a8ee2b48 authored by Marin Jankovski's avatar Marin Jankovski

Add option to skip database creation if using external database. Add option to...

Add option to skip database creation if using external database. Add option to specify database root username.
parent d342d94e
......@@ -43,7 +43,7 @@ default['gitlab']['bundle_install'] = "SSL_CERT_FILE=/opt/local/etc/certs/cacert
# Assumed defaults
# database: mysql (option: postgresql)
# environment: production (option: development)
default['gitlab']['external_database'] = false
default['gitlab']['database_adapter'] = "mysql"
default['gitlab']['database_password'] = "datapass"
default['gitlab']['database_user'] = "git"
......@@ -51,6 +51,7 @@ default['gitlab']['env'] = "production"
default['mysql']['server_host'] = "localhost" # Host of the server that hosts the database.
default['mysql']['client_host'] = "localhost" # Host where user connections are allowed from.
default['mysql']['server_root_username'] = "root"
default['mysql']['server_root_password'] = "rootpass"
default['mysql']['server_repl_password'] = "replpass"
default['mysql']['server_debian_password'] = "debianpass"
......@@ -83,6 +84,7 @@ when "rhel"
default['postgresql']['server']['service_name'] = "postgresql-#{node['postgresql']['version']}"
default['gitlab']['postgresql']['configuration_dir'] = "/usr/pgsql-#{node['postgresql']['version']}/bin"
end
default['postgresql']['username']['postgres'] = "postgres"
default['postgresql']['password']['postgres'] = "psqlpass"
default['postgresql']['server_host'] = "localhost"
......
......@@ -12,7 +12,7 @@ include_recipe "database::mysql"
mysql_connection = {
:host => mysql['server_host'],
:username => 'root',
:username => mysql['server_root_username'],
:password => mysql['server_root_password']
}
......
......@@ -12,7 +12,7 @@ include_recipe "database::postgresql"
postgresql_connection = {
:host => postgresql['server_host'],
:username => 'postgres',
:username => postgresql['username']['postgres'],
:password => postgresql['password']['postgres']
}
......
......@@ -17,4 +17,4 @@ include_recipe "gitlab::ruby"
include_recipe "gitlab::users"
# Setup chosen database
include_recipe "gitlab::database_#{gitlab['database_adapter']}"
include_recipe "gitlab::database_#{gitlab['database_adapter']}" unless gitlab['external_database']
......@@ -38,4 +38,4 @@ test: &test
username: "<%= @user %>"
password: "<%= @password %>"
host: <%= @host %>
# socket: /tmp/mysql.sock
\ No newline at end of file
# socket: /tmp/mysql.sock
......@@ -49,4 +49,4 @@ test: &test
username: "<%= @user %>"
password: "<%= @password %>"
host: <%= @host %>
# socket: /tmp/postgresql.sock
\ No newline at end of file
# socket: /tmp/postgresql.sock
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment