Compare commits
No commits in common. "d7e7e260c25d6b88b20a6f1be0d86f377a76b246" and "5c0e05394dec63648d7d78af4868b6b8abbc4323" have entirely different histories.
d7e7e260c2
...
5c0e05394d
|
@ -1,6 +1,6 @@
|
||||||
# Lets determin who the customer is by looking at the hostname
|
# Lets determin who the customer is by looking at the hostname
|
||||||
function sunetdrive::get_customer() >> String {
|
function sunetdrive::get_customer() >> String {
|
||||||
$hostnameparts = split($facts['networking']['fqdn'],'\.')
|
$hostnameparts = split($facts['fqdn'],'\.')
|
||||||
if $hostnameparts[1] == 'drive' {
|
if $hostnameparts[1] == 'drive' {
|
||||||
if $hostnameparts[0] =~ /^gss/ {
|
if $hostnameparts[0] =~ /^gss/ {
|
||||||
return 'gss'
|
return 'gss'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Lets determin where we are by looking at the hostname
|
# Lets determin where we are by looking at the hostname
|
||||||
function sunetdrive::get_environment() >> String {
|
function sunetdrive::get_environment() >> String {
|
||||||
$hostname = $facts['networking']['fqdn']
|
$hostname = $facts['fqdn']
|
||||||
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
|
if $hostname =~ /^.*\.drive\.sunet\.se$/ {
|
||||||
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
|
if $hostname =~ /^.*\.pilot\.drive\.sunet\.se$/ {
|
||||||
return 'pilot'
|
return 'pilot'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Lets determin where we are by looking at the hostname
|
# Lets determin where we are by looking at the hostname
|
||||||
function sunetdrive::get_node_number() >> Integer {
|
function sunetdrive::get_node_number() >> Integer {
|
||||||
Integer(regsubst($facts['networking']['fqdn'], /^[a-zA-Z\-]+(\d).*$/, '\\1'))
|
Integer(regsubst($::fqdn, /^[a-zA-Z\-]+(\d).*$/, '\\1'))
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ define sunetdrive::cloudimage(
|
||||||
resolver => ['130.242.80.14', '130.242.80.99'],
|
resolver => ['130.242.80.14', '130.242.80.99'],
|
||||||
search => $search,
|
search => $search,
|
||||||
#
|
#
|
||||||
repo => $facts['cosmos_repo_origin_url'],
|
repo => $::cosmos_repo_origin_url,
|
||||||
tagpattern => $facts['cosmos_tag_pattern'],
|
tagpattern => $::cosmos_tag_pattern,
|
||||||
#
|
#
|
||||||
cpus => $cpus,
|
cpus => $cpus,
|
||||||
memory => $memory,
|
memory => $memory,
|
||||||
|
|
|
@ -4,7 +4,7 @@ class sunetdrive::infra_script (
|
||||||
$location = undef
|
$location = undef
|
||||||
) {
|
) {
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$customer = 'common'
|
$customer = "common"
|
||||||
$config = hiera_hash($environment)
|
$config = hiera_hash($environment)
|
||||||
$gss_backup_server = $config['gss_backup_server']
|
$gss_backup_server = $config['gss_backup_server']
|
||||||
$lookup_backup_server = $config['lookup_backup_server']
|
$lookup_backup_server = $config['lookup_backup_server']
|
||||||
|
|
|
@ -10,9 +10,9 @@ class sunetdrive::mariadb (
|
||||||
$quorum_id = $facts['networking']['fqdn']
|
$quorum_id = $facts['networking']['fqdn']
|
||||||
$quorum_password = safe_hiera('quorum_password')
|
$quorum_password = safe_hiera('quorum_password')
|
||||||
$db = sunetdrive::db_type { 'base_db':
|
$db = sunetdrive::db_type { 'base_db':
|
||||||
bootstrap => $bootstrap,
|
bootstrap => $bootstrap,
|
||||||
tag_mariadb => $tag_mariadb,
|
tag_mariadb => $tag_mariadb,
|
||||||
location => $location,
|
location => $location,
|
||||||
}
|
}
|
||||||
file { '/etc/quorum.conf':
|
file { '/etc/quorum.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
|
|
|
@ -5,7 +5,7 @@ class sunetdrive::multinode (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
include sunet::packages::yq
|
include sunet::packages::yq
|
||||||
$myname = $facts['networking']['hostname']
|
$myname = $facts['hostname']
|
||||||
$is_multinode = true;
|
$is_multinode = true;
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$lb_servers = hiera_hash($environment)['lb_servers']
|
$lb_servers = hiera_hash($environment)['lb_servers']
|
||||||
|
@ -278,7 +278,7 @@ MACAddressPolicy=none'
|
||||||
$s3_host = $customer_config['s3_host']
|
$s3_host = $customer_config['s3_host']
|
||||||
$s3_usepath = hiera('s3_usepath')
|
$s3_usepath = hiera('s3_usepath')
|
||||||
$smtpuser = hiera("smtp_user_${environment}")
|
$smtpuser = hiera("smtp_user_${environment}")
|
||||||
$trusted_domains = [$site_name, $facts['networking']['fqdn'], 'localhost']
|
$trusted_domains = [$site_name, $facts['fqdn'], 'localhost']
|
||||||
$tug_office = hiera_array('tug_office')
|
$tug_office = hiera_array('tug_office')
|
||||||
if $customer_config['twofactor_enforced_groups'] {
|
if $customer_config['twofactor_enforced_groups'] {
|
||||||
$twofactor_enforced_groups = $customer_config['twofactor_enforced_groups']
|
$twofactor_enforced_groups = $customer_config['twofactor_enforced_groups']
|
||||||
|
|
|
@ -17,7 +17,7 @@ class sunetdrive::multinode_db(){
|
||||||
if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ {
|
if $facts["networking"]["fqdn"] =~ /^multinode-db1\.drive\.(test\.){1}sunet\.se$/ {
|
||||||
$statistics_secret = safe_hiera('statistics_secret')
|
$statistics_secret = safe_hiera('statistics_secret')
|
||||||
notify { 'hostmessage':
|
notify { 'hostmessage':
|
||||||
message => 'We are on multinode-db1. Set up statistics environment.',
|
message => "We are on multinode-db1. Set up statistics environment.",
|
||||||
}
|
}
|
||||||
$custdata=$customers.reduce({}) |$memo, $value| {
|
$custdata=$customers.reduce({}) |$memo, $value| {
|
||||||
$memo + {$value => lookup($value)}
|
$memo + {$value => lookup($value)}
|
||||||
|
|
|
@ -69,7 +69,7 @@ class sunetdrive::scriptreceiver()
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
}
|
}
|
||||||
file { '/etc/sudoers.d/99-safer_reboot':
|
file { "/etc/sudoers.d/99-safer_reboot":
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => "script ALL=(root) NOPASSWD: /usr/local/bin/safer_reboot\n",
|
content => "script ALL=(root) NOPASSWD: /usr/local/bin/safer_reboot\n",
|
||||||
mode => '0440',
|
mode => '0440',
|
||||||
|
|
|
@ -7,7 +7,7 @@ class sunetdrive::sitemonitornaemon() {
|
||||||
$tls_servers_with_port = hiera_array('tls_servers_with_port')
|
$tls_servers_with_port = hiera_array('tls_servers_with_port')
|
||||||
$nextcloud_version_prod = split(hiera('nextcloud_version_prod'),'[-]')[0]
|
$nextcloud_version_prod = split(hiera('nextcloud_version_prod'),'[-]')[0]
|
||||||
$nextcloud_version_test = split(hiera('nextcloud_version_test'),'[-]')[0]
|
$nextcloud_version_test = split(hiera('nextcloud_version_test'),'[-]')[0]
|
||||||
$monitorhost = $facts['networking']['fqdn']
|
$monitorhost = $::fqdn
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$influx_passwd = safe_hiera('influx_passwd')
|
$influx_passwd = safe_hiera('influx_passwd')
|
||||||
$slack_url = safe_hiera('slack_url')
|
$slack_url = safe_hiera('slack_url')
|
||||||
|
|
Loading…
Reference in a new issue