Skip to content

Commit

Permalink
feat(couchdb): make couchdb admin password configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Michael C. Jaeger <[email protected]>
  • Loading branch information
mcjaeger committed Apr 19, 2021
1 parent a6fd720 commit 9d11997
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions generate-box/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

facts = {
"tomcat_admin_password" => SW360_default_password,
"couchdb_admin_password" => SW360_default_password,
"proxy_yes" => SW360_proxy,
"enable_mellon" => SW360_enable_mellon
}
Expand Down
20 changes: 20 additions & 0 deletions puppet/manifests/sw360-base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@
require => Exec['install-couchdb-update-apt'],
}

###################
## CouchDB Setup ##
###################

# local.ini: Setup of CouchDB bind port and bind adress
file { 'couchdb_local.ini':
path => '/opt/couchdb/etc/local.ini',
ensure => 'present',
owner => couchdb,
content => template('sw360/couchdb_local.ini.erb'),
notify => Service["couchdb"], # Will cause the service to restart
}

# Restart CouchDB
service { 'couchdb':
ensure => "running",
enable => "true",
require => File['couchdb_local.ini'],
}

##############################################################################
# User configuration, to create the siemagrant user when starting from a #
# standard box. #
Expand Down
20 changes: 0 additions & 20 deletions puppet/manifests/sw360-single.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,6 @@
path => "/etc/environment",
}

###################
## CouchDB Setup ##
###################

# local.ini: Setup of CouchDB bind port and bind adress
file { 'couchdb_local.ini':
path => '/opt/couchdb/etc/local.ini',
ensure => 'present',
owner => couchdb,
content => template('sw360/couchdb_local.ini.erb'),
notify => Service["couchdb"], # Will cause the service to restart
}

# Restart CouchDB
service { 'couchdb':
ensure => "running",
enable => "true",
require => File['couchdb_local.ini'],
}

####################
## Postgres Setup ##
####################
Expand Down
2 changes: 1 addition & 1 deletion puppet/modules/sw360/templates/couchdb_local.ini.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ bind_address = <%= @couchdb_bind_address %>
; 'username = password' lines. Don't forget to restart CouchDB after
; changing this.
[admins]
admin = <%= @liferay_admin_password %>
admin = <%= @couchdb_admin_password %>

0 comments on commit 9d11997

Please sign in to comment.