Skip to content
Snippets Groups Projects
Unverified Commit 8284522f authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Fix end-to-end checks for deposit & webapp

All checks were deployed on the production environment because it relied on
lookup of variables changing between environments. As the checks are deployed
on pergamon which is a production node, that could not be functional.

Refs. swh/infra/sysadm-environment#5588
parent 21c5a0ca
No related branches found
No related tags found
1 merge request!730Fix and unify end-to-end checks for deposit, webapp and vault
......@@ -25,11 +25,6 @@ class profile::icinga2::objects::static_checks {
},
}
::profile::swh::deploy::webapp::icinga_checks {'archive.softwareheritage.org':
environment => "production",
host_name => "moma.softwareheritage.org",
}
::icinga2::object::host {'archive-production-rke2':
check_command => 'dummy',
address => 'k8s-archive-production-rke2.internal.softwareheritage.org',
......@@ -52,9 +47,14 @@ class profile::icinga2::objects::static_checks {
},
}
::profile::swh::deploy::webapp::icinga_checks {'archive.softwareheritage.org':
environment => "production",
host_name => "moma.softwareheritage.org",
}
::profile::swh::deploy::webapp::icinga_checks {'webapp.staging.swh.network':
environment => "staging",
host_name => "archive-staging-rke2",
environment => "staging",
host_name => "archive-staging-rke2",
}
::profile::swh::deploy::deposit::icinga_checks {'deposit.softwareheritage.org':
......@@ -63,8 +63,8 @@ class profile::icinga2::objects::static_checks {
}
::profile::swh::deploy::deposit::icinga_checks {'deposit.staging.swh.network':
environment => "staging",
host_name => "archive-staging-rke2",
environment => "staging",
host_name => "archive-staging-rke2",
}
::profile::swh::deploy::vault::icinga_checks {'production':
......
......@@ -2,12 +2,12 @@
define profile::swh::deploy::deposit::icinga_checks (
# vhost name of the service to check
$vhost_name = $title,
$deposit_server = $title,
$vhost_ssl_port = 443,
$environment = undef,
# The hostname where the services runs (icinga needs it)
$host_name = undef,
) {
$backend_listen_host = lookup('swh::deploy::deposit::backend::listen::host')
$backend_listen_port = lookup('swh::deploy::deposit::backend::listen::port')
......@@ -34,7 +34,7 @@ define profile::swh::deploy::deposit::icinga_checks (
# Install deposit end-to-end checks
profile::icinga2::objects::e2e_checks_deposit {"End-to-end Deposit Test(s) in ${environment}":
deposit_server => lookup('swh::deploy::deposit::e2e::server'),
deposit_server => "https://${deposit_server}/1",
deposit_user => lookup('swh::deploy::deposit::e2e::user'),
deposit_pass => lookup('swh::deploy::deposit::e2e::password'),
deposit_collection => lookup('swh::deploy::deposit::e2e::collection'),
......
......@@ -2,6 +2,7 @@
define profile::swh::deploy::webapp::icinga_checks (
# vhost name of the service to check
$vhost_name = $title,
$server_webapp = $title,
$vhost_ssl_port = 443,
$environment = undef,
# The hostname where the services runs (icinga needs it)
......@@ -71,7 +72,7 @@ define profile::swh::deploy::webapp::icinga_checks (
$origins = lookup('swh::deploy::savecodenow::e2e::origins')
each($origins) | $entry | {
profile::icinga2::objects::e2e_checks_savecodenow {"End-to-end SaveCodeNow Check - ${entry['name']} with type ${entry['type']} in ${environment}":
server_webapp => lookup('swh::deploy::savecodenow::e2e::webapp'),
server_webapp => "https://${server_webapp}",
origin_name => $entry['name'],
origin_url => $entry['origin'],
origin_type => $entry['type'],
......
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