Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23dd962d89 |
@@ -155,9 +155,6 @@ lookup_options:
|
|||||||
zfs::datasets:
|
zfs::datasets:
|
||||||
merge:
|
merge:
|
||||||
strategy: deep
|
strategy: deep
|
||||||
rke2::config_hash:
|
|
||||||
merge:
|
|
||||||
strategy: deep
|
|
||||||
|
|
||||||
facts_path: '/opt/puppetlabs/facter/facts.d'
|
facts_path: '/opt/puppetlabs/facter/facts.d'
|
||||||
|
|
||||||
@@ -371,28 +368,6 @@ profiles::ceph::client::mons:
|
|||||||
- 10.18.15.1
|
- 10.18.15.1
|
||||||
- 10.18.15.2
|
- 10.18.15.2
|
||||||
- 10.18.15.3
|
- 10.18.15.3
|
||||||
|
|
||||||
profiles::ceph::conf::config:
|
|
||||||
global:
|
|
||||||
auth_client_required: 'cephx'
|
|
||||||
auth_cluster_required: 'cephx'
|
|
||||||
auth_service_required: 'cephx'
|
|
||||||
fsid: 'de96a98f-3d23-465a-a899-86d3d67edab8'
|
|
||||||
mon_allow_pool_delete: true
|
|
||||||
mon_initial_members: 'prodnxsr0009,prodnxsr0010,prodnxsr0011,prodnxsr0012,prodnxsr0013'
|
|
||||||
mon_host: '198.18.23.9,198.18.23.10,198.18.23.11,198.18.23.12,198.18.23.13'
|
|
||||||
ms_bind_ipv4: true
|
|
||||||
ms_bind_ipv6: false
|
|
||||||
osd_crush_chooseleaf_type: 1
|
|
||||||
osd_pool_default_min_size: 2
|
|
||||||
osd_pool_default_size: 3
|
|
||||||
osd_pool_default_pg_num: 128
|
|
||||||
public_network: >
|
|
||||||
198.18.23.1/32,198.18.23.2/32,198.18.23.3/32,198.18.23.4/32,
|
|
||||||
198.18.23.5/32,198.18.23.6/32,198.18.23.7/32,198.18.23.8/32,
|
|
||||||
198.18.23.9/32,198.18.23.10/32,198.18.23.11/32,198.18.23.12/32,
|
|
||||||
198.18.23.13/32
|
|
||||||
|
|
||||||
#profiles::base::hosts::additional_hosts:
|
#profiles::base::hosts::additional_hosts:
|
||||||
# - ip: 198.18.17.9
|
# - ip: 198.18.17.9
|
||||||
# hostname: prodinf01n09.main.unkin.net
|
# hostname: prodinf01n09.main.unkin.net
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ profiles::haproxy::dns::vrrp_cnames:
|
|||||||
- git.unkin.net
|
- git.unkin.net
|
||||||
- fafflix.unkin.net
|
- fafflix.unkin.net
|
||||||
- grafana.unkin.net
|
- grafana.unkin.net
|
||||||
- dashboard.ceph.unkin.net
|
|
||||||
|
|
||||||
profiles::haproxy::mappings:
|
profiles::haproxy::mappings:
|
||||||
fe_http:
|
fe_http:
|
||||||
@@ -28,7 +27,6 @@ profiles::haproxy::mappings:
|
|||||||
- 'fafflix.unkin.net be_jellyfin'
|
- 'fafflix.unkin.net be_jellyfin'
|
||||||
- 'git.unkin.net be_gitea'
|
- 'git.unkin.net be_gitea'
|
||||||
- 'grafana.unkin.net be_grafana'
|
- 'grafana.unkin.net be_grafana'
|
||||||
- 'dashboard.ceph.unkin.net be_ceph_dashboard'
|
|
||||||
fe_https:
|
fe_https:
|
||||||
ensure: present
|
ensure: present
|
||||||
mappings:
|
mappings:
|
||||||
@@ -44,7 +42,6 @@ profiles::haproxy::mappings:
|
|||||||
- 'fafflix.unkin.net be_jellyfin'
|
- 'fafflix.unkin.net be_jellyfin'
|
||||||
- 'git.unkin.net be_gitea'
|
- 'git.unkin.net be_gitea'
|
||||||
- 'grafana.unkin.net be_grafana'
|
- 'grafana.unkin.net be_grafana'
|
||||||
- 'dashboard.ceph.unkin.net be_ceph_dashboard'
|
|
||||||
|
|
||||||
profiles::haproxy::frontends:
|
profiles::haproxy::frontends:
|
||||||
fe_http:
|
fe_http:
|
||||||
@@ -65,7 +62,6 @@ profiles::haproxy::frontends:
|
|||||||
- 'acl_fafflix req.hdr(host) -i fafflix.unkin.net'
|
- 'acl_fafflix req.hdr(host) -i fafflix.unkin.net'
|
||||||
- 'acl_gitea req.hdr(host) -i git.unkin.net'
|
- 'acl_gitea req.hdr(host) -i git.unkin.net'
|
||||||
- 'acl_grafana req.hdr(host) -i grafana.unkin.net'
|
- 'acl_grafana req.hdr(host) -i grafana.unkin.net'
|
||||||
- 'acl_ceph_dashboard req.hdr(host) -i dashboard.ceph.unkin.net'
|
|
||||||
- 'acl_internalsubnets src 198.18.0.0/16 10.10.12.0/24'
|
- 'acl_internalsubnets src 198.18.0.0/16 10.10.12.0/24'
|
||||||
use_backend:
|
use_backend:
|
||||||
- "%[req.hdr(host),lower,map(/etc/haproxy/fe_https.map,be_default)]"
|
- "%[req.hdr(host),lower,map(/etc/haproxy/fe_https.map,be_default)]"
|
||||||
@@ -83,7 +79,6 @@ profiles::haproxy::frontends:
|
|||||||
- 'set-header X-Frame-Options DENY if acl_fafflix'
|
- 'set-header X-Frame-Options DENY if acl_fafflix'
|
||||||
- 'set-header X-Frame-Options DENY if acl_gitea'
|
- 'set-header X-Frame-Options DENY if acl_gitea'
|
||||||
- 'set-header X-Frame-Options DENY if acl_grafana'
|
- 'set-header X-Frame-Options DENY if acl_grafana'
|
||||||
- 'set-header X-Frame-Options DENY if acl_ceph_dashboard'
|
|
||||||
- 'set-header X-Content-Type-Options nosniff'
|
- 'set-header X-Content-Type-Options nosniff'
|
||||||
- 'set-header X-XSS-Protection 1;mode=block'
|
- 'set-header X-XSS-Protection 1;mode=block'
|
||||||
|
|
||||||
@@ -267,26 +262,6 @@ profiles::haproxy::backends:
|
|||||||
redirect: 'scheme https if !{ ssl_fc }'
|
redirect: 'scheme https if !{ ssl_fc }'
|
||||||
stick-table: 'type ip size 200k expire 30m'
|
stick-table: 'type ip size 200k expire 30m'
|
||||||
stick: 'on src'
|
stick: 'on src'
|
||||||
be_ceph_dashboard:
|
|
||||||
description: Backend for Ceph Dashboard from Mgr instances
|
|
||||||
collect_exported: false # handled in custom function
|
|
||||||
options:
|
|
||||||
balance: roundrobin
|
|
||||||
option:
|
|
||||||
- httpchk GET /
|
|
||||||
- forwardfor
|
|
||||||
- http-keep-alive
|
|
||||||
- prefer-last-server
|
|
||||||
cookie: SRVNAME insert indirect nocache
|
|
||||||
http-reuse: always
|
|
||||||
http-check:
|
|
||||||
- expect status 200
|
|
||||||
http-request:
|
|
||||||
- set-header X-Forwarded-Port %[dst_port]
|
|
||||||
- add-header X-Forwarded-Proto https if { dst_port 9443 }
|
|
||||||
redirect: 'scheme https if !{ ssl_fc }'
|
|
||||||
stick-table: 'type ip size 200k expire 30m'
|
|
||||||
stick: 'on src'
|
|
||||||
|
|
||||||
profiles::haproxy::certlist::enabled: true
|
profiles::haproxy::certlist::enabled: true
|
||||||
profiles::haproxy::certlist::certificates:
|
profiles::haproxy::certlist::certificates:
|
||||||
@@ -301,7 +276,6 @@ profiles::haproxy::certlist::certificates:
|
|||||||
- /etc/pki/tls/letsencrypt/fafflix.unkin.net/fullchain_combined.pem
|
- /etc/pki/tls/letsencrypt/fafflix.unkin.net/fullchain_combined.pem
|
||||||
- /etc/pki/tls/letsencrypt/git.unkin.net/fullchain_combined.pem
|
- /etc/pki/tls/letsencrypt/git.unkin.net/fullchain_combined.pem
|
||||||
- /etc/pki/tls/letsencrypt/grafana.unkin.net/fullchain_combined.pem
|
- /etc/pki/tls/letsencrypt/grafana.unkin.net/fullchain_combined.pem
|
||||||
- /etc/pki/tls/letsencrypt/dashboard.ceph.unkin.net/fullchain_combined.pem
|
|
||||||
- /etc/pki/tls/vault/certificate.pem
|
- /etc/pki/tls/vault/certificate.pem
|
||||||
|
|
||||||
# additional altnames
|
# additional altnames
|
||||||
@@ -329,4 +303,3 @@ certbot::client::domains:
|
|||||||
- fafflix.unkin.net
|
- fafflix.unkin.net
|
||||||
- git.unkin.net
|
- git.unkin.net
|
||||||
- grafana.unkin.net
|
- grafana.unkin.net
|
||||||
- dashboard.ceph.unkin.net
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ profiles::nginx::simpleproxy::locations:
|
|||||||
arrstack_web_external:
|
arrstack_web_external:
|
||||||
location_satisfy: any
|
location_satisfy: any
|
||||||
location_allow:
|
location_allow:
|
||||||
- 198.18.26.161
|
- 198.18.13.47
|
||||||
- 198.18.27.131
|
- 198.18.13.50
|
||||||
- 198.18.28.165
|
- 198.18.13.51
|
||||||
- 198.18.29.32
|
- 198.18.13.52
|
||||||
|
|||||||
@@ -211,18 +211,6 @@ glauth::users:
|
|||||||
loginshell: '/bin/bash'
|
loginshell: '/bin/bash'
|
||||||
homedir: '/home/waewak'
|
homedir: '/home/waewak'
|
||||||
passsha256: 'd9bb99634215fe031c3bdca94149a165192fe8384ecaa238a19354c2f760a811'
|
passsha256: 'd9bb99634215fe031c3bdca94149a165192fe8384ecaa238a19354c2f760a811'
|
||||||
debvin:
|
|
||||||
user_name: 'debvin'
|
|
||||||
givenname: 'Debbie'
|
|
||||||
sn: 'Vincent'
|
|
||||||
mail: 'debvin@users.main.unkin.net'
|
|
||||||
uidnumber: 20009
|
|
||||||
primarygroup: 20000
|
|
||||||
othergroups:
|
|
||||||
- 20010 # jelly
|
|
||||||
loginshell: '/bin/bash'
|
|
||||||
homedir: '/home/debvin'
|
|
||||||
passsha256: 'cdac05ddb02e665d4ea65a974995f38a10236bc158731d92d78f6cde89b294a1'
|
|
||||||
|
|
||||||
glauth::services:
|
glauth::services:
|
||||||
svc_jellyfin:
|
svc_jellyfin:
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
profiles::ceph::rgw::ceph_client_keys:
|
|
||||||
ausyd1nxvm2115: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAovOUUtTm/9nXWj6D+kVhmbZedVVkA5N80ULNYqISrv0A+KlXCx/V2sB56SpJ9eL6aPHdC+CKkrtrrdo1h2j2em7wTA5ghhbFVF0NIS7bbn0jzpl5YqbUrNxOtDSpjzX1aCGnyMvw69Lp+NcHwxIj+1XFgK6335138s9wbX3HmYF3jcsQkMqTzynELe1OQPWFXVKTjUfFFLdCQOFryp8UY8L9j/PpV6wd4w6p7R6eXhX21rjSaN4aqN1zjsnF2OVhL8Ge0QxMhePWKGOqsUfi72kh3II028DjqU0DcZQvoxnoqRPyUUjysH0nTKoLeXOGNgJdphY1dHBJ+SJnw2gqQDBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBB9wA3ZJjmU95W+9r8va5uagDAMAv2APfdzrPnAU7NJPL+IW08osGuQWWamqF+XGVeHRoBmoFKwZ7grYRV2e3aabyc=]
|
|
||||||
ausyd1nxvm2116: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAf5ksy/pyUZSwTh+HiKw+1Uhj16A0DVZEKAbkKUQzXVmc+QpL4Dn7YBoXlEwrY8CcsTrxTQjADvtu9FC3o34QIdh06noSgYYA+7fna2A+9+oYoNtgwC3b8LeglxO/SQ9dKoJ90jRtmlw5P/CtrxA2RelMK6FNRekp1CaWMM4q20fJGgr/E33vgx38UJyp4/q0bTu2lLehCuDUP80j3XGbSNZ2snfYdIo91Cl+nSxLSU2TdnFpWaabsH19HwDnkWGiILlLBVvvhY7copCxs5DS1ueoOTCsqnWSrTrBMJjnu7WZd/s4NLw/0q/UP5xcFA51caY3Kv+sI6bfIYkNoLazwDBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBDrCF16nrtukRPamx1VbGY+gDAK5dw0kV8MpATpwxTkJG6JtlFlwdpU9THs1bNwqSRD1ZhEWxQeWwsyyTtjUXi4bP8=]
|
|
||||||
ausyd1nxvm2117: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAKtvsgDk2QTmL8flBBE4nA43sRSnroq4I6T2CUAYv/lRdzCCWvE961o/51zyQEz8L5QyDo7L3gcGYIBqthYjRe9Gp5a5d4qds0qskupgQKnb0KR2RLFVUtH5vxHqyJZHjXaP+PQreyRoSIfRWXAdoZu544FeJ9DKKbmEzZaH5B2OdDMrf4Ufuud0maEAw0PJthS//ghCfGi74F1xlJnIWVvMhp66b0iMxC+ACClEHunG3oKx7M/w05HllG0wcxPTg4PFrbnFXjRuIxsykF9aVHJkRnCdgbMXRM4o6FrYyZRR74F1HKRujFCUA7kYWDKLxHxJpYCvCHp4HMhfzjs824zBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBBbaSig6kgVVNfmSI53sNimgDDQ5O10Dzfa7S7RdJVLLUFBaZ5TG2g3Bwmy0k3wKZvABYMuYyOxQdfk6eMsKC+sC5w=]
|
|
||||||
ausyd1nxvm2118: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEAdKl0ude3ZxW0ihyA758mpQp43qZvzTI2Bp83WzCp2ifJCgAIjRWdd01P64rSHaa4lus/wqB9jxg38g6DrN4ejX56Y/CJ6GQKxz6b1BO5nDfsLx6QEzCt+cfg5d/PPoTtEpz2VSvDfxFUrHiABA6++Sqzb9Og+nQCFMYJD3NHCk67QpkjPGQ/ejZk4MNXZQVCfKOlFqay/fF0jEmQixFOlX/Fdm9UoKttbrKluUmzpaVUzfGRaTTFVgzc3x2t/z1q1k0P7ClI9Uu02kUXpFVs9LPX99Zc2GtrnP06mYqqARhWF1NMK0zlmxtKpfObahRP/HmtI3fgnQsU1Cpwah0emTBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBAILqpYx3FKY3xXLJRu2oDlgDCIOXeX6hxpu0qpj5c/9jMUSeV2DIydnxO+MiT3mceS50ip8B+zGQy5UedPmLt36Zs=]
|
|
||||||
ausyd1nxvm2119: ENC[PKCS7,MIIBmQYJKoZIhvcNAQcDoIIBijCCAYYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEASlZglUxazp+9azfV3QkgRv+ACo+MH0RO5b18blbelgdmr38iwK7MwwEFpEfVJEyc/ph9RunWwrMmofDQHj5bBribfzZ2pH2CGiOrR0i5lZMtN0yQXPBA/+jm1Pi1AWGJLtoquuhMbibuHOTiXwBCBVrHHHaFTR5Xt34ABN/p/mCaG+N9nWux93msHCCextCalKBMmPhmI2q6HodfjanEVgYAe3/5hRPnpsi6IGSDNGygsTC3MG+hjGMpNF8izbwk9Lpzn6kY51aeNxI2ed9Jm8UZ/k+8b+o7ZQyWIBbf7DTFpEzk4G46puaDbXIorBWQ4azCjN3gt8VB91hwihtzcDBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBB6U+9z4cSzMTA1z9bmoX82gDBfy5zbRPK8GxImJo6evecMOTtaY2c4aEnESXtGBCS02enmxljv9dv1UYQD0/a6S3A=]
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
hiera_include:
|
|
||||||
- profiles::ceph::rgw
|
|
||||||
- profiles::nginx::simpleproxy
|
|
||||||
|
|
||||||
profiles::ceph::rgw::enable: true
|
|
||||||
|
|
||||||
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
|
||||||
python::manage_dev_package: false
|
|
||||||
|
|
||||||
# additional altnames
|
|
||||||
profiles::pki::vault::alt_names:
|
|
||||||
- radosgw.main.unkin.net
|
|
||||||
- radosgw.service.consul
|
|
||||||
- radosgw.query.consul
|
|
||||||
- "radosgw.service.%{facts.country}-%{facts.region}.consul"
|
|
||||||
|
|
||||||
# additional repos
|
|
||||||
profiles::yum::global::repos:
|
|
||||||
ceph:
|
|
||||||
name: ceph
|
|
||||||
descr: ceph repository
|
|
||||||
target: /etc/yum.repos.d/ceph.repo
|
|
||||||
baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/%{facts.os.architecture}
|
|
||||||
gpgkey: https://download.ceph.com/keys/release.asc
|
|
||||||
mirrorlist: absent
|
|
||||||
ceph-noarch:
|
|
||||||
name: ceph-noarch
|
|
||||||
descr: ceph-noarch repository
|
|
||||||
target: /etc/yum.repos.d/ceph-noarch.repo
|
|
||||||
baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/noarch
|
|
||||||
gpgkey: https://download.ceph.com/keys/release.asc
|
|
||||||
mirrorlist: absent
|
|
||||||
|
|
||||||
# manage a simple nginx reverse proxy
|
|
||||||
profiles::nginx::simpleproxy::nginx_vhost: 'radosgw.service.consul'
|
|
||||||
profiles::nginx::simpleproxy::nginx_aliases:
|
|
||||||
- radosgw.service.au-syd1.consul
|
|
||||||
profiles::nginx::simpleproxy::proxy_port: 7480
|
|
||||||
profiles::nginx::simpleproxy::proxy_path: '/'
|
|
||||||
nginx::client_max_body_size: 100M
|
|
||||||
|
|
||||||
# manage consul service
|
|
||||||
consul::services:
|
|
||||||
radosgw:
|
|
||||||
service_name: 'radosgw'
|
|
||||||
address: "%{facts.networking.ip}"
|
|
||||||
port: 443
|
|
||||||
checks:
|
|
||||||
- id: 'radosgw_https_check'
|
|
||||||
name: 'RADOSGW HTTPS Check'
|
|
||||||
http: "https://%{facts.networking.fqdn}:443"
|
|
||||||
method: 'GET'
|
|
||||||
tls_skip_verify: true
|
|
||||||
interval: '10s'
|
|
||||||
timeout: '1s'
|
|
||||||
profiles::consul::client::node_rules:
|
|
||||||
- resource: service
|
|
||||||
segment: radosgw
|
|
||||||
disposition: write
|
|
||||||
@@ -6,7 +6,6 @@ hiera_include:
|
|||||||
- zfs
|
- zfs
|
||||||
- profiles::ceph::node
|
- profiles::ceph::node
|
||||||
- profiles::ceph::client
|
- profiles::ceph::client
|
||||||
- profiles::ceph::dashboard
|
|
||||||
- profiles::storage::cephfsvols
|
- profiles::storage::cephfsvols
|
||||||
- exporters::frr_exporter
|
- exporters::frr_exporter
|
||||||
|
|
||||||
@@ -37,7 +36,6 @@ profiles::ssh::sign::principals:
|
|||||||
- "%{facts.networking.interfaces.enp3s0.ip}"
|
- "%{facts.networking.interfaces.enp3s0.ip}"
|
||||||
|
|
||||||
# configure consul service
|
# configure consul service
|
||||||
profiles::consul::client::host_addr: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
consul::services:
|
consul::services:
|
||||||
incus:
|
incus:
|
||||||
service_name: 'incus'
|
service_name: 'incus'
|
||||||
@@ -123,9 +121,6 @@ profiles::yum::global::repos:
|
|||||||
# dns
|
# dns
|
||||||
profiles::dns::base::primary_interface: loopback0
|
profiles::dns::base::primary_interface: loopback0
|
||||||
|
|
||||||
# dashboard/haproxy
|
|
||||||
profiles::ceph::dashboard::ipaddress: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
|
|
||||||
# networking
|
# networking
|
||||||
systemd::manage_networkd: true
|
systemd::manage_networkd: true
|
||||||
systemd::manage_all_network_files: true
|
systemd::manage_all_network_files: true
|
||||||
@@ -155,11 +150,12 @@ networking::interfaces:
|
|||||||
netmask: 255.255.255.255
|
netmask: 255.255.255.255
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
|
|
||||||
|
exporters::node_exporter::addr: "%{hiera('networking_loopback0_ip')}"
|
||||||
|
|
||||||
# frrouting
|
# frrouting
|
||||||
exporters::frr_exporter::enable: true
|
exporters::frr_exporter::enable: true
|
||||||
|
exporters::frr_exporter::addr: "%{hiera('networking_loopback0_ip')}"
|
||||||
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
||||||
frrouting::ospf_preferred_source_enable: true
|
|
||||||
frrouting::ospf_preferred_source: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
frrouting::ospfd_redistribute:
|
frrouting::ospfd_redistribute:
|
||||||
- connected
|
- connected
|
||||||
frrouting::ospfd_interfaces:
|
frrouting::ospfd_interfaces:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
rke2::node_token: ENC[PKCS7,MIIB2gYJKoZIhvcNAQcDoIIByzCCAccCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEACQ4IIE9qT7x+KBTtvksUwvko6U/wnRn4PZEHUc91u9StIcjd0N6uH3hrJ4ddJmwikXf9Sz/5t+kSPvcVewFcjzvMHzJXqaE57KX0hqjFpqSGMlqWy4hdrZTHm/W65PkB73j21HLn9gH7m4rmqLomSbIe21P7sFM5+1pbnQejx9Us43Mu7PNy+8rQCcdEeBnRmzLaVWR8c35aXMHANqefLaLPCWjTbDY4jhcHPkNse5thpyUW89Bnq6caTJjNNQRI9U2FX2qHqwFh/rcjtGwDk9JUJvpF1qb9mdY68txMfaQ2KQh0gH67nxVf0cDppUxJaQ86Uu71BQX54l/om9AFrDCBnAYJKoZIhvcNAQcBMB0GCWCGSAFlAwQBKgQQFfKTlWnJq2zqP6jsLAzw94BwDu32IVvfvYvsuNcOJHc4ipI0PV/6AcatIDaXjK+K8BMLdWxpOVsVf4vL1zPatB5UTwc8rm1UvxWN8SbtqF8accmAA0GbIexQezsJYaAI3NT9gItGj/aJjTitl+ed7QfNCd36HVH9FEmfDaGwN7f/yw==]
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
---
|
|
||||||
hiera_include:
|
|
||||||
- profiles::selinux::setenforce
|
|
||||||
- profiles::ceph::node
|
|
||||||
- profiles::ceph::client
|
|
||||||
- exporters::frr_exporter
|
|
||||||
- frrouting
|
|
||||||
- rke2
|
|
||||||
|
|
||||||
# manage rke2
|
|
||||||
rke2::bootstrap_node: prodnxsr0001.main.unkin.net
|
|
||||||
rke2::join_url: https://join-k8s.service.consul:9345
|
|
||||||
rke2::config_hash:
|
|
||||||
bind-address: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
node-ip: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
node-external-ip: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
write-kubeconfig-mode: 644
|
|
||||||
kubelet-arg:
|
|
||||||
- '--node-status-update-frequency=4s'
|
|
||||||
- '--max-pods=100'
|
|
||||||
node-label:
|
|
||||||
- "region=%{facts.region}"
|
|
||||||
- "country=%{facts.country}"
|
|
||||||
- "asset=%{facts.dmi.product.serial_number}"
|
|
||||||
- "zone=%{zone}"
|
|
||||||
- "environment=%{environment}"
|
|
||||||
|
|
||||||
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
|
||||||
python::manage_dev_package: false
|
|
||||||
|
|
||||||
profiles::packages::include:
|
|
||||||
bridge-utils: {}
|
|
||||||
cephadm: {}
|
|
||||||
|
|
||||||
profiles::selinux::setenforce::mode: disabled
|
|
||||||
|
|
||||||
profiles::ceph::client::manage_ceph_conf: false
|
|
||||||
profiles::ceph::client::manage_ceph_package: false
|
|
||||||
profiles::ceph::client::manage_ceph_paths: false
|
|
||||||
profiles::ceph::client::fsid: 'de96a98f-3d23-465a-a899-86d3d67edab8'
|
|
||||||
profiles::ceph::client::mons:
|
|
||||||
- 198.18.23.9
|
|
||||||
- 198.18.23.10
|
|
||||||
- 198.18.23.11
|
|
||||||
- 198.18.23.12
|
|
||||||
- 198.18.23.13
|
|
||||||
|
|
||||||
# additional repos
|
|
||||||
profiles::yum::global::repos:
|
|
||||||
ceph:
|
|
||||||
name: ceph
|
|
||||||
descr: ceph repository
|
|
||||||
target: /etc/yum.repos.d/ceph.repo
|
|
||||||
baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/%{facts.os.architecture}
|
|
||||||
gpgkey: https://download.ceph.com/keys/release.asc
|
|
||||||
mirrorlist: absent
|
|
||||||
ceph-noarch:
|
|
||||||
name: ceph-noarch
|
|
||||||
descr: ceph-noarch repository
|
|
||||||
target: /etc/yum.repos.d/ceph-noarch.repo
|
|
||||||
baseurl: https://edgecache.query.consul/ceph/yum/el%{facts.os.release.major}/noarch
|
|
||||||
gpgkey: https://download.ceph.com/keys/release.asc
|
|
||||||
mirrorlist: absent
|
|
||||||
frr-extras:
|
|
||||||
name: frr-extras
|
|
||||||
descr: frr-extras repository
|
|
||||||
target: /etc/yum.repos.d/frr-extras.repo
|
|
||||||
baseurl: https://packagerepo.service.consul/frr/el9/extras-daily/%{facts.os.architecture}/os
|
|
||||||
gpgkey: https://packagerepo.service.consul/frr/el9/extras-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR
|
|
||||||
mirrorlist: absent
|
|
||||||
frr-stable:
|
|
||||||
name: frr-stable
|
|
||||||
descr: frr-stable repository
|
|
||||||
target: /etc/yum.repos.d/frr-stable.repo
|
|
||||||
baseurl: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os
|
|
||||||
gpgkey: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR
|
|
||||||
mirrorlist: absent
|
|
||||||
rancher-rke2-common-latest:
|
|
||||||
name: rancher-rke2-common-latest
|
|
||||||
descr: rancher-rke2-common-latest
|
|
||||||
target: /etc/yum.repos.d/rke2-common.repo
|
|
||||||
baseurl: https://rpm.rancher.io/rke2/latest/common/centos/%{facts.os.release.major}/noarch
|
|
||||||
gpgkey: https://rpm.rancher.io/public.key
|
|
||||||
mirrorlist: absent
|
|
||||||
rancher-rke2-1-33-latest:
|
|
||||||
name: rancher-rke2-1-33-latest
|
|
||||||
descr: rancher-rke2-1-33-latest
|
|
||||||
target: /etc/yum.repos.d/rke2-1-33.repo
|
|
||||||
baseurl: https://rpm.rancher.io/rke2/latest/1.33/centos/%{facts.os.release.major}/x86_64
|
|
||||||
gpgkey: https://rpm.rancher.io/public.key
|
|
||||||
mirrorlist: absent
|
|
||||||
|
|
||||||
# dns
|
|
||||||
profiles::dns::base::primary_interface: loopback0
|
|
||||||
|
|
||||||
# networking
|
|
||||||
systemd::manage_networkd: true
|
|
||||||
systemd::manage_all_network_files: true
|
|
||||||
networking::interfaces:
|
|
||||||
"%{hiera('networking_1000_iface')}":
|
|
||||||
type: physical
|
|
||||||
ipaddress: "%{hiera('networking_1000_ip')}"
|
|
||||||
gateway: 198.18.15.254
|
|
||||||
txqueuelen: 10000
|
|
||||||
forwarding: true
|
|
||||||
"%{hiera('networking_2500_iface')}":
|
|
||||||
type: physical
|
|
||||||
ipaddress: "%{hiera('networking_2500_ip')}"
|
|
||||||
mtu: 1500
|
|
||||||
txqueuelen: 10000
|
|
||||||
forwarding: true
|
|
||||||
loopback0:
|
|
||||||
type: dummy
|
|
||||||
ipaddress: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
netmask: 255.255.255.255
|
|
||||||
mtu: 1500
|
|
||||||
loopback1:
|
|
||||||
type: dummy
|
|
||||||
ipaddress: "%{hiera('networking_loopback1_ip')}"
|
|
||||||
netmask: 255.255.255.255
|
|
||||||
mtu: 1500
|
|
||||||
loopback2:
|
|
||||||
type: dummy
|
|
||||||
ipaddress: "%{hiera('networking_loopback2_ip')}"
|
|
||||||
netmask: 255.255.255.255
|
|
||||||
mtu: 1500
|
|
||||||
|
|
||||||
# configure consul service
|
|
||||||
profiles::consul::client::host_addr: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
profiles::consul::client::node_rules:
|
|
||||||
- resource: service
|
|
||||||
segment: frr_exporter
|
|
||||||
disposition: write
|
|
||||||
|
|
||||||
# frrouting
|
|
||||||
exporters::frr_exporter::enable: true
|
|
||||||
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
frrouting::ospf_preferred_source_enable: true
|
|
||||||
frrouting::ospf_preferred_source: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
frrouting::ospfd_redistribute:
|
|
||||||
- connected
|
|
||||||
frrouting::ospfd_interfaces:
|
|
||||||
"%{hiera('networking_1000_iface')}":
|
|
||||||
area: 0.0.0.0
|
|
||||||
"%{hiera('networking_2500_iface')}":
|
|
||||||
area: 0.0.0.0
|
|
||||||
loopback0:
|
|
||||||
area: 0.0.0.0
|
|
||||||
loopback1:
|
|
||||||
area: 0.0.0.0
|
|
||||||
loopback2:
|
|
||||||
area: 0.0.0.0
|
|
||||||
frrouting::daemons:
|
|
||||||
ospfd: true
|
|
||||||
frrouting::ospf_exclude_k8s_enable: true
|
|
||||||
frrouting::k8s_cluster_cidr: '10.42.0.0/16' # RKE2 cluster-cidr (pods)
|
|
||||||
frrouting::k8s_service_cidr: '10.43.0.0/16' # RKE2 service-cidr
|
|
||||||
|
|
||||||
# add loopback interfaces to ssh list
|
|
||||||
ssh::server::options:
|
|
||||||
ListenAddress:
|
|
||||||
- "%{hiera('networking_loopback0_ip')}"
|
|
||||||
- "%{hiera('networking_1000_ip')}"
|
|
||||||
- "%{hiera('networking_2500_ip')}"
|
|
||||||
|
|
||||||
profiles::ssh::sign::principals:
|
|
||||||
- "%{hiera('networking_loopback0_ip')}"
|
|
||||||
- "%{hiera('networking_1000_ip')}"
|
|
||||||
- "%{hiera('networking_2500_ip')}"
|
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
---
|
---
|
||||||
# manage rke2
|
# networking
|
||||||
rke2::node_type: agent
|
systemd::manage_networkd: true
|
||||||
|
systemd::manage_all_network_files: true
|
||||||
|
networking::interfaces:
|
||||||
|
eth0:
|
||||||
|
type: physical
|
||||||
|
forwarding: true
|
||||||
|
dhcp: true
|
||||||
|
mtu: 1500
|
||||||
|
|||||||
@@ -1,77 +1,42 @@
|
|||||||
---
|
---
|
||||||
# manage rke2
|
profiles::pki::vault::alt_names:
|
||||||
rke2::node_type: server
|
- k8s-control.service.consul
|
||||||
rke2::helm_install: true
|
- k8s-control.query.consul
|
||||||
rke2::helm_repos:
|
- "k8s-control.service.%{facts.country}-%{facts.region}.consul"
|
||||||
metallb: https://metallb.github.io/metallb
|
|
||||||
rancher-stable: https://releases.rancher.com/server-charts/stable
|
profiles::ssh::sign::principals:
|
||||||
rke2::extra_config_files:
|
- k8s-control.service.consul
|
||||||
- rke2-canal-config
|
- k8s-control.query.consul
|
||||||
# - rke2-cilium-config
|
- "k8s-control.service.%{facts.country}-%{facts.region}.consul"
|
||||||
# - rke2-metallb-pools
|
|
||||||
# - rke2-metallb-bgppeers
|
|
||||||
# - rke2-metallb-bgpadvertisements
|
|
||||||
rke2::config_hash:
|
|
||||||
advertise-address: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
cluster-domain: "svc.k8s.unkin.net"
|
|
||||||
tls-san:
|
|
||||||
- "join-k8s.service.consul"
|
|
||||||
- "api-k8s.service.consul"
|
|
||||||
- "api.k8s.unkin.net"
|
|
||||||
- "join.k8s.unkin.net"
|
|
||||||
cni: canal
|
|
||||||
cluster-cidr: 10.42.0.0/16
|
|
||||||
service-cidr: 10.43.0.0/16
|
|
||||||
cluster-dns: 10.43.0.10
|
|
||||||
etcd-arg: "--quota-backend-bytes 2048000000"
|
|
||||||
etcd-snapshot-schedule-cron: "0 3 * * *"
|
|
||||||
etcd-snapshot-retention: 10
|
|
||||||
kube-apiserver-arg:
|
|
||||||
- '--default-not-ready-toleration-seconds=30'
|
|
||||||
- '--default-unreachable-toleration-seconds=30'
|
|
||||||
kube-controller-manager-arg:
|
|
||||||
- '--node-monitor-period=4s'
|
|
||||||
protect-kernel-defaults: true
|
|
||||||
|
|
||||||
# configure consul service
|
# configure consul service
|
||||||
consul::services:
|
consul::services:
|
||||||
api-k8s:
|
k8s-control:
|
||||||
service_name: 'api-k8s'
|
service_name: 'k8s-control'
|
||||||
|
tags:
|
||||||
|
- 'k8s'
|
||||||
|
- 'container'
|
||||||
address: "%{facts.networking.fqdn}"
|
address: "%{facts.networking.fqdn}"
|
||||||
port: 6443
|
port: 6443
|
||||||
checks:
|
checks:
|
||||||
- id: 'api-k8s_livez_check'
|
- id: 'k8s-control_https_check'
|
||||||
name: 'api-k8s livez Check'
|
name: 'k8s-control HTTPS Check'
|
||||||
args:
|
http: "https://%{facts.networking.fqdn}:6443"
|
||||||
- sudo
|
method: 'GET'
|
||||||
- /usr/local/bin/check_k8s_api.sh
|
tls_skip_verify: true
|
||||||
interval: '10s'
|
|
||||||
timeout: '1s'
|
|
||||||
join-k8s:
|
|
||||||
service_name: 'join-k8s'
|
|
||||||
address: "%{facts.networking.fqdn}"
|
|
||||||
port: 9345
|
|
||||||
checks:
|
|
||||||
- id: 'rke2_tcp_check_9345'
|
|
||||||
name: 'rke2 TCP Check 9345'
|
|
||||||
tcp: "%{hiera('networking_loopback0_ip')}:9345"
|
|
||||||
interval: '10s'
|
interval: '10s'
|
||||||
timeout: '1s'
|
timeout: '1s'
|
||||||
profiles::consul::client::node_rules:
|
profiles::consul::client::node_rules:
|
||||||
- resource: service
|
- resource: service
|
||||||
segment: api-k8s
|
segment: k8s-control
|
||||||
disposition: write
|
|
||||||
- resource: service
|
|
||||||
segment: join-k8s
|
|
||||||
disposition: write
|
disposition: write
|
||||||
|
|
||||||
profiles::pki::vault::alt_names:
|
# networking
|
||||||
- api-k8s.service.consul
|
systemd::manage_networkd: true
|
||||||
- api-k8s.query.consul
|
systemd::manage_all_network_files: true
|
||||||
- "api-k8s.service.%{facts.country}-%{facts.region}.consul"
|
networking::interfaces:
|
||||||
|
eth0:
|
||||||
sudo::configs:
|
type: physical
|
||||||
consul-checks:
|
forwarding: true
|
||||||
priority: 20
|
dhcp: true
|
||||||
content: |
|
mtu: 1500
|
||||||
consul ALL=(ALL) NOPASSWD: /usr/local/bin/check_k8s_api.sh
|
|
||||||
|
|||||||
@@ -5,24 +5,6 @@ hiera_include:
|
|||||||
- profiles::ceph::node
|
- profiles::ceph::node
|
||||||
- profiles::ceph::client
|
- profiles::ceph::client
|
||||||
- exporters::frr_exporter
|
- exporters::frr_exporter
|
||||||
- profiles::rke2::node
|
|
||||||
|
|
||||||
# manage rke2
|
|
||||||
profiles::rke2::node::servers:
|
|
||||||
- prodnxsr0001.main.unkin.net
|
|
||||||
- prodnxsr0002.main.unkin.net
|
|
||||||
- prodnxsr0003.main.unkin.net
|
|
||||||
|
|
||||||
rke2::config_hash:
|
|
||||||
bind-address: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
advertise-address: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
node-ip: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
node-external-ip: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
cluster-domain: "svc.k8s.unkin.net"
|
|
||||||
tls-san:
|
|
||||||
- "api.k8s.unkin.net"
|
|
||||||
- "join.k8s.unkin.net"
|
|
||||||
cni: cilium
|
|
||||||
|
|
||||||
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
||||||
python::manage_dev_package: false
|
python::manage_dev_package: false
|
||||||
@@ -43,7 +25,6 @@ profiles::ceph::client::mons:
|
|||||||
- 198.18.23.11
|
- 198.18.23.11
|
||||||
- 198.18.23.12
|
- 198.18.23.12
|
||||||
- 198.18.23.13
|
- 198.18.23.13
|
||||||
|
|
||||||
# additional repos
|
# additional repos
|
||||||
profiles::yum::global::repos:
|
profiles::yum::global::repos:
|
||||||
ceph:
|
ceph:
|
||||||
@@ -74,20 +55,6 @@ profiles::yum::global::repos:
|
|||||||
baseurl: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os
|
baseurl: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os
|
||||||
gpgkey: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR
|
gpgkey: https://packagerepo.service.consul/frr/el9/stable-daily/%{facts.os.architecture}/os/RPM-GPG-KEY-FRR
|
||||||
mirrorlist: absent
|
mirrorlist: absent
|
||||||
rancher-rke2-common-latest:
|
|
||||||
name: rancher-rke2-common-latest
|
|
||||||
descr: rancher-rke2-common-latest
|
|
||||||
target: /etc/yum.repos.d/rke2-common.repo
|
|
||||||
baseurl: https://rpm.rancher.io/rke2/latest/common/centos/%{facts.os.release.major}/noarch
|
|
||||||
gpgkey: https://rpm.rancher.io/public.key
|
|
||||||
mirrorlist: absent
|
|
||||||
rancher-rke2-1-33-latest:
|
|
||||||
name: rancher-rke2-1-33-latest
|
|
||||||
descr: rancher-rke2-1-33-latest
|
|
||||||
target: /etc/yum.repos.d/rke2-1-33.repo
|
|
||||||
baseurl: https://rpm.rancher.io/rke2/latest/1.33/centos/%{facts.os.release.major}/x86_64
|
|
||||||
gpgkey: https://rpm.rancher.io/public.key
|
|
||||||
mirrorlist: absent
|
|
||||||
|
|
||||||
# dns
|
# dns
|
||||||
profiles::dns::base::primary_interface: loopback0
|
profiles::dns::base::primary_interface: loopback0
|
||||||
@@ -124,47 +91,18 @@ networking::interfaces:
|
|||||||
netmask: 255.255.255.255
|
netmask: 255.255.255.255
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
|
|
||||||
# configure consul service
|
# consul
|
||||||
profiles::consul::client::host_addr: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
consul::services:
|
|
||||||
api-k8s:
|
|
||||||
service_name: 'api-k8s'
|
|
||||||
address: "%{facts.networking.fqdn}"
|
|
||||||
port: 6443
|
|
||||||
checks:
|
|
||||||
- id: 'api-k8s_https_check'
|
|
||||||
name: 'api-k8s HTTPS Check'
|
|
||||||
http: "https://%{facts.networking.fqdn}:6443"
|
|
||||||
method: 'GET'
|
|
||||||
tls_skip_verify: true
|
|
||||||
interval: '10s'
|
|
||||||
timeout: '1s'
|
|
||||||
join-k8s:
|
|
||||||
service_name: 'join-k8s'
|
|
||||||
address: "%{facts.networking.fqdn}"
|
|
||||||
port: 9345
|
|
||||||
checks:
|
|
||||||
- id: 'etcd_tcp_check_9345'
|
|
||||||
name: 'ETCD TCP Check 9345'
|
|
||||||
tcp: "%{facts.networking.fqdn}:9345"
|
|
||||||
interval: '10s'
|
|
||||||
timeout: '1s'
|
|
||||||
profiles::consul::client::node_rules:
|
profiles::consul::client::node_rules:
|
||||||
- resource: service
|
|
||||||
segment: api-k8s
|
|
||||||
disposition: write
|
|
||||||
- resource: service
|
|
||||||
segment: join-k8s
|
|
||||||
disposition: write
|
|
||||||
- resource: service
|
- resource: service
|
||||||
segment: frr_exporter
|
segment: frr_exporter
|
||||||
disposition: write
|
disposition: write
|
||||||
|
|
||||||
|
exporters::node_exporter::addr: "%{hiera('networking_loopback0_ip')}"
|
||||||
|
|
||||||
# frrouting
|
# frrouting
|
||||||
exporters::frr_exporter::enable: true
|
exporters::frr_exporter::enable: true
|
||||||
|
exporters::frr_exporter::addr: "%{hiera('networking_loopback0_ip')}"
|
||||||
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
frrouting::ospfd_router_id: "%{hiera('networking_loopback0_ip')}"
|
||||||
frrouting::ospf_preferred_source_enable: true
|
|
||||||
frrouting::ospf_preferred_source: "%{hiera('networking_loopback0_ip')}"
|
|
||||||
frrouting::ospfd_redistribute:
|
frrouting::ospfd_redistribute:
|
||||||
- connected
|
- connected
|
||||||
frrouting::ospfd_interfaces:
|
frrouting::ospfd_interfaces:
|
||||||
@@ -192,8 +130,3 @@ profiles::ssh::sign::principals:
|
|||||||
- "%{hiera('networking_loopback0_ip')}"
|
- "%{hiera('networking_loopback0_ip')}"
|
||||||
- "%{hiera('networking_1000_ip')}"
|
- "%{hiera('networking_1000_ip')}"
|
||||||
- "%{hiera('networking_2500_ip')}"
|
- "%{hiera('networking_2500_ip')}"
|
||||||
|
|
||||||
profiles::pki::vault::alt_names:
|
|
||||||
- api-k8s.service.consul
|
|
||||||
- api-k8s.query.consul
|
|
||||||
- "api-k8s.service.%{facts.country}-%{facts.region}.consul"
|
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ profiles::metrics::grafana::db_name: "%{hiera('profiles::sql::postgresdb::dbname
|
|||||||
profiles::metrics::grafana::db_user: "%{hiera('profiles::sql::postgresdb::dbuser')}"
|
profiles::metrics::grafana::db_user: "%{hiera('profiles::sql::postgresdb::dbuser')}"
|
||||||
profiles::metrics::grafana::db_pass: "%{hiera('profiles::sql::postgresdb::dbpass')}"
|
profiles::metrics::grafana::db_pass: "%{hiera('profiles::sql::postgresdb::dbpass')}"
|
||||||
profiles::metrics::grafana::pgsql_backend: true
|
profiles::metrics::grafana::pgsql_backend: true
|
||||||
profiles::metrics::grafana::plugins:
|
|
||||||
victoriametrics-logs-datasource:
|
|
||||||
ensure: present
|
|
||||||
|
|
||||||
# additional altnames
|
# additional altnames
|
||||||
profiles::pki::vault::alt_names:
|
profiles::pki::vault::alt_names:
|
||||||
|
|||||||
@@ -15,4 +15,3 @@ certbot::domains:
|
|||||||
- fafflix.unkin.net
|
- fafflix.unkin.net
|
||||||
- git.unkin.net
|
- git.unkin.net
|
||||||
- grafana.unkin.net
|
- grafana.unkin.net
|
||||||
- dashboard.ceph.unkin.net
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ class exporters::frr_exporter (
|
|||||||
String $group = 'frr_exporter',
|
String $group = 'frr_exporter',
|
||||||
Boolean $manage_user = true,
|
Boolean $manage_user = true,
|
||||||
Boolean $manage_service = true,
|
Boolean $manage_service = true,
|
||||||
|
Stdlib::Host $addr = $facts['networking']['ip'],
|
||||||
Stdlib::Port $port = 9342,
|
Stdlib::Port $port = 9342,
|
||||||
Stdlib::Absolutepath $exec_path = '/usr/bin/frr_exporter',
|
Stdlib::Absolutepath $exec_path = '/usr/bin/frr_exporter',
|
||||||
Stdlib::Absolutepath $socket_dir = '/var/run/frr',
|
Stdlib::Absolutepath $socket_dir = '/var/run/frr',
|
||||||
@@ -45,7 +46,7 @@ class exporters::frr_exporter (
|
|||||||
# manage consul service
|
# manage consul service
|
||||||
consul::service { 'frr_exporter':
|
consul::service { 'frr_exporter':
|
||||||
service_name => 'frr_exporter',
|
service_name => 'frr_exporter',
|
||||||
address => $facts['networking']['ip'],
|
address => $addr,
|
||||||
port => $port,
|
port => $port,
|
||||||
tags => [
|
tags => [
|
||||||
'metrics',
|
'metrics',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ class exporters::node_exporter (
|
|||||||
String $group = 'node_exporter',
|
String $group = 'node_exporter',
|
||||||
Boolean $manage_user = true,
|
Boolean $manage_user = true,
|
||||||
Boolean $manage_service = true,
|
Boolean $manage_service = true,
|
||||||
|
Stdlib::Host $addr = $facts['networking']['ip'],
|
||||||
Stdlib::Port $port = 9100,
|
Stdlib::Port $port = 9100,
|
||||||
Stdlib::Absolutepath $exec_path = '/usr/bin/node_exporter',
|
Stdlib::Absolutepath $exec_path = '/usr/bin/node_exporter',
|
||||||
Boolean $cleanup_old_node_exporter = false,
|
Boolean $cleanup_old_node_exporter = false,
|
||||||
@@ -58,7 +59,7 @@ class exporters::node_exporter (
|
|||||||
# manage consul service
|
# manage consul service
|
||||||
consul::service { 'node_exporter':
|
consul::service { 'node_exporter':
|
||||||
service_name => 'node_exporter',
|
service_name => 'node_exporter',
|
||||||
address => $facts['networking']['ip'],
|
address => $addr,
|
||||||
port => $port,
|
port => $port,
|
||||||
tags => [
|
tags => [
|
||||||
'metrics',
|
'metrics',
|
||||||
|
|||||||
@@ -14,18 +14,8 @@ class frrouting (
|
|||||||
Optional[String] $mpls_ldp_router_id = undef,
|
Optional[String] $mpls_ldp_router_id = undef,
|
||||||
Optional[String] $mpls_ldp_transport_addr = undef,
|
Optional[String] $mpls_ldp_transport_addr = undef,
|
||||||
Array[String] $mpls_ldp_interfaces = [],
|
Array[String] $mpls_ldp_interfaces = [],
|
||||||
Boolean $ospf_preferred_source_enable = false,
|
|
||||||
Optional[Stdlib::IP::Address] $ospf_preferred_source = undef,
|
|
||||||
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)
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# sanity check
|
|
||||||
if $ospf_exclude_k8s_enable and $k8s_cluster_cidr == undef and $k8s_service_cidr == undef {
|
|
||||||
warning('frrouting: ospf_exclude_k8s_enable is true but no k8s_*_cidr provided; nothing will be filtered.')
|
|
||||||
}
|
|
||||||
|
|
||||||
$daemons_defaults = {
|
$daemons_defaults = {
|
||||||
'bgpd' => false,
|
'bgpd' => false,
|
||||||
'ospfd' => true,
|
'ospfd' => true,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
frr defaults traditional
|
frr defaults traditional
|
||||||
hostname <%= @hostname %>
|
hostname <%= @hostname %>
|
||||||
no ipv6 forwarding
|
no ipv6 forwarding
|
||||||
|
|
||||||
<% @ospfd_interfaces.each do |iface, params| -%>
|
<% @ospfd_interfaces.each do |iface, params| -%>
|
||||||
interface <%= iface %>
|
interface <%= iface %>
|
||||||
<% if params['area'] -%>
|
<% if params['area'] -%>
|
||||||
@@ -13,31 +12,12 @@ interface <%= iface %>
|
|||||||
<% end -%>
|
<% end -%>
|
||||||
exit
|
exit
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%# ---- K8s exclude (prefix-list + route-map) ---- -%>
|
|
||||||
<% if @ospf_exclude_k8s_enable && (@k8s_cluster_cidr || @k8s_service_cidr) -%>
|
|
||||||
! Do not redistribute Kubernetes Pod/Service CIDRs
|
|
||||||
ip prefix-list K8S-BLOCK seq 5 permit <%= @k8s_cluster_cidr %> le 32<% if !@k8s_cluster_cidr %> ! (unset)<% end %>
|
|
||||||
<% if @k8s_service_cidr -%>
|
|
||||||
ip prefix-list K8S-BLOCK seq 10 permit <%= @k8s_service_cidr %> le 32
|
|
||||||
<% end -%>
|
|
||||||
route-map CONNECTED-NON-K8S deny 5
|
|
||||||
match ip address prefix-list K8S-BLOCK
|
|
||||||
exit
|
|
||||||
route-map CONNECTED-NON-K8S permit 100
|
|
||||||
exit
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
router ospf
|
router ospf
|
||||||
ospf router-id <%= @ospfd_router_id %>
|
ospf router-id <%= @ospfd_router_id %>
|
||||||
log-adjacency-changes detail
|
log-adjacency-changes detail
|
||||||
<% @ospfd_redistribute.each do |type| -%>
|
<% @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
|
|
||||||
<% else -%>
|
|
||||||
redistribute <%= type %>
|
redistribute <%= type %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
|
||||||
<% @ospfd_networks.each do |network| -%>
|
<% @ospfd_networks.each do |network| -%>
|
||||||
network <%= network %>
|
network <%= network %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
@@ -51,8 +31,6 @@ router ospf
|
|||||||
mpls-te inter-as area 0.0.0.0
|
mpls-te inter-as area 0.0.0.0
|
||||||
<% end -%>
|
<% end -%>
|
||||||
exit
|
exit
|
||||||
|
|
||||||
<%# ---- MPLS/LDP config ---- -%>
|
|
||||||
<% if @mpls_ldp_router_id and @mpls_ldp_transport_addr and @mpls_ldp_interfaces.any? -%>
|
<% if @mpls_ldp_router_id and @mpls_ldp_transport_addr and @mpls_ldp_interfaces.any? -%>
|
||||||
mpls ldp
|
mpls ldp
|
||||||
router-id <%= @mpls_ldp_router_id %>
|
router-id <%= @mpls_ldp_router_id %>
|
||||||
@@ -65,13 +43,3 @@ mpls ldp
|
|||||||
exit-address-family
|
exit-address-family
|
||||||
exit
|
exit
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%# ---- Preferred OSPF source ---- -%>
|
|
||||||
<% if @ospf_preferred_source_enable && @ospf_preferred_source -%>
|
|
||||||
ip prefix-list ANY seq 5 permit 0.0.0.0/0 le 32
|
|
||||||
route-map OSPF-SRC permit 10
|
|
||||||
match ip address prefix-list ANY
|
|
||||||
set src <%= @ospf_preferred_source %>
|
|
||||||
exit
|
|
||||||
ip protocol ospf route-map OSPF-SRC
|
|
||||||
<% end -%>
|
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
/var/lib/rancher/rke2/bin/kubectl --kubeconfig=/etc/rancher/rke2/rke2.yaml get --raw /livez
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.cattle.io/v1
|
|
||||||
kind: HelmChartConfig
|
|
||||||
metadata:
|
|
||||||
name: rke2-canal
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
valuesContent: |-
|
|
||||||
flannel:
|
|
||||||
iface: "loopback0"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.cattle.io/v1
|
|
||||||
kind: HelmChartConfig
|
|
||||||
metadata:
|
|
||||||
name: rke2-cilium
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
valuesContent: |-
|
|
||||||
hubble:
|
|
||||||
enabled: true
|
|
||||||
relay:
|
|
||||||
enabled: true
|
|
||||||
ui:
|
|
||||||
enabled: true
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: BGPAdvertisement
|
|
||||||
metadata:
|
|
||||||
name: au-syd1
|
|
||||||
namespace: metallb-system
|
|
||||||
spec:
|
|
||||||
ipAddressPools:
|
|
||||||
- common-pool
|
|
||||||
- dmz-pool
|
|
||||||
aggregationLength: 32
|
|
||||||
peers:
|
|
||||||
- au-syd1-gw1
|
|
||||||
nodeSelectors:
|
|
||||||
- matchLabels:
|
|
||||||
country: au
|
|
||||||
region: syd1
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: metallb.io/v1beta2
|
|
||||||
kind: BGPPeer
|
|
||||||
metadata:
|
|
||||||
name: au-syd1-gw1
|
|
||||||
namespace: metallb-system
|
|
||||||
spec:
|
|
||||||
myASN: 64513
|
|
||||||
peerASN: 64512
|
|
||||||
peerAddress: 198.18.21.160
|
|
||||||
peerPort: 179
|
|
||||||
nodeSelectors:
|
|
||||||
- matchLabels:
|
|
||||||
country: au
|
|
||||||
region: syd1
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: IPAddressPool
|
|
||||||
metadata:
|
|
||||||
name: common-pool
|
|
||||||
namespace: metallb-system
|
|
||||||
spec:
|
|
||||||
addresses:
|
|
||||||
- 198.18.200.0/24
|
|
||||||
---
|
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: IPAddressPool
|
|
||||||
metadata:
|
|
||||||
name: dmz-pool
|
|
||||||
namespace: metallb-system
|
|
||||||
spec:
|
|
||||||
addresses:
|
|
||||||
- 198.18.199.0/24
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'facter/util/helm'
|
|
||||||
|
|
||||||
Facter.add(:helm_repos) do
|
|
||||||
confine kernel: 'Linux'
|
|
||||||
confine enc_role: [
|
|
||||||
'roles::infra::k8s::control',
|
|
||||||
'roles::infra::k8s::compute'
|
|
||||||
]
|
|
||||||
|
|
||||||
setcode do
|
|
||||||
Facter::Util::Helm.get_helm_repos('/usr/bin/helm')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'facter'
|
|
||||||
require 'json'
|
|
||||||
|
|
||||||
# a simple helm module
|
|
||||||
module Facter::Util::Helm
|
|
||||||
def self.get_helm_repos(helm_cmd)
|
|
||||||
return [] unless File.executable?(helm_cmd)
|
|
||||||
|
|
||||||
output = Facter::Core::Execution.execute(
|
|
||||||
"#{helm_cmd} repo list --output json --repository-config /etc/helm/repositories.yaml",
|
|
||||||
on_fail: nil
|
|
||||||
)
|
|
||||||
return [] if output.to_s.strip.empty?
|
|
||||||
|
|
||||||
parse_helm_output(output)
|
|
||||||
rescue StandardError => e
|
|
||||||
Facter.debug("helm_repos fact error: #{e}")
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.parse_helm_output(output)
|
|
||||||
JSON.parse(output).map do |repo|
|
|
||||||
{
|
|
||||||
'name' => repo['name'],
|
|
||||||
'url' => repo['url']
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
# config rke2
|
|
||||||
class rke2::config (
|
|
||||||
Enum['server', 'agent'] $node_type = $rke2::node_type,
|
|
||||||
Stdlib::Absolutepath $config_file = $rke2::config_file,
|
|
||||||
Hash $config_hash = $rke2::config_hash,
|
|
||||||
Stdlib::HTTPSUrl $join_url = $rke2::join_url,
|
|
||||||
Stdlib::Fqdn $bootstrap_node = $rke2::bootstrap_node,
|
|
||||||
String $node_token = $rke2::node_token,
|
|
||||||
Array[String[1]] $extra_config_files = $rke2::extra_config_files,
|
|
||||||
){
|
|
||||||
|
|
||||||
# if agent, add token. what other fields should i add?
|
|
||||||
# how can I add a tls secret using kubectl to add ephemeral certs.
|
|
||||||
|
|
||||||
# if its not the bootstrap node, add join path to config
|
|
||||||
if $node_type == 'server' {
|
|
||||||
if $trusted['certname'] != $bootstrap_node {
|
|
||||||
$config = merge($config_hash, {
|
|
||||||
server => $join_url,
|
|
||||||
token => $node_token,
|
|
||||||
} )
|
|
||||||
}else{
|
|
||||||
$config = $config_hash
|
|
||||||
}
|
|
||||||
} elsif $node_type == 'agent' {
|
|
||||||
$config = merge($config_hash, {
|
|
||||||
server => $join_url,
|
|
||||||
token => $node_token,
|
|
||||||
} )
|
|
||||||
}else{
|
|
||||||
$config = $config_hash
|
|
||||||
}
|
|
||||||
|
|
||||||
# create the config file
|
|
||||||
file { $config_file:
|
|
||||||
ensure => file,
|
|
||||||
content => Sensitive($config.to_yaml),
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
require => Package["rke2-${node_type}"],
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# create a script to verify k8s api is up (used by consul)
|
|
||||||
file {'/usr/local/bin/check_k8s_api.sh':
|
|
||||||
ensure => file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
source => 'puppet:///modules/rke2/check_k8s_api.sh',
|
|
||||||
}
|
|
||||||
|
|
||||||
# symlink kubectl to path
|
|
||||||
file {'/usr/bin/kubectl':
|
|
||||||
ensure => link,
|
|
||||||
target => '/var/lib/rancher/rke2/bin/kubectl',
|
|
||||||
require => Package["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# when ProtectKernelDefaults=true
|
|
||||||
sysctl { 'vm.overcommit_memory':
|
|
||||||
value => '1',
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
sysctl { 'kernel.panic':
|
|
||||||
value => '10',
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# on the controller nodes only
|
|
||||||
if $node_type == 'server' {
|
|
||||||
|
|
||||||
# manage extra config config
|
|
||||||
$extra_config_files.each |$file| {
|
|
||||||
|
|
||||||
file {"/var/lib/rancher/rke2/server/manifests/${file}.yaml":
|
|
||||||
ensure => file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
source => "puppet:///modules/rke2/${file}.yaml",
|
|
||||||
require => Service['rke2-server'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
|
|
||||||
# manage helm
|
|
||||||
class rke2::helm (
|
|
||||||
Enum['server', 'agent'] $node_type = $rke2::node_type,
|
|
||||||
Stdlib::Fqdn $bootstrap_node = $rke2::bootstrap_node,
|
|
||||||
Boolean $helm_install = $rke2::helm_install,
|
|
||||||
Hash $helm_repos = $rke2::helm_repos
|
|
||||||
){
|
|
||||||
|
|
||||||
# when installing helm, manage the repos
|
|
||||||
if $helm_install {
|
|
||||||
|
|
||||||
package {'helm':
|
|
||||||
ensure => installed,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/helm':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0755',
|
|
||||||
}
|
|
||||||
|
|
||||||
# on the controller nodes only
|
|
||||||
if $node_type == 'server' {
|
|
||||||
|
|
||||||
# check if the repo already exists
|
|
||||||
$helm_repos.each | String $repo, Stdlib::HTTPSUrl $url | {
|
|
||||||
|
|
||||||
# if repo isnt in repo list from helm, install it
|
|
||||||
if ! $facts['helm_repos'].any |$existing| { $existing['name'] == $repo } {
|
|
||||||
|
|
||||||
exec { "helm_add_repo_${repo}":
|
|
||||||
command => "helm repo add ${repo} ${url} --repository-config /etc/helm/repositories.yaml",
|
|
||||||
path => ['/usr/bin'],
|
|
||||||
environment => [
|
|
||||||
'KUBECONFIG=/etc/rancher/rke2/rke2.yaml',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# manage rke2
|
|
||||||
class rke2 (
|
|
||||||
Enum['server', 'agent'] $node_type = $rke2::params::node_type,
|
|
||||||
String $rke2_version = $rke2::params::rke2_version,
|
|
||||||
String $rke2_release = $rke2::params::rke2_release,
|
|
||||||
Stdlib::Absolutepath $config_file = $rke2::params::config_file,
|
|
||||||
Hash $config_hash = $rke2::params::config_hash,
|
|
||||||
Stdlib::HTTPSUrl $join_url = $rke2::params::join_url,
|
|
||||||
Stdlib::Fqdn $bootstrap_node = $rke2::params::bootstrap_node,
|
|
||||||
String $node_token = $rke2::params::node_token,
|
|
||||||
Boolean $helm_install = $rke2::params::helm_install,
|
|
||||||
Hash $helm_repos = $rke2::params::helm_repos,
|
|
||||||
Array[String[1]] $extra_config_files = $rke2::params::extra_config_files,
|
|
||||||
Stdlib::HTTPUrl $container_archive_source = $rke2::params::container_archive_source,
|
|
||||||
) inherits rke2::params {
|
|
||||||
|
|
||||||
include rke2::install
|
|
||||||
include rke2::config
|
|
||||||
include rke2::service
|
|
||||||
include rke2::helm
|
|
||||||
|
|
||||||
Class['rke2::install'] -> Class['rke2::service'] -> Class['rke2::helm']
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# install rke2
|
|
||||||
class rke2::install (
|
|
||||||
Enum['server', 'agent'] $node_type = $rke2::node_type,
|
|
||||||
String $rke2_version = $rke2::rke2_version,
|
|
||||||
String $rke2_release = $rke2::rke2_release,
|
|
||||||
Stdlib::HTTPUrl $container_archive_source = $rke2::container_archive_source,
|
|
||||||
){
|
|
||||||
|
|
||||||
# versionlock rke2
|
|
||||||
yum::versionlock{"rke2-${node_type}":
|
|
||||||
ensure => present,
|
|
||||||
version => "${rke2_version}~${rke2_release}",
|
|
||||||
}
|
|
||||||
|
|
||||||
# install rke2
|
|
||||||
package {"rke2-${node_type}":
|
|
||||||
ensure => "${rke2_version}~${rke2_release}",
|
|
||||||
}
|
|
||||||
|
|
||||||
# ensure images path exists
|
|
||||||
file { ['/var/lib/rancher/rke2/agent', '/var/lib/rancher/rke2/agent/images']:
|
|
||||||
ensure => 'directory',
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0750',
|
|
||||||
require => Package["rke2-${node_type}"],
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# download required archive of containers
|
|
||||||
archive { '/var/lib/rancher/rke2/agent/images/rke2-images.linux-amd64.tar.zst':
|
|
||||||
ensure => present,
|
|
||||||
source => "https://github.com/rancher/rke2/releases/download/v${rke2_version}%2B${rke2_release}/rke2-images.linux-amd64.tar.zst",
|
|
||||||
require => [
|
|
||||||
Package["rke2-${node_type}"],
|
|
||||||
File['/var/lib/rancher/rke2/agent/images'],
|
|
||||||
],
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# ensure the images cache file exists
|
|
||||||
file {'/var/lib/rancher/rke2/agent/images/.cache.json':
|
|
||||||
ensure => file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
require => [
|
|
||||||
Package["rke2-${node_type}"],
|
|
||||||
File['/var/lib/rancher/rke2/agent/images'],
|
|
||||||
],
|
|
||||||
before => Service["rke2-${node_type}"],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# rke2 params
|
|
||||||
class rke2::params (
|
|
||||||
Enum['server', 'agent'] $node_type = 'agent',
|
|
||||||
String $rke2_version = '1.33.4',
|
|
||||||
String $rke2_release = 'rke2r1',
|
|
||||||
Stdlib::Absolutepath $config_file = '/etc/rancher/rke2/config.yaml',
|
|
||||||
Hash $config_hash = {},
|
|
||||||
Stdlib::HTTPSUrl $join_url = 'https://127.0.0.1:9345',
|
|
||||||
Stdlib::Fqdn $bootstrap_node = 'localhost.localdomain',
|
|
||||||
String $node_token = '',
|
|
||||||
Boolean $helm_install = false,
|
|
||||||
Hash $helm_repos = {},
|
|
||||||
Array[String[1]] $extra_config_files = [],
|
|
||||||
Stdlib::HTTPUrl $container_archive_source = 'https://github.com/rancher/rke2/releases/download',
|
|
||||||
) {}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# manage rke2 service
|
|
||||||
class rke2::service (
|
|
||||||
Enum['server', 'agent'] $node_type = $rke2::node_type,
|
|
||||||
Stdlib::Absolutepath $config_file = $rke2::config_file,
|
|
||||||
){
|
|
||||||
|
|
||||||
service {"rke2-${node_type}":
|
|
||||||
ensure => true,
|
|
||||||
enable => true,
|
|
||||||
subscribe => File[$config_file],
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
class profiles::ceph::conf (
|
|
||||||
Hash $config = {}
|
|
||||||
) {
|
|
||||||
|
|
||||||
package {[
|
|
||||||
'ceph',
|
|
||||||
'ceph-common'
|
|
||||||
]:
|
|
||||||
ensure => installed,
|
|
||||||
}
|
|
||||||
|
|
||||||
file {'/etc/ceph':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'ceph',
|
|
||||||
group => 'ceph',
|
|
||||||
mode => '0755',
|
|
||||||
require => Package['ceph'],
|
|
||||||
}
|
|
||||||
|
|
||||||
file {'/var/log/ceph':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'ceph',
|
|
||||||
group => 'ceph',
|
|
||||||
mode => '0755',
|
|
||||||
require => Package['ceph'],
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/ceph/ceph.conf':
|
|
||||||
ensure => file,
|
|
||||||
owner => 'ceph',
|
|
||||||
group => 'ceph',
|
|
||||||
mode => '0644',
|
|
||||||
content => template('profiles/ceph/conf.erb'),
|
|
||||||
require => Package['ceph-common'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
class profiles::ceph::dashboard (
|
|
||||||
Stdlib::IP::Address $ipaddress = $facts['networking']['ip'],
|
|
||||||
){
|
|
||||||
|
|
||||||
# export haproxy balancemember
|
|
||||||
profiles::haproxy::balancemember { "${facts['networking']['fqdn']}_9443":
|
|
||||||
service => 'be_ceph_dashboard',
|
|
||||||
ipaddress => $ipaddress,
|
|
||||||
ports => [9443],
|
|
||||||
options => [
|
|
||||||
"cookie ${facts['networking']['hostname']}",
|
|
||||||
'ssl',
|
|
||||||
'verify none',
|
|
||||||
'check',
|
|
||||||
'inter 2s',
|
|
||||||
'rise 3',
|
|
||||||
'fall 2',
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
class profiles::ceph::rgw (
|
|
||||||
Boolean $enable = true,
|
|
||||||
Hash[String, String] $ceph_client_keys = {},
|
|
||||||
Stdlib::Absolutepath $base_path = '/var/lib/ceph'
|
|
||||||
){
|
|
||||||
|
|
||||||
$key = $ceph_client_keys[$facts['networking']['hostname']]
|
|
||||||
|
|
||||||
if $enable {
|
|
||||||
|
|
||||||
include profiles::ceph::conf
|
|
||||||
|
|
||||||
package {'ceph-radosgw':
|
|
||||||
ensure => installed,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { [
|
|
||||||
"${base_path}/radosgw",
|
|
||||||
"${base_path}/radosgw/ceph-${facts['networking']['hostname']}"
|
|
||||||
]:
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'ceph',
|
|
||||||
group => 'ceph',
|
|
||||||
mode => '0750',
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${base_path}/radosgw/ceph-${facts['networking']['hostname']}/keyring":
|
|
||||||
ensure => file,
|
|
||||||
owner => 'ceph',
|
|
||||||
group => 'ceph',
|
|
||||||
mode => '0750',
|
|
||||||
content => Sensitive("[client.${facts['networking']['hostname']}]\n key = ${key}\n")
|
|
||||||
}
|
|
||||||
|
|
||||||
service {"ceph-radosgw@${facts['networking']['hostname']}":
|
|
||||||
ensure => true,
|
|
||||||
enable => true,
|
|
||||||
subscribe => File["${base_path}/radosgw/ceph-${facts['networking']['hostname']}/keyring"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,6 @@ class profiles::consul::client (
|
|||||||
Stdlib::Absolutepath $data_dir = '/opt/consul',
|
Stdlib::Absolutepath $data_dir = '/opt/consul',
|
||||||
Array[Hash] $node_rules = [],
|
Array[Hash] $node_rules = [],
|
||||||
Hash $ports = {},
|
Hash $ports = {},
|
||||||
Stdlib::IP::Address $host_addr = $facts['networking']['ip'],
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $facts['enc_role'] != $members_role {
|
if $facts['enc_role'] != $members_role {
|
||||||
@@ -43,8 +42,8 @@ class profiles::consul::client (
|
|||||||
'log_level' => 'INFO',
|
'log_level' => 'INFO',
|
||||||
'node_name' => $facts['networking']['fqdn'],
|
'node_name' => $facts['networking']['fqdn'],
|
||||||
'retry_join' => $servers_array,
|
'retry_join' => $servers_array,
|
||||||
'bind_addr' => $host_addr,
|
'bind_addr' => $::facts['networking']['ip'],
|
||||||
'advertise_addr' => $host_addr,
|
'advertise_addr' => $::facts['networking']['ip'],
|
||||||
'enable_script_checks' => true,
|
'enable_script_checks' => true,
|
||||||
'ports' => $ports,
|
'ports' => $ports,
|
||||||
'acl' => {
|
'acl' => {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class profiles::dns::base (
|
|||||||
$facts['networking']['interfaces'].each | $interface, $data | {
|
$facts['networking']['interfaces'].each | $interface, $data | {
|
||||||
|
|
||||||
# exclude those without ipv4 address, lo, docker0 and anycast addresses
|
# exclude those without ipv4 address, lo, docker0 and anycast addresses
|
||||||
if $data['ip'] and $interface != 'lo' and $interface != 'docker0' and $interface !~ /^anycast[0-9]$/ and $interface !~ /^cilium_/ {
|
if $data['ip'] and $interface != 'lo' and $interface != 'docker0' and $interface !~ /^anycast[0-9]$/ {
|
||||||
|
|
||||||
# use defaults for the primary_interface
|
# use defaults for the primary_interface
|
||||||
if $interface == $primary_interface {
|
if $interface == $primary_interface {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ define profiles::haproxy::balancemember (
|
|||||||
String $service,
|
String $service,
|
||||||
Array[Stdlib::Port] $ports,
|
Array[Stdlib::Port] $ports,
|
||||||
Array $options = ['check'],
|
Array $options = ['check'],
|
||||||
Stdlib::IP::Address $ipaddress = $facts['networking']['ip'],
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$location_environment = "${facts['country']}-${facts['region']}-${facts['environment']}"
|
$location_environment = "${facts['country']}-${facts['region']}-${facts['environment']}"
|
||||||
@@ -13,7 +12,7 @@ define profiles::haproxy::balancemember (
|
|||||||
listening_service => $service,
|
listening_service => $service,
|
||||||
ports => $ports,
|
ports => $ports,
|
||||||
server_names => $facts['networking']['hostname'],
|
server_names => $facts['networking']['hostname'],
|
||||||
ipaddresses => $ipaddress,
|
ipaddresses => $facts['networking']['ip'],
|
||||||
options => $options,
|
options => $options,
|
||||||
tag => $balancemember_tag,
|
tag => $balancemember_tag,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class profiles::metrics::grafana (
|
|||||||
String $db_pass = fqdn_rand_string(16),
|
String $db_pass = fqdn_rand_string(16),
|
||||||
Stdlib::Host $db_host = '127.0.0.1',
|
Stdlib::Host $db_host = '127.0.0.1',
|
||||||
Stdlib::Port $db_port = 5432,
|
Stdlib::Port $db_port = 5432,
|
||||||
Hash $plugins = {}
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# set the fqdn
|
# set the fqdn
|
||||||
@@ -109,7 +108,6 @@ class profiles::metrics::grafana (
|
|||||||
class { 'grafana':
|
class { 'grafana':
|
||||||
cfg => $cfg,
|
cfg => $cfg,
|
||||||
ldap_cfg => $ldap_cfg,
|
ldap_cfg => $ldap_cfg,
|
||||||
plugins => $plugins,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# fix the package provided systemd service
|
# fix the package provided systemd service
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# Managed by Puppet in profiles::ceph::conf
|
|
||||||
<% @config.each do |section, settings| -%>
|
|
||||||
[<%= section %>]
|
|
||||||
<% settings.each do |key, value| -%>
|
|
||||||
<%# Convert booleans and numbers to strings, leave strings untouched %>
|
|
||||||
<%= key %> = <%= value.is_a?(TrueClass) ? 'true' : value.is_a?(FalseClass) ? 'false' : value %>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<% end -%>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# a role to deploy the ceph rgw
|
|
||||||
class roles::infra::ceph::rgw {
|
|
||||||
if $facts['firstrun'] {
|
|
||||||
include profiles::defaults
|
|
||||||
include profiles::firstrun::init
|
|
||||||
}else{
|
|
||||||
include profiles::defaults
|
|
||||||
include profiles::base
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user