Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 015a516f54 | |||
| 27071d21ae |
@@ -1,4 +0,0 @@
|
||||
/.github/workflows/ @IUCLabs/maintainers
|
||||
/Makefile @IUCLabs/maintainers
|
||||
/.pre-commit-config.yaml @IUCLabs/maintainers
|
||||
/.github/CODEOWNERS @IUCLabs/maintainers
|
||||
@@ -404,14 +404,6 @@ networking::route_defaults:
|
||||
# logging:
|
||||
victorialogs::client::journald::enable: true
|
||||
victorialogs::client::journald::inserturl: https://logs-ingest.k8s.syd1.au.unkin.net:443/insert/journald
|
||||
nginx::log_format:
|
||||
journald: '$host $remote_addr - $remote_user "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" rt=$request_time ua="$upstream_addr" us="$upstream_status" urt="$upstream_response_time"'
|
||||
nginx::http_access_log:
|
||||
- /var/log/nginx/access.log
|
||||
- 'syslog:server=unix:/dev/log,tag=nginx_access,nohostname journald'
|
||||
nginx::nginx_error_log:
|
||||
- /var/log/nginx/error.log
|
||||
- 'syslog:server=unix:/dev/log,tag=nginx,nohostname'
|
||||
|
||||
# FIXME these are for the proxmox ceph cluster
|
||||
profiles::ceph::client::fsid: 7f7f00cb-95de-498c-8dcc-14b54e4e9ca8
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
networking_loopback0_ip: 198.18.2.162
|
||||
networking_wg_link: 198.18.2.178/31
|
||||
networking_vpc_cidr: 172.18.32.0/24
|
||||
|
||||
# wg0 p2p to prodnxsr0020; lab routes stay pinned to wg0 sourced from the /31 until ospf learns them
|
||||
wireguard::interfaces:
|
||||
wg0:
|
||||
addresses:
|
||||
- 198.18.2.179/31
|
||||
listen_port: 51820
|
||||
table: 'off'
|
||||
post_up:
|
||||
- ip route replace 198.18.0.0/16 dev wg0 src 198.18.2.179
|
||||
- ip route replace 10.10.12.200/32 dev wg0 src 198.18.2.179
|
||||
private_key: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAe680Uimksc8igs5HhN58HI1g4WsneHsI3Az66pAZIP7AQaISMCuQD51PGGzFxZqBd3wNf5eyhZdyBV3Yl5Rb+1lte28gld1gYtoTRkLW64BZOGcjs4kaIgIfKjPpp0pcdEBzFb0nVeMRkjvJFw3BGaj05yN+eUCNMf3qYpP47SD4JE8DnpgtRP09FhZ27suJylkB2SkrX+MUJPnuZ3SrKLYEI8kCsXB6puCMRALWAysjoWEXyElT+tShRv5eOcGvcUIenygBVTgBTyu7EsLtDtTmY0gGzG3VMIXxriW0RQ4UwcAW0fkiUxWc+KdVKysVthyjjuUupL6we0GTqC3KSjBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBB7FdQ73iu+fttRMUQwmaH5gDBpnsnowpVZP96vIs6ldfkm0mtO4ymnU6e+D3U9CRayiZXdhGVfHmHNb8L3s98YsQE=]
|
||||
peers:
|
||||
- public_key: 'mPiOahdhI4jyS7IpkSW1HV7ERd8VH53yv/H4hCxES1g='
|
||||
endpoint: 103.216.191.185:51822
|
||||
allowed_ips:
|
||||
- 224.0.0.5/32
|
||||
- 198.18.0.0/16
|
||||
- 10.10.12.200/32
|
||||
persistent_keepalive: 25
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
networking_loopback0_ip: 198.18.2.161
|
||||
networking_wg_link: 198.18.2.176/31
|
||||
networking_vpc_cidr: 172.18.30.0/24
|
||||
|
||||
# wg0 p2p to prodnxsr0020; lab routes stay pinned to wg0 sourced from the /31 until ospf learns them
|
||||
wireguard::interfaces:
|
||||
wg0:
|
||||
addresses:
|
||||
- 198.18.2.177/31
|
||||
listen_port: 51820
|
||||
table: 'off'
|
||||
post_up:
|
||||
- ip route replace 198.18.0.0/16 dev wg0 src 198.18.2.177
|
||||
- ip route replace 10.10.12.200/32 dev wg0 src 198.18.2.177
|
||||
private_key: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAEFLiAUx3WWC+nAl+XfKayu1J9gXlQI3dGAx6/0NCgIf/gDk64lrnuwzCJW9W0y00utkhoqdydx0rvjfFlI5v5+3vKWb/zyPQwcroQ1T/Tp+5627F6skuNa5LMVNk+GQHb729JluUmCW2Q8Rj4BSYYQKBS7tftgAnBiVB3aXANxgBeBZuONbI8hhFjTXHrSvDidgIHJzMpWwU40ZAwhk6B4Z9bTQ0yhs8Ucq6klaF2lDM6OO3mCrBeylCs9mgoLTE2q5B/+EqCHssNpQdhdKJ3FXp6IISn5Q3nnr7px7ks1Gzl5Ckke1D5O0WfXa1QvHQsiTkMF8B7tkY2IFHcfQz1DBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBA5YvFDxQEIxXzHJr2fVYmjgDBgflL2FY/Eu+thiGsS11m7VZ6qCy+x0d/8lcIa95aS7F3PadIyo4xGMgKtfQNzHwI=]
|
||||
peers:
|
||||
- public_key: 'XB2X5NwuoE+QJLjZG4i/0+6Jj0AtfK+UsZZ7wEfYLjk='
|
||||
endpoint: 103.216.191.185:51821
|
||||
allowed_ips:
|
||||
- 224.0.0.5/32
|
||||
- 198.18.0.0/16
|
||||
- 10.10.12.200/32
|
||||
persistent_keepalive: 25
|
||||
@@ -43,12 +43,3 @@ frrouting::ospfd_interfaces:
|
||||
area: 0.0.0.0
|
||||
frrouting::ospf_preferred_source_enable: true
|
||||
frrouting::ospf_preferred_source: "%{hiera('networking_loopback1_ip')}"
|
||||
frrouting::ospf_connected_exclude:
|
||||
- 0.0.0.0/0
|
||||
|
||||
# ntopng: wan uplink plus lan vlans
|
||||
profiles::metrics::ntopng::interfaces:
|
||||
- enp1s0
|
||||
- enp2s0
|
||||
- bond0.10
|
||||
- bond0.201
|
||||
|
||||
@@ -4,6 +4,7 @@ profiles::firewall::firewalld::ensure_package: 'absent'
|
||||
profiles::firewall::firewalld::ensure_service: 'stopped'
|
||||
profiles::firewall::firewalld::enable_service: false
|
||||
profiles::puppet::agent::version: '7.37.2'
|
||||
profiles::puppet::agent::openvox_enable: true
|
||||
|
||||
hiera_include:
|
||||
- profiles::almalinux::base
|
||||
@@ -103,14 +104,6 @@ profiles::yum::global::repos:
|
||||
gpgcheck: false
|
||||
mirrorlist: absent
|
||||
metadata_expire: '60'
|
||||
iuclabs-tools:
|
||||
name: iuclabs-tools
|
||||
descr: iuclabs-tools repository
|
||||
target: /etc/yum.repos.d/iuclabs-tools.repo
|
||||
baseurl: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/iuclabs-tools/
|
||||
gpgcheck: false
|
||||
mirrorlist: absent
|
||||
metadata_expire: '60'
|
||||
|
||||
# Additional repositories - default to absent, roles can override with ensure: present
|
||||
# FRRouting repositories
|
||||
@@ -131,24 +124,6 @@ profiles::yum::global::repos:
|
||||
gpgcheck: false
|
||||
mirrorlist: absent
|
||||
|
||||
# ntop repositories
|
||||
ntop:
|
||||
ensure: absent
|
||||
name: ntop
|
||||
descr: ntop repository
|
||||
target: /etc/yum.repos.d/ntop.repo
|
||||
baseurl: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/ntop/%{facts.os.release.major}/%{facts.os.architecture}/
|
||||
gpgkey: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/ntop/RPM-GPG-KEY-deri
|
||||
mirrorlist: absent
|
||||
ntop-noarch:
|
||||
ensure: absent
|
||||
name: ntop-noarch
|
||||
descr: ntop-noarch repository
|
||||
target: /etc/yum.repos.d/ntop-noarch.repo
|
||||
baseurl: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/ntop/%{facts.os.release.major}/noarch/
|
||||
gpgkey: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/ntop/RPM-GPG-KEY-deri
|
||||
mirrorlist: absent
|
||||
|
||||
# PostgreSQL repositories
|
||||
postgresql-15:
|
||||
ensure: absent
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
# Fedora releases inherit it for free.
|
||||
crypto_policies::policy: 'DEFAULT'
|
||||
|
||||
# Puppet agent via OpenVox. RedHat-family builds for Fedora live under
|
||||
# openvox7/fedora/<major> (see profiles::puppet::agent).
|
||||
profiles::puppet::agent::openvox_enable: true
|
||||
|
||||
lm-sensors::package: lm_sensors
|
||||
|
||||
# Fedora-specific base setup (NetworkManager, future workstation/laptop hooks).
|
||||
@@ -65,11 +69,3 @@ profiles::yum::global::repos:
|
||||
gpgcheck: false
|
||||
mirrorlist: absent
|
||||
metadata_expire: '60'
|
||||
iuclabs-tools:
|
||||
name: iuclabs-tools
|
||||
descr: iuclabs-tools repository
|
||||
target: /etc/yum.repos.d/iuclabs-tools.repo
|
||||
baseurl: https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/iuclabs-tools/
|
||||
gpgcheck: false
|
||||
mirrorlist: absent
|
||||
metadata_expire: '60'
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
hiera_include:
|
||||
- glauth
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
# additional altnames
|
||||
profiles::pki::vault::alt_names:
|
||||
- ldap.main.unkin.net
|
||||
|
||||
@@ -3,8 +3,6 @@ hiera_include:
|
||||
- profiles::ceph::rgw
|
||||
- profiles::nginx::simpleproxy
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
profiles::ceph::rgw::enable: true
|
||||
|
||||
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
||||
|
||||
@@ -4,8 +4,6 @@ hiera_include:
|
||||
- frrouting
|
||||
- exporters::frr_exporter
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
profiles::packages::include:
|
||||
cobbler: {}
|
||||
cobbler3.2-web: {}
|
||||
|
||||
@@ -4,8 +4,6 @@ hiera_include:
|
||||
- profiles::dhcp::server
|
||||
- exporters::frr_exporter
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
# networking
|
||||
anycast_ip: 198.18.19.18
|
||||
systemd::manage_networkd: true
|
||||
|
||||
@@ -14,8 +14,6 @@ profiles::ssh::sign::principals:
|
||||
hiera_include:
|
||||
- redisha
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
redisha::manage_repo: false
|
||||
redisha::redisha_members_lookup: true
|
||||
redisha::redisha_members_role: roles::infra::git::redis
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
hiera_include:
|
||||
- frrouting
|
||||
- exporters::frr_exporter
|
||||
- profiles::metrics::ntopng
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
# routing
|
||||
sysctl::base::values:
|
||||
@@ -31,11 +28,3 @@ profiles::consul::client::node_rules:
|
||||
- resource: service
|
||||
segment: frr_exporter
|
||||
disposition: write
|
||||
|
||||
# ntopng passive dpi; capture interfaces are per-host
|
||||
profiles::metrics::ntopng::influx_url: https://vmagent.k8s.syd1.au.unkin.net
|
||||
profiles::yum::global::repos:
|
||||
ntop:
|
||||
ensure: present
|
||||
ntop-noarch:
|
||||
ensure: present
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
hiera_include:
|
||||
- wireguard
|
||||
- frrouting
|
||||
|
||||
# no consul datacentre at the edge, so nothing to register or scrape via consul
|
||||
profiles::consul::client::enable: false
|
||||
exporters::node_exporter::enable: false
|
||||
|
||||
# ssh only from the lab over the vpn
|
||||
ssh::server::options:
|
||||
AllowUsers: '*@198.18.0.0/16 *@10.10.12.200/32'
|
||||
|
||||
# routing
|
||||
sysctl::base::values:
|
||||
net.ipv4.ip_forward:
|
||||
value: '1'
|
||||
|
||||
# frrouting: p2p ospf over wg0; loopback /32, wg /31 and vpc /24 only, no default route in or out
|
||||
frrouting::daemons:
|
||||
ospfd: true
|
||||
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
||||
frrouting::ospfd_interfaces:
|
||||
wg0:
|
||||
area: 0.0.0.0
|
||||
network: point-to-point
|
||||
dum0:
|
||||
area: 0.0.0.0
|
||||
passive: true
|
||||
frrouting::ospfd_network_interfaces:
|
||||
"%{hiera('networking_vpc_cidr')}":
|
||||
area: 0.0.0.0
|
||||
passive: true
|
||||
frrouting::ospfd_redistribute:
|
||||
- connected
|
||||
frrouting::ospfd_redistribute_connected_permit:
|
||||
- "%{hiera('networking_loopback0_ip')}/32"
|
||||
- "%{hiera('networking_wg_link')}"
|
||||
- "%{hiera('networking_vpc_cidr')}"
|
||||
frrouting::ospfd_deny_default_in: true
|
||||
frrouting::ospf_preferred_source_enable: true
|
||||
frrouting::ospf_preferred_source: "%{hiera('networking_loopback0_ip')}"
|
||||
@@ -1,5 +1,3 @@
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
profiles::pki::vault::alt_names:
|
||||
- jumphost.service.consul
|
||||
- jumphost.query.consul
|
||||
|
||||
@@ -31,7 +31,7 @@ profiles::puppet::enc::repo: https://git.service.au-syd1.consul/unkinben/puppet-
|
||||
# Deep-merged with the entries in roles/infra/puppet.yaml.
|
||||
profiles::packages::include:
|
||||
encapic:
|
||||
ensure: '0.5.0'
|
||||
ensure: '0.2.0'
|
||||
certmanager:
|
||||
ensure: '0.2.0'
|
||||
sshsignhost:
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
hiera_include:
|
||||
- profiles::reposync::webserver
|
||||
|
||||
profiles::ssh::sign::principals:
|
||||
- packagerepo.service.consul
|
||||
- packagerepo.query.consul
|
||||
- "packagerepo.service.%{facts.country}-%{facts.region}.consul"
|
||||
|
||||
# additional altnames
|
||||
profiles::pki::vault::alt_names:
|
||||
- packagerepo.main.unkin.net
|
||||
- packagerepo.service.consul
|
||||
- packagerepo.query.consul
|
||||
- "packagerepo.service.%{facts.country}-%{facts.region}.consul"
|
||||
|
||||
# configure consul service
|
||||
consul::services:
|
||||
packagerepo:
|
||||
service_name: 'packagerepo'
|
||||
tags:
|
||||
- 'packagerepo'
|
||||
address: "%{facts.networking.ip}"
|
||||
port: 443
|
||||
checks:
|
||||
- id: 'packagerepo_http_check'
|
||||
name: 'packagerepo HTTP Check'
|
||||
http: "https://%{facts.networking.fqdn}"
|
||||
method: 'GET'
|
||||
tls_skip_verify: true
|
||||
interval: '10s'
|
||||
timeout: '1s'
|
||||
profiles::consul::client::node_rules:
|
||||
- resource: service
|
||||
segment: packagerepo
|
||||
disposition: write
|
||||
|
||||
profiles::reposync::webserver::nginx_listen_mode: both
|
||||
profiles::reposync::webserver::nginx_cert_type: vault
|
||||
profiles::reposync::webserver::www_root: /shared/apps/packagerepo/snap
|
||||
profiles::reposync::webserver::cache_root: /data/repos/cache
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
profiles::packages::include:
|
||||
createrepo: {}
|
||||
|
||||
profiles::reposync::repos_list:
|
||||
docker_stable_el8:
|
||||
repository: 'stable'
|
||||
description: 'Docker CE Stable EL8'
|
||||
osname: 'docker'
|
||||
release: 'el8'
|
||||
baseurl: 'https://download.docker.com/linux/centos/8/x86_64/stable/'
|
||||
gpgkey: 'https://download.docker.com/linux/centos/gpg'
|
||||
docker_stable_el9:
|
||||
repository: 'stable'
|
||||
description: 'Docker CE Stable EL9'
|
||||
osname: 'docker'
|
||||
release: 'el9'
|
||||
baseurl: 'https://download.docker.com/linux/centos/9/x86_64/stable/'
|
||||
gpgkey: 'https://download.docker.com/linux/centos/gpg'
|
||||
k8s_1.32:
|
||||
repository: '1.32'
|
||||
description: 'Kubernetes 1.32'
|
||||
osname: 'k8s'
|
||||
release: '1.32'
|
||||
baseurl: 'https://pkgs.k8s.io/core:/stable:/v1.32/rpm/'
|
||||
gpgkey: 'https://pkgs.k8s.io/core:/stable:/v1.32/rpm/repodata/repomd.xml.key'
|
||||
k8s_1.33:
|
||||
repository: '1.33'
|
||||
description: 'Kubernetes 1.33'
|
||||
osname: 'k8s'
|
||||
release: '1.33'
|
||||
baseurl: 'https://pkgs.k8s.io/core:/stable:/v1.33/rpm/'
|
||||
gpgkey: 'https://pkgs.k8s.io/core:/stable:/v1.33/rpm/repodata/repomd.xml.key'
|
||||
puppet7_el8:
|
||||
repository: '8'
|
||||
description: 'Puppet 7 EL8'
|
||||
osname: 'puppet7'
|
||||
release: 'el'
|
||||
baseurl: 'https://yum.puppet.com/puppet7/el/8/x86_64/'
|
||||
gpgkey: 'https://yum.puppet.com/RPM-GPG-KEY-puppet-20250406'
|
||||
puppet7_el9:
|
||||
repository: '9'
|
||||
description: 'Puppet 7 EL9'
|
||||
osname: 'puppet7'
|
||||
release: 'el'
|
||||
baseurl: 'https://yum.puppet.com/puppet7/el/9/x86_64/'
|
||||
gpgkey: 'https://yum.puppet.com/RPM-GPG-KEY-puppet-20250406'
|
||||
puppet8_el8:
|
||||
repository: '8'
|
||||
description: 'Puppet 8 EL8'
|
||||
osname: 'puppet8'
|
||||
release: 'el'
|
||||
baseurl: 'https://yum.puppet.com/puppet8/el/8/x86_64/'
|
||||
gpgkey: 'https://yum.puppet.com/RPM-GPG-KEY-puppet-20250406'
|
||||
puppet8_el9:
|
||||
repository: '9'
|
||||
description: 'Puppet 8 EL9'
|
||||
osname: 'puppet8'
|
||||
release: 'el'
|
||||
baseurl: 'https://yum.puppet.com/puppet8/el/9/x86_64/'
|
||||
gpgkey: 'https://yum.puppet.com/RPM-GPG-KEY-puppet-20250406'
|
||||
zfs_dkms_rhel8:
|
||||
repository: 'dkms'
|
||||
description: 'ZFS DKMS RHEL 8'
|
||||
osname: 'zfs'
|
||||
release: 'rhel8'
|
||||
baseurl: 'http://download.zfsonlinux.org/epel/8/x86_64/'
|
||||
gpgkey: 'https://packagerepo.service.consul/zfs/gpg/RPM-GPG-KEY-openzfs-2013'
|
||||
zfs_kmod_rhel8:
|
||||
repository: 'kmod'
|
||||
description: 'ZFS KMOD RHEL 8'
|
||||
osname: 'zfs'
|
||||
release: 'rhel8'
|
||||
baseurl: 'http://download.zfsonlinux.org/epel/8/kmod/x86_64/'
|
||||
gpgkey: 'https://packagerepo.service.consul/zfs/gpg/RPM-GPG-KEY-openzfs-2013'
|
||||
zfs_dkms_rhel9:
|
||||
repository: 'dkms'
|
||||
description: 'ZFS DKMS RHEL 9'
|
||||
osname: 'zfs'
|
||||
release: 'rhel9'
|
||||
baseurl: 'http://download.zfsonlinux.org/epel/9/x86_64/'
|
||||
gpgkey: 'https://packagerepo.service.consul/zfs/gpg/RPM-GPG-KEY-openzfs-2022'
|
||||
zfs_kmod_rhel9:
|
||||
repository: 'kmod'
|
||||
description: 'ZFS KMOD RHEL 9'
|
||||
osname: 'zfs'
|
||||
release: 'rhel9'
|
||||
baseurl: 'http://download.zfsonlinux.org/epel/9/kmod/x86_64/'
|
||||
gpgkey: 'https://packagerepo.service.consul/zfs/gpg/RPM-GPG-KEY-openzfs-2022'
|
||||
@@ -3,8 +3,6 @@ hiera_include:
|
||||
- frrouting
|
||||
- exporters::frr_exporter
|
||||
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
profiles::consul::server::members_lookup: true
|
||||
profiles::consul::server::data_dir: /data/consul
|
||||
profiles::consul::server::addresses:
|
||||
@@ -44,7 +42,6 @@ profiles::nginx::simpleproxy::nginx_aliases:
|
||||
profiles::nginx::simpleproxy::proxy_port: 8500
|
||||
profiles::nginx::simpleproxy::proxy_path: '/'
|
||||
nginx::client_max_body_size: 512M
|
||||
nginx::proxy_read_timeout: '360s'
|
||||
|
||||
# consul
|
||||
profiles::consul::client::node_rules:
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
profiles::puppet::migrate::enabled: true
|
||||
|
||||
profiles::vault::server::members_role: roles::infra::storage::vault
|
||||
profiles::vault::server::members_lookup: true
|
||||
profiles::vault::server::data_dir: /data/vault
|
||||
|
||||
@@ -69,14 +69,8 @@ class certbot::nginx (
|
||||
'listen_port' => $listen_port,
|
||||
'server_name' => $server_names,
|
||||
'use_default_location' => true,
|
||||
'access_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx_access,nohostname journald',
|
||||
],
|
||||
'error_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx,nohostname',
|
||||
],
|
||||
'access_log' => "/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'error_log' => "/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'www_root' => "${data_root}/pub",
|
||||
'autoindex' => 'on',
|
||||
'ssl' => $enable_ssl,
|
||||
|
||||
@@ -6,10 +6,13 @@ class frrouting (
|
||||
String $service_name = 'frr',
|
||||
Hash $daemons = {},
|
||||
Hash $ospfd_interfaces = {},
|
||||
Hash[Stdlib::IP::Address::V4::CIDR, Hash] $ospfd_network_interfaces = {}, # like ospfd_interfaces, keyed by a subnet the interface holds
|
||||
String $ospfd_router_id = $facts['networking']['ip'],
|
||||
Array[String] $ospfd_redistribute = [],
|
||||
Array[String] $ospfd_networks = [],
|
||||
Boolean $ospfd_default_originate_always = false,
|
||||
Array[Stdlib::IP::Address::V4::CIDR] $ospfd_redistribute_connected_permit = [], # only these exact connected prefixes are redistributed
|
||||
Boolean $ospfd_deny_default_in = false, # keep a learned default route out of the routing table
|
||||
Boolean $mpls_te_enabled = false,
|
||||
Optional[String] $mpls_ldp_router_id = undef,
|
||||
Optional[String] $mpls_ldp_transport_addr = undef,
|
||||
@@ -19,7 +22,6 @@ class frrouting (
|
||||
Boolean $ospf_exclude_k8s_enable = false,
|
||||
Optional[Stdlib::IP::Address::V4::CIDR] $k8s_cluster_cidr = undef, # pod/cluster CIDR (e.g. 10.42.0.0/16)
|
||||
Optional[Stdlib::IP::Address::V4::CIDR] $k8s_service_cidr = undef, # service CIDR (e.g. 10.43.0.0/16)
|
||||
Array[Stdlib::IP::Address::V4::CIDR] $ospf_connected_exclude = [], # exact-match prefixes kept out of redistribute connected
|
||||
) {
|
||||
|
||||
# sanity check
|
||||
@@ -27,9 +29,16 @@ class frrouting (
|
||||
warning('frrouting: ospf_exclude_k8s_enable is true but no k8s_*_cidr provided; nothing will be filtered.')
|
||||
}
|
||||
|
||||
if $ospf_exclude_k8s_enable and !empty($ospf_connected_exclude) {
|
||||
fail('frrouting: ospf_exclude_k8s_enable and ospf_connected_exclude are mutually exclusive.')
|
||||
$network_interfaces = $ospfd_network_interfaces.reduce({}) |$memo, $entry| {
|
||||
$matched = $facts['networking']['interfaces'].filter |$name, $iface| {
|
||||
$iface['bindings'] =~ Array and $iface['bindings'].any |$binding| { stdlib::ip_in_range($binding['address'], $entry[0]) }
|
||||
}
|
||||
if empty($matched) {
|
||||
fail("frrouting: no interface holds an address in ${entry[0]}")
|
||||
}
|
||||
$memo + $matched.keys.reduce({}) |$acc, $name| { $acc + { $name => $entry[1] } }
|
||||
}
|
||||
$ospfd_interfaces_all = $ospfd_interfaces + $network_interfaces
|
||||
|
||||
$daemons_defaults = {
|
||||
'bgpd' => false,
|
||||
|
||||
@@ -3,11 +3,14 @@ frr defaults traditional
|
||||
hostname <%= @hostname %>
|
||||
no ipv6 forwarding
|
||||
|
||||
<% @ospfd_interfaces.each do |iface, params| -%>
|
||||
<% @ospfd_interfaces_all.each do |iface, params| -%>
|
||||
interface <%= iface %>
|
||||
<% if params['area'] -%>
|
||||
ip ospf area <%= params['area'] %>
|
||||
<% end -%>
|
||||
<% if params['network'] -%>
|
||||
ip ospf network <%= params['network'] %>
|
||||
<% end -%>
|
||||
<% if params['passive'] == true -%>
|
||||
ip ospf passive
|
||||
<% end -%>
|
||||
@@ -27,18 +30,19 @@ exit
|
||||
route-map CONNECTED-NON-K8S permit 100
|
||||
exit
|
||||
<% end -%>
|
||||
<% if @ospf_connected_exclude.any? -%>
|
||||
! Do not redistribute default route
|
||||
<% @ospf_connected_exclude.each_with_index do |prefix, i| -%>
|
||||
ip prefix-list REDIST-BLOCK seq <%= (i + 1) * 5 %> permit <%= prefix %>
|
||||
<% end -%>
|
||||
|
||||
route-map CONNECTED-EXCLUDE-REDIST deny 5
|
||||
match ip address prefix-list REDIST-BLOCK
|
||||
exit
|
||||
route-map CONNECTED-EXCLUDE-REDIST permit 100
|
||||
<% if @ospfd_redistribute_connected_permit.any? -%>
|
||||
<% @ospfd_redistribute_connected_permit.each_with_index do |prefix, i| -%>
|
||||
ip prefix-list CONNECTED-PERMIT seq <%= (i + 1) * 5 %> permit <%= prefix %>
|
||||
<% end -%>
|
||||
route-map CONNECTED-PERMIT permit 10
|
||||
match ip address prefix-list CONNECTED-PERMIT
|
||||
exit
|
||||
<% end -%>
|
||||
<% if @ospfd_deny_default_in -%>
|
||||
access-list NO-DEFAULT seq 5 deny 0.0.0.0/0 exact-match
|
||||
access-list NO-DEFAULT seq 10 permit any
|
||||
<% end -%>
|
||||
|
||||
router ospf
|
||||
ospf router-id <%= @ospfd_router_id %>
|
||||
@@ -46,8 +50,8 @@ router ospf
|
||||
<% @ospfd_redistribute.each do |type| -%>
|
||||
<% if @ospf_exclude_k8s_enable && type == 'connected' && (@k8s_cluster_cidr || @k8s_service_cidr) -%>
|
||||
redistribute connected route-map CONNECTED-NON-K8S
|
||||
<% elsif type == 'connected' && @ospf_connected_exclude.any? -%>
|
||||
redistribute connected route-map CONNECTED-EXCLUDE-REDIST
|
||||
<% elsif type == 'connected' && @ospfd_redistribute_connected_permit.any? -%>
|
||||
redistribute connected route-map CONNECTED-PERMIT
|
||||
<% else -%>
|
||||
redistribute <%= type %>
|
||||
<% end -%>
|
||||
@@ -55,6 +59,9 @@ router ospf
|
||||
<% @ospfd_networks.each do |network| -%>
|
||||
network <%= network %>
|
||||
<% end -%>
|
||||
<% if @ospfd_deny_default_in -%>
|
||||
distribute-list NO-DEFAULT in
|
||||
<% end -%>
|
||||
<% if @ospfd_default_originate_always -%>
|
||||
default-information originate always
|
||||
<% end -%>
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'facter'
|
||||
require 'ipaddr'
|
||||
require 'json'
|
||||
|
||||
# Exposes systemd-networkd managed link state from `networkctl --json=short`, keyed by interface name.
|
||||
module NetworkctlFact
|
||||
module_function
|
||||
|
||||
KEYS = %w[Type Kind AdministrativeState OperationalState CarrierState OnlineState MTU
|
||||
NetworkFile NetworkFileDropins NetDevFile NetDevFileDropins LinkFile].freeze
|
||||
|
||||
def address(addr)
|
||||
return unless [2, 10].include?(addr['Family'])
|
||||
|
||||
"#{IPAddr.new_ntoh(addr['Address'].pack('C*'))}/#{addr['PrefixLength']}"
|
||||
end
|
||||
|
||||
def mac(bytes)
|
||||
bytes&.map { |byte| format('%02x', byte) }&.join(':')
|
||||
end
|
||||
|
||||
def slim(iface)
|
||||
out = iface.slice(*KEYS).merge('HardwareAddress' => mac(iface['HardwareAddress'])).compact
|
||||
out.reject! { |_key, val| val == [] }
|
||||
addrs = Array(iface['Addresses']).filter_map { |addr| address(addr) }
|
||||
out['Addresses'] = addrs unless addrs.empty?
|
||||
out
|
||||
end
|
||||
|
||||
def parse(output)
|
||||
managed = JSON.parse(output).fetch('Interfaces').reject { |iface| iface['AdministrativeState'] == 'unmanaged' }
|
||||
managed.to_h { |iface| [iface['Name'], slim(iface)] } unless managed.empty?
|
||||
end
|
||||
|
||||
def resolve
|
||||
output = Facter::Core::Execution.execute('networkctl --json=short 2>/dev/null', on_fail: nil)
|
||||
return nil if output.to_s.empty?
|
||||
|
||||
parse(output)
|
||||
rescue StandardError
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
Facter.add(:networkctl) do
|
||||
confine kernel: 'Linux'
|
||||
confine { Facter::Core::Execution.which('networkctl') }
|
||||
confine { File.directory?('/run/systemd/netif') }
|
||||
setcode { NetworkctlFact.resolve }
|
||||
end
|
||||
@@ -26,47 +26,16 @@ class victorialogs::client::journald (
|
||||
content => template('victorialogs/client.journald.conf.erb')
|
||||
}
|
||||
|
||||
if $facts['os']['selinux']['config_mode'] == 'enforcing' {
|
||||
$journal_upload_te = @("EOF")
|
||||
module journal_upload_local 1.0;
|
||||
|
||||
require {
|
||||
type systemd_journal_upload_t;
|
||||
type http_port_t;
|
||||
class tcp_socket name_connect;
|
||||
}
|
||||
|
||||
allow systemd_journal_upload_t http_port_t:tcp_socket name_connect;
|
||||
| EOF
|
||||
|
||||
selinux::module { 'journal_upload_local':
|
||||
ensure => 'present',
|
||||
content_te => $journal_upload_te,
|
||||
builder => 'simple',
|
||||
before => Service['systemd-journal-upload'],
|
||||
}
|
||||
}
|
||||
|
||||
service {'systemd-journal-upload':
|
||||
ensure => true,
|
||||
enable => true,
|
||||
subscribe => File['/etc/systemd/journal-upload.conf.d/victorialogs.conf'],
|
||||
}
|
||||
|
||||
# EL drops the audit socket from journald's Sockets=; journald only takes listen fds at start
|
||||
systemd::dropin_file { 'audit.conf':
|
||||
unit => 'systemd-journald.service',
|
||||
content => "[Service]\nSockets=systemd-journald-audit.socket\n",
|
||||
}
|
||||
}else{
|
||||
|
||||
file {'/etc/systemd/journal-upload.conf.d/victorialogs.conf':
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
systemd::dropin_file { 'audit.conf':
|
||||
ensure => absent,
|
||||
unit => 'systemd-journald.service',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ define wireguard::interface (
|
||||
Optional[Stdlib::Port] $listen_port = undef,
|
||||
Optional[Integer[1280, 9000]] $mtu = undef,
|
||||
Optional[Sensitive[String[1]]] $private_key = undef,
|
||||
Optional[String[1]] $table = undef,
|
||||
Array[String[1]] $post_up = [],
|
||||
Array[Struct[{
|
||||
public_key => String[1],
|
||||
allowed_ips => Variant[String[1], Array[String[1], 1]],
|
||||
|
||||
@@ -9,11 +9,17 @@ ListenPort = <%= @listen_port %>
|
||||
<% if @mtu -%>
|
||||
MTU = <%= @mtu %>
|
||||
<% end -%>
|
||||
<% if @table -%>
|
||||
Table = <%= @table %>
|
||||
<% end -%>
|
||||
<% if @key -%>
|
||||
PrivateKey = <%= @key %>
|
||||
<% else -%>
|
||||
PostUp = wg set %i private-key /etc/wireguard/%i.key
|
||||
<% end -%>
|
||||
<% @post_up.each do |cmd| -%>
|
||||
PostUp = <%= cmd %>
|
||||
<% end -%>
|
||||
<% @peers.each do |peer| -%>
|
||||
|
||||
[Peer]
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -79,14 +79,8 @@ class profiles::edgecache::nginx {
|
||||
'listen_port' => $listen_port,
|
||||
'server_name' => $server_names,
|
||||
'use_default_location' => true,
|
||||
'access_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx_access,nohostname journald',
|
||||
],
|
||||
'error_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx,nohostname',
|
||||
],
|
||||
'access_log' => "/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'error_log' => "/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'www_root' => "${data_root}/pub",
|
||||
'autoindex' => 'on',
|
||||
'ssl' => $enable_ssl,
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
# passive ntopng community dpi on the given interfaces, local redis, web ui on localhost only
|
||||
# - influx_url: influxdb-compatible write base url (ntopng appends /write?db=...); unset keeps the local rrd driver
|
||||
# timeseries are interface-level ndpi protocol + category only; per-host series stay off for cardinality
|
||||
class profiles::metrics::ntopng (
|
||||
Array[String[1], 1] $interfaces,
|
||||
Optional[Stdlib::HTTPUrl] $influx_url = undef,
|
||||
String[1] $influx_dbname = 'ntopng',
|
||||
String[1] $http_listen = '127.0.0.1:3000',
|
||||
) {
|
||||
include redis
|
||||
|
||||
package { 'ntopng':
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
$conf = ($interfaces.map |$i| { "-i=${i}" } + [
|
||||
'-r=127.0.0.1:6379',
|
||||
"-w=${http_listen}",
|
||||
'-W=0',
|
||||
]).join("\n")
|
||||
|
||||
file { '/etc/ntopng/ntopng.conf':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => "${conf}\n",
|
||||
require => Package['ntopng'],
|
||||
notify => Service['ntopng'],
|
||||
}
|
||||
|
||||
# timeseries settings are runtime prefs held in redis, not config-file options
|
||||
$ts_prefs = {
|
||||
'hosts_ts_creation' => 'off',
|
||||
'host_ndpi_timeseries_creation' => 'none',
|
||||
'interface_ndpi_timeseries_creation' => 'both',
|
||||
}
|
||||
$influx_prefs = $influx_url ? {
|
||||
undef => {},
|
||||
default => {
|
||||
'timeseries_driver' => 'influxdb',
|
||||
'ts_post_data_url' => $influx_url,
|
||||
'influx_dbname' => $influx_dbname,
|
||||
},
|
||||
}
|
||||
|
||||
($ts_prefs + $influx_prefs).each |$key, $value| {
|
||||
exec { "ntopng_pref_${key}":
|
||||
provider => shell,
|
||||
command => "/usr/bin/redis-cli set ntopng.prefs.${key} '${value}'",
|
||||
unless => "/usr/bin/test \"$(/usr/bin/redis-cli get ntopng.prefs.${key})\" = '${value}'",
|
||||
require => Class['redis'],
|
||||
notify => Service['ntopng'],
|
||||
}
|
||||
}
|
||||
|
||||
service { 'ntopng':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => [Package['ntopng'], Class['redis']],
|
||||
}
|
||||
}
|
||||
@@ -86,14 +86,8 @@ class profiles::nginx::simpleproxy (
|
||||
'listen_port' => $listen_port,
|
||||
'server_name' => $server_names,
|
||||
'use_default_location' => $use_default_location,
|
||||
'access_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx_access,nohostname journald',
|
||||
],
|
||||
'error_log' => [
|
||||
"/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx,nohostname',
|
||||
],
|
||||
'access_log' => "/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'error_log' => "/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'autoindex' => 'on',
|
||||
'ssl' => $enable_ssl,
|
||||
'ssl_cert' => $ssl_cert,
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
# profiles::puppet::agent
|
||||
# This class manages Puppet agent package and service.
|
||||
class profiles::puppet::agent (
|
||||
String $version = 'latest',
|
||||
String $version = 'latest',
|
||||
Boolean $openvox_enable = false,
|
||||
) {
|
||||
|
||||
# RedHat-family installs OpenVox from artifactapi; Debian installs puppet-agent via apt
|
||||
$use_package = $facts['os']['family'] ? {
|
||||
'RedHat' => 'openvox-agent',
|
||||
default => 'puppet-agent',
|
||||
# set openvox package, yumrepo, service
|
||||
if $openvox_enable {
|
||||
$use_package = 'openvox-agent'
|
||||
$use_yumrepo = 'openvox'
|
||||
$use_service = 'puppet'
|
||||
}else{
|
||||
$use_package = 'puppet-agent'
|
||||
$use_yumrepo = 'puppet'
|
||||
$use_service = 'puppet'
|
||||
}
|
||||
$use_service = 'puppet'
|
||||
|
||||
# OpenVox publishes RedHat-family builds per distribution: enterprise-linux
|
||||
# under el/<major>, Fedora under fedora/<major>.
|
||||
@@ -18,7 +23,8 @@ class profiles::puppet::agent (
|
||||
default => 'el',
|
||||
}
|
||||
|
||||
if $facts['os']['family'] == 'RedHat' {
|
||||
# manage the yumrepo for the given package
|
||||
if $openvox_enable and $facts['os']['family'] == 'RedHat' {
|
||||
yumrepo { 'openvox':
|
||||
ensure => 'present',
|
||||
baseurl => "https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/openvox/openvox7/${openvox_dist}/${facts['os']['release']['major']}/${facts['os']['architecture']}/",
|
||||
@@ -26,6 +32,14 @@ class profiles::puppet::agent (
|
||||
gpgkey => 'https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/openvox/GPG-KEY-openvox.pub',
|
||||
notify => Exec['dnf_makecache'],
|
||||
}
|
||||
}else{
|
||||
yumrepo { 'puppet':
|
||||
ensure => 'present',
|
||||
baseurl => "https://packagerepo.service.consul/puppet7/el/${facts['os']['release']['major']}-daily/${facts['os']['architecture']}/os/",
|
||||
descr => 'puppet repository',
|
||||
gpgkey => "https://packagerepo.service.consul/puppet7/el/${facts['os']['release']['major']}-daily/${facts['os']['architecture']}/os/RPM-GPG-KEY-puppet-20250406",
|
||||
notify => Exec['dnf_makecache'],
|
||||
}
|
||||
}
|
||||
|
||||
# if agent-version is anything other than latest, set a versionlock
|
||||
@@ -43,7 +57,7 @@ class profiles::puppet::agent (
|
||||
# Ensure the agent package is installed and locked to a specific version
|
||||
package { $use_package:
|
||||
ensure => $version,
|
||||
require => Yumrepo['openvox'],
|
||||
require => Yumrepo[$use_yumrepo],
|
||||
}
|
||||
|
||||
# versionlock puppet-agent before install so the lock exists before any upgrade is attempted
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
# config so the encapi endpoint can change without repackaging.
|
||||
class profiles::puppet::encapic (
|
||||
Stdlib::HTTPUrl $encapi_url,
|
||||
Stdlib::AbsolutePath $config_dir = '/etc/encapi',
|
||||
Stdlib::AbsolutePath $config_dir = '/etc/encapic',
|
||||
String $config_name = 'encapic.conf',
|
||||
String $owner = 'root',
|
||||
String $group = 'root',
|
||||
) {
|
||||
|
||||
# order after the package so the shim exists before the config does.
|
||||
# The RPM ships this file as %config(noreplace), so puppet must write it only
|
||||
# once the package is present or the install overwrites it.
|
||||
file { $config_dir:
|
||||
ensure => directory,
|
||||
mode => '0755',
|
||||
@@ -28,11 +29,4 @@ class profiles::puppet::encapic (
|
||||
content => "ENCAPI_URL=${encapi_url}\n",
|
||||
require => File[$config_dir],
|
||||
}
|
||||
|
||||
# legacy pre-0.5.0 config dir; also clears any rpm .rpmsave left behind
|
||||
file { '/etc/encapic':
|
||||
ensure => absent,
|
||||
force => true,
|
||||
require => Package['encapic'],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
# still points at it when it applies this change). profiles::puppet::client
|
||||
# rewrites puppet.conf with the new server / ca_server / report_server / ssldir
|
||||
# and notifies Service['puppet'], so the very next agent run lands on k8s.
|
||||
# The puppet.conf change also fires a detached noop run so facts and exported
|
||||
# resources register in the k8s PuppetDB immediately.
|
||||
#
|
||||
# NOTE: this is deliberately hiera-driven per node/role so waves can be rolled
|
||||
# out and rolled back one target at a time. The class only manages the fresh
|
||||
@@ -85,15 +83,5 @@ class profiles::puppet::migrate (
|
||||
group => 'root',
|
||||
mode => '0771',
|
||||
}
|
||||
|
||||
exec { 'puppet-migrate-noop-run':
|
||||
command => join([
|
||||
'/usr/bin/systemd-run --unit=puppet-migrate-noop --collect',
|
||||
'/opt/puppetlabs/bin/puppet agent --onetime --no-daemonize --noop --no-splay --waitforlock 10 --maxwaitforlock 900',
|
||||
], ' '),
|
||||
unless => '/usr/bin/systemctl is-active --quiet puppet-migrate-noop',
|
||||
refreshonly => true,
|
||||
subscribe => File['/etc/puppetlabs/puppet/puppet.conf'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,14 +115,6 @@ class profiles::puppet::puppetboard (
|
||||
proxy_redirect => 'off',
|
||||
proxy_connect_timeout => '10s',
|
||||
proxy_read_timeout => '10s',
|
||||
access_log => [
|
||||
"/var/log/nginx/${nginx_vhost}.access.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx_access,nohostname journald',
|
||||
],
|
||||
error_log => [
|
||||
"/var/log/nginx/${nginx_vhost}.error.log",
|
||||
'syslog:server=unix:/dev/log,tag=nginx,nohostname',
|
||||
],
|
||||
}
|
||||
|
||||
# service static files from nginx for performance
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# setup the autopromoter
|
||||
class profiles::reposync::autopromoter {
|
||||
|
||||
# Ensure the autopromoter script is present and executable
|
||||
file { '/usr/local/bin/autopromoter':
|
||||
ensure => 'file',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
content => template('profiles/reposync/autopromoter.erb'),
|
||||
}
|
||||
|
||||
# daily autopromote service/timer
|
||||
$_daily_timer = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter daily timer
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 05:00:00
|
||||
RandomizedDelaySec=1s
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOT
|
||||
|
||||
$_daily_service = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter daily service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/autopromoter daily
|
||||
User=root
|
||||
Group=root
|
||||
PermissionsStartOnly=false
|
||||
PrivateTmp=no
|
||||
EOT
|
||||
|
||||
systemd::timer { 'autopromoter-daily.timer':
|
||||
timer_content => $_daily_timer,
|
||||
service_content => $_daily_service,
|
||||
active => true,
|
||||
enable => true,
|
||||
require => File['/usr/local/bin/autopromoter'],
|
||||
}
|
||||
|
||||
# weekly autopromote service/timer
|
||||
$_weekly_timer = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter weekly timer
|
||||
[Timer]
|
||||
OnCalendar=Sun *-*-* 05:05:00
|
||||
RandomizedDelaySec=1s
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOT
|
||||
|
||||
$_weekly_service = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter weekly service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/autopromoter weekly
|
||||
User=root
|
||||
Group=root
|
||||
PermissionsStartOnly=false
|
||||
PrivateTmp=no
|
||||
EOT
|
||||
|
||||
systemd::timer { 'autopromoter-weekly.timer':
|
||||
timer_content => $_weekly_timer,
|
||||
service_content => $_weekly_service,
|
||||
active => true,
|
||||
enable => true,
|
||||
require => File['/usr/local/bin/autopromoter'],
|
||||
}
|
||||
|
||||
# monthly autopromote service/timer
|
||||
$_monthly_timer = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter monthly timer
|
||||
[Timer]
|
||||
OnCalendar=*-*-01 05:10:00
|
||||
RandomizedDelaySec=1s
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOT
|
||||
|
||||
$_monthly_service = @(EOT)
|
||||
[Unit]
|
||||
Description=autopromoter monthly service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/autopromoter monthly
|
||||
User=root
|
||||
Group=root
|
||||
PermissionsStartOnly=false
|
||||
PrivateTmp=no
|
||||
EOT
|
||||
|
||||
systemd::timer { 'autopromoter-monthly.timer':
|
||||
timer_content => $_monthly_timer,
|
||||
service_content => $_monthly_service,
|
||||
active => true,
|
||||
enable => true,
|
||||
require => File['/usr/local/bin/autopromoter'],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
# setup the autosyncer
|
||||
class profiles::reposync::autosyncer (
|
||||
Stdlib::Absolutepath $basepath = '/shared/apps/packagerepo',
|
||||
) {
|
||||
|
||||
# Ensure the autosyncer script is present and executable
|
||||
file { '/usr/local/bin/autosyncer':
|
||||
ensure => 'file',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
content => template('profiles/reposync/autosyncer.erb'),
|
||||
require => Package['createrepo'],
|
||||
}
|
||||
|
||||
# daily autosyncr service/timer
|
||||
$_timer = @(EOT)
|
||||
[Unit]
|
||||
Description=autosyncer timer
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 03:00:00
|
||||
RandomizedDelaySec=1s
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOT
|
||||
|
||||
$_service = @(EOT)
|
||||
[Unit]
|
||||
Description=autosyncer service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/autosyncer
|
||||
User=root
|
||||
Group=root
|
||||
PermissionsStartOnly=false
|
||||
PrivateTmp=no
|
||||
EOT
|
||||
|
||||
systemd::timer { 'autosyncer.timer':
|
||||
timer_content => $_timer,
|
||||
service_content => $_service,
|
||||
active => true,
|
||||
enable => true,
|
||||
require => File['/usr/local/bin/autosyncer'],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# define to generate repositories in yum
|
||||
define profiles::reposync::repos (
|
||||
String $repository,
|
||||
String $description,
|
||||
String $osname,
|
||||
String $release,
|
||||
Stdlib::Filesource $gpgkey,
|
||||
String $arch = 'x86_64',
|
||||
String $repo_owner = 'root',
|
||||
String $repo_group = 'root',
|
||||
Stdlib::Absolutepath $basepath = '/shared/apps/packagerepo',
|
||||
Optional[Stdlib::HTTPUrl] $baseurl = undef,
|
||||
Optional[Stdlib::HTTPUrl] $mirrorlist = undef,
|
||||
){
|
||||
|
||||
if ($mirrorlist == undef and $baseurl == undef) or ($mirrorlist != undef and $baseurl != undef) {
|
||||
fail('profiles::reposync::repos must have either mirrorlist or baseurl set, but not both')
|
||||
}
|
||||
|
||||
$repos_name = downcase("${osname}-${release}-${repository}-${arch}")
|
||||
$conf_file = "/etc/reposync/conf.d/${repos_name}.conf"
|
||||
|
||||
# Create the repository configuration
|
||||
yumrepo { $repos_name:
|
||||
ensure => 'present',
|
||||
descr => $description,
|
||||
baseurl => $baseurl,
|
||||
mirrorlist => $mirrorlist,
|
||||
gpgkey => $gpgkey,
|
||||
target => '/etc/yum.repos.d/reposync.repo',
|
||||
enabled => 0,
|
||||
gpgcheck => 1,
|
||||
}
|
||||
|
||||
# Ensure the repo dest path exists
|
||||
file { "${basepath}/live/${repos_name}" :
|
||||
ensure => 'directory',
|
||||
owner => $repo_owner,
|
||||
group => $repo_group,
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
# Create the repo configuration file
|
||||
file { $conf_file:
|
||||
ensure => file,
|
||||
owner => $repo_owner,
|
||||
group => $repo_group,
|
||||
mode => '0644',
|
||||
content => template('profiles/reposync/repo_conf.erb'),
|
||||
require => File['/etc/reposync/conf.d'],
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# setup a reposync syncer
|
||||
class profiles::reposync::syncer {
|
||||
|
||||
include profiles::reposync::autosyncer
|
||||
include profiles::reposync::autopromoter
|
||||
|
||||
# Ensure the reposync config path exists
|
||||
file { '/etc/reposync':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
file { '/etc/reposync/conf.d':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
purge => true,
|
||||
recurse => true,
|
||||
force => true,
|
||||
}
|
||||
|
||||
# get a list of repos as a hash, and iterate through them
|
||||
$repos = lookup('profiles::reposync::repos_list', {})
|
||||
$repos.each | String $name, Hash $repo_hash | {
|
||||
profiles::reposync::repos { $name:
|
||||
* => $repo_hash,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
# setup a reposync webserver
|
||||
class profiles::reposync::webserver (
|
||||
String $www_root = '/data/repos/snap',
|
||||
String $cache_root = '/data/repos/cache',
|
||||
String $nginx_vhost = 'packagerepo.service.consul',
|
||||
Stdlib::Port $nginx_port = 80,
|
||||
Stdlib::Port $nginx_ssl_port = 443,
|
||||
Boolean $favicon = true,
|
||||
Enum['http','https','both'] $nginx_listen_mode = 'http',
|
||||
Enum['puppet', 'vault'] $nginx_cert_type = 'vault'
|
||||
) {
|
||||
|
||||
# ensure all the required directories exist
|
||||
mkdir::p { $www_root: }
|
||||
mkdir::p { $cache_root: }
|
||||
|
||||
# select the certificates to use based on cert type
|
||||
case $nginx_cert_type {
|
||||
'puppet': {
|
||||
$selected_ssl_cert = "/etc/pki/tls/puppet/${facts['networking']['fqdn']}.crt"
|
||||
$selected_ssl_key = "/etc/pki/tls/puppet/${facts['networking']['fqdn']}.key"
|
||||
}
|
||||
'vault': {
|
||||
$selected_ssl_cert = '/etc/pki/tls/vault/certificate.crt'
|
||||
$selected_ssl_key = '/etc/pki/tls/vault/private.key'
|
||||
}
|
||||
default: {
|
||||
# enum param prevents this ever being reached
|
||||
}
|
||||
}
|
||||
|
||||
# set variables based on the listen_mode
|
||||
case $nginx_listen_mode {
|
||||
'http': {
|
||||
$enable_ssl = false
|
||||
$ssl_cert = undef
|
||||
$ssl_key = undef
|
||||
$listen_port = $nginx_port
|
||||
$listen_ssl_port = undef
|
||||
$extras_hash = {}
|
||||
}
|
||||
'https': {
|
||||
$enable_ssl = true
|
||||
$ssl_cert = $selected_ssl_cert
|
||||
$ssl_key = $selected_ssl_key
|
||||
$listen_port = $nginx_ssl_port
|
||||
$listen_ssl_port = $nginx_ssl_port
|
||||
$extras_hash = {
|
||||
'subscribe' => [File[$ssl_cert], File[$ssl_key]],
|
||||
}
|
||||
}
|
||||
'both': {
|
||||
$enable_ssl = true
|
||||
$ssl_cert = $selected_ssl_cert
|
||||
$ssl_key = $selected_ssl_key
|
||||
$listen_port = $nginx_port
|
||||
$listen_ssl_port = $nginx_ssl_port
|
||||
$extras_hash = {
|
||||
'subscribe' => [File[$ssl_cert], File[$ssl_key]],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
# enum param prevents this ever being reached
|
||||
}
|
||||
}
|
||||
|
||||
# define the default parameters for the nginx server
|
||||
$defaults = {
|
||||
'listen_port' => $listen_port,
|
||||
'server_name' => [$nginx_vhost],
|
||||
'use_default_location' => true,
|
||||
'access_log' => "/var/log/nginx/${nginx_vhost}_access.log",
|
||||
'error_log' => "/var/log/nginx/${nginx_vhost}_error.log",
|
||||
'www_root' => $www_root,
|
||||
'autoindex' => 'on',
|
||||
'ssl' => $enable_ssl,
|
||||
'ssl_cert' => $ssl_cert,
|
||||
'ssl_key' => $ssl_key,
|
||||
'ssl_port' => $listen_ssl_port,
|
||||
}
|
||||
|
||||
# merge the hashes conditionally
|
||||
$nginx_parameters = merge($defaults, $extras_hash)
|
||||
|
||||
# manage the nginx class
|
||||
class { 'nginx':
|
||||
proxy_cache_path => {
|
||||
"${cache_root}/debian" => 'debian:128m',
|
||||
},
|
||||
proxy_cache_levels => '1:2',
|
||||
proxy_cache_keys_zone => 'debian:128m',
|
||||
proxy_cache_max_size => '30000m',
|
||||
proxy_cache_inactive => '60d',
|
||||
proxy_temp_path => "${cache_root}/tmp",
|
||||
manage_repo => false,
|
||||
require => [
|
||||
Mkdir::P[$cache_root],
|
||||
Mkdir::P[$www_root]
|
||||
]
|
||||
}
|
||||
|
||||
# create the nginx vhost with the merged parameters
|
||||
create_resources('nginx::resource::server', { $nginx_vhost => $nginx_parameters })
|
||||
|
||||
# cache debian packages from upstream
|
||||
nginx::resource::location { "${nginx_vhost}-debian":
|
||||
ensure => present,
|
||||
ssl => true,
|
||||
ssl_only => false,
|
||||
location => '/debian',
|
||||
server => $nginx_vhost,
|
||||
proxy => 'http://mirror.gsl.icu/debian',
|
||||
}
|
||||
|
||||
nginx::resource::location { "${nginx_vhost}-debian_pool":
|
||||
ensure => present,
|
||||
ssl => true,
|
||||
ssl_only => false,
|
||||
location => '/debian/pool',
|
||||
server => $nginx_vhost,
|
||||
proxy => 'http://mirror.gsl.icu/debian/pool',
|
||||
proxy_cache => 'debian',
|
||||
proxy_cache_valid => [
|
||||
'200 302 1440h',
|
||||
'404 1m'
|
||||
],
|
||||
}
|
||||
|
||||
if $favicon {
|
||||
file { "${www_root}/favicon.ico":
|
||||
ensure => 'file',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/profiles/reposync/favicon.ico',
|
||||
}
|
||||
}
|
||||
|
||||
if $::facts['os']['selinux']['config_mode'] == 'enforcing' {
|
||||
|
||||
# set httpd_sys_content_t to all files under the www_root
|
||||
selinux::fcontext { $www_root:
|
||||
ensure => 'present',
|
||||
seltype => 'httpd_sys_content_t',
|
||||
pathspec => "${www_root}(/.*)?",
|
||||
}
|
||||
|
||||
# set httpd_sys_rw_content_t to all files under the cache_root
|
||||
selinux::fcontext { $cache_root:
|
||||
ensure => 'present',
|
||||
seltype => 'httpd_sys_rw_content_t',
|
||||
pathspec => "${cache_root}(/.*)?",
|
||||
}
|
||||
|
||||
# make sure we can connect to port 80
|
||||
selboolean { 'httpd_can_network_connect':
|
||||
persistent => true,
|
||||
value => 'on',
|
||||
}
|
||||
|
||||
exec { "restorecon_${www_root}":
|
||||
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||
command => "restorecon -Rv ${www_root}",
|
||||
refreshonly => true,
|
||||
subscribe => Selinux::Fcontext[$www_root],
|
||||
}
|
||||
|
||||
exec { "restorecon_${cache_root}":
|
||||
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||
command => "restorecon -Rv ${cache_root}",
|
||||
refreshonly => true,
|
||||
subscribe => Selinux::Fcontext[$cache_root],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: "${DRY_RUN:=}" # set DRY_RUN=1 to preview deletions
|
||||
|
||||
log() { printf '[%(%F %T)T] %s\n' -1 "$*" >&2; }
|
||||
|
||||
# Function to create symlink for snapshots
|
||||
create_symlink() {
|
||||
local osname="$1" # e.g. almalinux
|
||||
local release="$2" # e.g. 9.6
|
||||
local repository="$3" # e.g. appstream
|
||||
local basepath="$4" # e.g. /shared/apps/packagerepo
|
||||
local label="$5" # monthly|weekly|daily
|
||||
local date_value="$6" # YYYYMMDD for the snapshot to promote
|
||||
|
||||
local snap_path="${basepath}/snap/${osname}/${release}/${repository}-${date_value}"
|
||||
local symlink_target="${basepath}/snap/${osname}/${release}/${repository}-${label}"
|
||||
|
||||
if [[ -d "$snap_path" ]]; then
|
||||
ln -sfn "$snap_path" "$symlink_target"
|
||||
log "Symlink set: ${symlink_target} -> ${snap_path}"
|
||||
return 0
|
||||
else
|
||||
log "Snapshot path does not exist: $snap_path"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Cleanup snapshot directories older than a cutoff date (YYYYMMDD)
|
||||
cleanup_older_than_monthly() {
|
||||
local osname="$1"
|
||||
local release="$2"
|
||||
local repository="$3"
|
||||
local basepath="$4"
|
||||
local cutoff_date="$5" # newly promoted monthly date, YYYYMMDD
|
||||
|
||||
local root="${basepath}/snap/${osname}/${release}"
|
||||
local pattern="${repository}-"[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
|
||||
|
||||
shopt -s nullglob
|
||||
for dir in "${root}"/${pattern}; do
|
||||
# Skip symlinks and non-directories
|
||||
[[ -L "$dir" ]] && continue
|
||||
[[ -d "$dir" ]] || continue
|
||||
|
||||
# Extract the date suffix
|
||||
local name base datepart
|
||||
name="$(basename -- "$dir")"
|
||||
base="${name%-????????}" # remove last 8 chars
|
||||
datepart="${name#${base}-}" # after "<repo>-"
|
||||
|
||||
# Only act on valid YYYYMMDD dates
|
||||
if [[ "$datepart" =~ ^[0-9]{8}$ ]]; then
|
||||
if [[ "$datepart" -lt "$cutoff_date" ]]; then
|
||||
if [[ -n "${DRY_RUN}" ]]; then
|
||||
log "[DRY_RUN] Would remove: $dir"
|
||||
else
|
||||
log "Removing: $dir"
|
||||
rm -rf --one-file-system -- "$dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
}
|
||||
|
||||
# Determine which snapshot to promote based on the passed argument
|
||||
case "${1:-}" in
|
||||
monthly)
|
||||
promote_date=$(date --date="$(date +%Y%m01) -1 month" +%Y%m%d)
|
||||
;;
|
||||
weekly)
|
||||
promote_date=$(date --date="last Sunday" +%Y%m%d)
|
||||
;;
|
||||
daily)
|
||||
promote_date=$(date --date="yesterday" +%Y%m%d)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {monthly|weekly|daily}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
label="$1"
|
||||
|
||||
# Process each repo conf
|
||||
for conf in /etc/reposync/conf.d/*.conf; do
|
||||
# shellcheck disable=SC1090
|
||||
source "$conf"
|
||||
|
||||
# Expecting these vars in the conf: OSNAME, RELEASE, REPOSITORY, BASEPATH
|
||||
: "${OSNAME:?missing OSNAME in $conf}"
|
||||
: "${RELEASE:?missing RELEASE in $conf}"
|
||||
: "${REPOSITORY:?missing REPOSITORY in $conf}"
|
||||
: "${BASEPATH:?missing BASEPATH in $conf}"
|
||||
|
||||
# 1) Promote the symlink for this label
|
||||
if create_symlink "$OSNAME" "$RELEASE" "$REPOSITORY" "$BASEPATH" "$label" "$promote_date"; then
|
||||
# 2) If monthly, clean up older snapshot dirs for this repo
|
||||
if [[ "$label" == "monthly" ]]; then
|
||||
cleanup_older_than_monthly "$OSNAME" "$RELEASE" "$REPOSITORY" "$BASEPATH" "$promote_date"
|
||||
fi
|
||||
else
|
||||
log "Skipping cleanup for ${OSNAME}/${RELEASE}/${REPOSITORY} due to missing ${REPOSITORY}-${promote_date}"
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,97 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Function to perform reposync
|
||||
perform_reposync() {
|
||||
local reponame="$1"
|
||||
local basepath="$2"
|
||||
|
||||
/usr/bin/dnf reposync \
|
||||
--gpgcheck \
|
||||
--delete \
|
||||
--downloadcomps \
|
||||
--download-metadata \
|
||||
--remote-time \
|
||||
--disablerepo="*" \
|
||||
--enablerepo="${reponame}" \
|
||||
--download-path="${basepath}/live"
|
||||
}
|
||||
|
||||
# Function to download GPG keys
|
||||
download_gpg_key() {
|
||||
local gpgkeyurl="$1"
|
||||
local reponame="$2"
|
||||
local basepath="$3"
|
||||
|
||||
# Extract filename from URL
|
||||
local filename=$(basename "$gpgkeyurl")
|
||||
|
||||
# Download GPG key to the specified path with the filename from the URL
|
||||
curl -s --create-dirs -o "${basepath}/live/${reponame}/${filename}" "$gpgkeyurl" || {
|
||||
echo "Failed to download GPG key from $gpgkeyurl"
|
||||
}
|
||||
|
||||
# import the gpg key
|
||||
rpm --import "${basepath}/live/${reponame}/${filename}" || echo "Failed to import gpg key ${basepath}/live/${reponame}/${filename}"
|
||||
}
|
||||
|
||||
# Function to perform rsync with hard links
|
||||
perform_rsync() {
|
||||
local source_path="$1"
|
||||
local dest_path="$2"
|
||||
|
||||
# Create the destination directory if it doesn't exist
|
||||
mkdir -p "$dest_path"
|
||||
|
||||
# Use rsync to create hard links to the files in the destination directory
|
||||
rsync -a --link-dest="$source_path" "$source_path"/* "$dest_path"
|
||||
}
|
||||
|
||||
create_repo_metadata() {
|
||||
local repo_path="${1}"
|
||||
|
||||
if [[ -d "$repo_path" ]]; then
|
||||
echo "Running createrepo on ${repo_path}..."
|
||||
createrepo --update "${repo_path}"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Successfully created repository metadata for ${repo_path}"
|
||||
else
|
||||
echo "Failed to create repository metadata for ${repo_path}" >&2
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "The specified repository path does not exist: ${repo_path}" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Current date in the required format
|
||||
DATE=$(date +%Y%m%d)
|
||||
|
||||
# iterate over each configuration file
|
||||
for conf in /etc/reposync/conf.d/*.conf; do
|
||||
|
||||
# source the configuration to get the variables
|
||||
source "$conf"
|
||||
|
||||
# Call the function to download the GPG key
|
||||
download_gpg_key "$GPGKEYURL" "$REPONAME" "$BASEPATH"
|
||||
|
||||
# Call the reposync function
|
||||
perform_reposync "$REPONAME" "$BASEPATH"
|
||||
|
||||
# Path for rsync source
|
||||
live_path="${BASEPATH}/live/${REPONAME}"
|
||||
|
||||
# Path for rsync destination
|
||||
snap_path="${BASEPATH}/snap/${OSNAME}/${RELEASE}/${REPOSITORY}-${DATE}/${ARCH}/os"
|
||||
|
||||
# Call the rsync function
|
||||
perform_rsync "$live_path" "$snap_path"
|
||||
|
||||
# After syncing each repo, fix the repository metadata
|
||||
create_repo_metadata "${snap_path}"
|
||||
|
||||
# Update selinux
|
||||
restorecon -R ${snap_path}
|
||||
|
||||
done
|
||||
@@ -0,0 +1,8 @@
|
||||
# <%= @osname %>-<%= @release %>-<%= @repository %> repository configuration
|
||||
REPOSITORY="<%= @repository %>"
|
||||
REPONAME="<%= @repos_name %>"
|
||||
OSNAME="<%= @osname %>"
|
||||
RELEASE="<%= @release %>"
|
||||
ARCH="<%= @arch %>"
|
||||
BASEPATH="<%= @basepath %>"
|
||||
GPGKEYURL="<%= @gpgkey %>"
|
||||
@@ -0,0 +1,12 @@
|
||||
# roles::infra::network::wgvpn
|
||||
# a wireguard vpn edge host; routes its vpc to the lab over wg0 with ospf
|
||||
#
|
||||
class roles::infra::network::wgvpn {
|
||||
if $facts['firstrun'] {
|
||||
include profiles::defaults
|
||||
include profiles::firstrun::init
|
||||
}else{
|
||||
include profiles::defaults
|
||||
include profiles::base
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# a role to deploy the webserver for packagerepo
|
||||
class roles::infra::reposync::repo {
|
||||
if $facts['firstrun'] {
|
||||
include profiles::defaults
|
||||
include profiles::firstrun::init
|
||||
}else{
|
||||
include profiles::defaults
|
||||
include profiles::base
|
||||
include profiles::base::datavol
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# a role to deploy the syncer/promoter for packagerepo
|
||||
class roles::infra::reposync::syncer {
|
||||
if $facts['firstrun'] {
|
||||
include profiles::defaults
|
||||
include profiles::firstrun::init
|
||||
}else{
|
||||
include profiles::defaults
|
||||
include profiles::base
|
||||
include profiles::base::datavol
|
||||
include profiles::reposync::syncer
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user