Puppet Class: profile::toolforge::bastion::toolforge_cli
- Defined in:
- modules/profile/manifests/toolforge/bastion/toolforge_cli.pp
Overview
SPDX-License-Identifier: Apache-2.0
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'modules/profile/manifests/toolforge/bastion/toolforge_cli.pp', line 2
class profile::toolforge::bastion::toolforge_cli (
Stdlib::Fqdn $web_domain = lookup('profile::toolforge::web_domain', {default_value => 'toolforge.org'}),
) {
package { [
'toolforge-cli',
'toolforge-builds-cli',
'toolforge-envvars-cli',
'toolforge-jobs-framework-cli',
'toolforge-webservice',
]:
ensure => installed,
}
$harbor_domain = "${::wmcs_project}-harbor.wmcloud.org"
$cli_config = {
'api_gateway' => {
'url' => "https://api.svc.${::wmcs_project}.eqiad1.wikimedia.cloud:30003",
},
'build' => {
'dest_repository' => $harbor_domain,
'builder_image' => "${harbor_domain}/toolforge/heroku-builder-classic:22",
'builds_endpoint' => '/builds/v1',
},
}
file { '/etc/toolforge':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0555',
}
# toolforge cli configuration file (toolforge-weld >=1.1.0)
file { '/etc/toolforge/common.yaml':
ensure => file,
owner => 'root',
group => 'root',
mode => '0444',
content => $cli_config.to_yaml,
}
# TODO: this should use weld config loading or be removed entirely by T348755
file { '/etc/toolforge/webservice.yaml':
ensure => file,
owner => 'root',
group => 'root',
mode => '0444',
content => {
'public_domain' => $web_domain,
'buildservice_repository' => $harbor_domain,
}.to_yaml,
}
# old configuration files no longer used
file { [
'/etc/toolforge-cli.yaml',
'/etc/toolforge-jobs-framework-cli.cfg',
]:
ensure => absent,
}
}
|