Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123765
D7528.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
D7528.diff
View Options
diff --git a/data/common/common.yaml b/data/common/common.yaml
--- a/data/common/common.yaml
+++ b/data/common/common.yaml
@@ -947,6 +947,9 @@
azure-billing.internal.admin.swh.network:
domains:
- azure-billing.internal.admin.swh.network
+ maven-exporter.internal.staging.swh.network:
+ domains:
+ - maven-exporter.internal.staging.swh.network
bind::update_key: local-update
diff --git a/data/deployments/staging/common.yaml b/data/deployments/staging/common.yaml
--- a/data/deployments/staging/common.yaml
+++ b/data/deployments/staging/common.yaml
@@ -350,3 +350,5 @@
syncoid::public_keys::db1:
type: ssh-ed25519
key: "AAAAC3NzaC1lZDI1NTE5AAAAILRVodfvLudSiOdWOPDSoN5MIwZPbyZAyClfr/SQUK4w"
+
+swh::deploy::maven_index_exporter::url: maven-exporter.internal.staging.swh.network
diff --git a/data/subnets/vagrant.yaml b/data/subnets/vagrant.yaml
--- a/data/subnets/vagrant.yaml
+++ b/data/subnets/vagrant.yaml
@@ -221,6 +221,8 @@
host: vault.internal.staging.swh.network
10.168.130.70:
host: maven-exporter0.internal.staging.swh.network
+ aliases:
+ - maven-exporter.internal.staging.swh.network
10.168.130.80:
host: search-esnode0.internal.staging.swh.network
10.168.130.90:
diff --git a/site-modules/profile/manifests/maven_index_exporter.pp b/site-modules/profile/manifests/maven_index_exporter.pp
--- a/site-modules/profile/manifests/maven_index_exporter.pp
+++ b/site-modules/profile/manifests/maven_index_exporter.pp
@@ -94,4 +94,88 @@
active => true,
}
}
+
+ # Vhost declaration
+
+ ::apache::vhost {"${vhost_name}_non-ssl":
+ servername => $vhost_name,
+ port => '80',
+ docroot => $publish_path,
+ manage_docroot => false,
+ redirect_status => 'permanent',
+ redirect_dest => "https://${vhost_name}/",
+ }
+
+ ::profile::letsencrypt::certificate {$vhost_name:}
+
+ $cert_paths = ::profile::letsencrypt::certificate_paths($vhost_name)
+ ::apache::vhost {"${vhost_name}_ssl":
+ servername => $vhost_name,
+ port => '443',
+ ssl => true,
+ ssl_protocol => $vhost_ssl_protocol,
+ ssl_honorcipherorder => $vhost_ssl_honorcipherorder,
+ ssl_cipher => $vhost_ssl_cipher,
+ ssl_cert => $cert_paths['cert'],
+ ssl_chain => $cert_paths['chain'],
+ ssl_key => $cert_paths['privkey'],
+ headers => [$vhost_hsts_header],
+ docroot => $publish_path,
+ manage_docroot => false,
+ require => [
+ File[$cert_paths['cert']],
+ File[$cert_paths['chain']],
+ File[$cert_paths['privkey']],
+ ],
+ }
+
+ File[$cert_paths['cert'], $cert_paths['chain'], $cert_paths['privkey']] ~> Class['Apache::Service']
+
+ @@::icinga2::object::service {"Maven Index Exporter report http redirect on ${::fqdn}":
+ service_name => 'maven index exporter report http redirect',
+ import => ['generic-service'],
+ host_name => $::fqdn,
+ check_command => 'http',
+ vars => {
+ http_address => $vhost_name,
+ http_vhost => $vhost_name,
+ http_uri => '/',
+ },
+ target => $icinga_checks_file,
+ tag => 'icinga2::exported',
+ }
+
+ @@::icinga2::object::service {"Maven Index Exporter report https on ${::fqdn}":
+ service_name => 'maven index exporter report https',
+ import => ['generic-service'],
+ host_name => $::fqdn,
+ check_command => 'http',
+ vars => {
+ http_address => $vhost_name,
+ http_vhost => $vhost_name,
+ http_ssl => true,
+ http_sni => true,
+ http_uri => '/',
+ http_onredirect => sticky
+ },
+ target => $icinga_checks_file,
+ tag => 'icinga2::exported',
+ }
+
+ @@::icinga2::object::service {"Maven Index Exporter report https certificate ${::fqdn}":
+ service_name => 'maven index exporter report https certificate',
+ import => ['generic-service'],
+ host_name => $::fqdn,
+ check_command => 'http',
+ vars => {
+ http_address => $vhost_name,
+ http_vhost => $vhost_name,
+ http_ssl => true,
+ http_sni => true,
+ http_certificate => 25,
+ },
+ target => $icinga_checks_file,
+ tag => 'icinga2::exported',
+ }
+
}
diff --git a/site-modules/role/manifests/swh_maven_index_exporter.pp b/site-modules/role/manifests/swh_maven_index_exporter.pp
--- a/site-modules/role/manifests/swh_maven_index_exporter.pp
+++ b/site-modules/role/manifests/swh_maven_index_exporter.pp
@@ -1,5 +1,6 @@
# SWH maven index exporter service
class role::swh_maven_index_exporter inherits role::swh_base {
include profile::docker
+ include profile::apache::simple_server
include profile::maven_index_exporter
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 12:15 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225250
Attached To
D7528: staging: Deploy apache service to serve extracted export.fld files
Event Timeline
Log In to Comment