Skip to content
Snippets Groups Projects
Commit b7ce9f1a authored by Filip Strömbäck's avatar Filip Strömbäck
Browse files

Use 'devel' branch from COMM repo for the devel machine.

parent 91864728
No related branches found
No related tags found
2 merge requests!7Merge of PDK, broker, auth,!4Devel
......@@ -14,9 +14,11 @@ class aes::auth(
if $facts[fqdn] == 'aes.edu.liu.se' {
# The AD service account for this key is: ida_sys002_srv
$auth_keytab_data = $keytab_production
$server_type = "production"
} elsif $facts[fqdn] == 'aes-devel.edu.liu.se' {
# The AD service account for this key is: ida_sys004_srv
$auth_keytab_data = $keytab_devel
$server_type = "devel"
} else {
$auth_keytab_data = undef
}
......@@ -107,7 +109,7 @@ class aes::auth(
}
exec { 'update-auth-repo' :
command => "/opt/utils/update_repo.sh ${auth_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git production",
command => "/opt/utils/update_repo.sh ${auth_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git ${server_type}",
environment => [ "REPO_USER=${auth_user}", "REPO_GROUP=${auth_group}", "REPO_ON_UPDATE=${auth_home}/on_update.sh" ],
# This command will need to run "on_update" as root in order to restart the service.
user => root,
......
......@@ -5,6 +5,15 @@ class aes::auth_keydb {
$keydb_home = "/srv/${keydb_user}"
$keydb_service = "aes_auth_keydb"
# Figure out which certificate to use based on the hostname.
if $facts[fqdn] == 'aes.edu.liu.se' {
$server_type = "production"
} elsif $facts[fqdn] == 'aes-devel.edu.liu.se' {
$server_type = "devel"
} else {
$server_type = undef
}
user { "${keydb_user}" :
ensure => present,
home => "${keydb_home}",
......@@ -40,7 +49,7 @@ class aes::auth_keydb {
}
exec { 'update-keydb-repo' :
command => "/opt/utils/update_repo.sh ${keydb_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git production",
command => "/opt/utils/update_repo.sh ${keydb_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git ${server_type}",
environment => [ "REPO_USER=${keydb_user}", "REPO_GROUP=${keydb_group}", "REPO_ON_UPDATE=${keydb_home}/on_update.sh" ],
# This command will need to run "on_update" as root in order to restart the service.
user => root,
......
......@@ -17,11 +17,11 @@ class aes::broker {
# Figure out which certificate to use based on the hostname.
if $facts[fqdn] == 'aes.edu.liu.se' {
$key_prefix = "production"
$server_type = "production"
} elsif $facts[fqdn] == 'aes-devel.edu.liu.se' {
$key_prefix = "devel"
$server_type = "devel"
} else {
$key_prefix = undef
$server_type = undef
}
user { "${broker_user}" :
......@@ -69,7 +69,7 @@ class aes::broker {
owner => "${broker_user}",
group => "${broker_group}",
mode => '0700',
source => "puppet:///modules/${module_name}/broker/cert/${key_prefix}_cert.pem"
source => "puppet:///modules/${module_name}/broker/cert/${server_type}_cert.pem"
}
file { "${broker_home}/ssl/key.pem" :
......@@ -77,7 +77,7 @@ class aes::broker {
owner => "${broker_user}",
group => "${broker_group}",
mode => '0700',
source => "puppet:///modules/${module_name}/broker/cert/${key_prefix}_key.pem"
source => "puppet:///modules/${module_name}/broker/cert/${server_type}_key.pem"
}
file { "${broker_home}/ssl/password" :
......@@ -85,11 +85,11 @@ class aes::broker {
owner => "${broker_user}",
group => "${broker_group}",
mode => '0700',
source => "puppet:///modules/${module_name}/broker/cert/${key_prefix}_password"
source => "puppet:///modules/${module_name}/broker/cert/${server_type}_password"
}
exec { 'update-broker-repo' :
command => "/opt/utils/update_repo.sh ${broker_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git production",
command => "/opt/utils/update_repo.sh ${broker_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git ${server_type}",
environment => [ "REPO_USER=${broker_user}", "REPO_GROUP=${broker_group}", "REPO_ON_UPDATE=${broker_home}/on_update.sh" ],
# This command will need to run "on_update" as root in order to restart the service.
user => root,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment