Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add forwarder role + passwd-less ssh forwarder->archiver #288

Merged
merged 12 commits into from
Jan 13, 2021
6 changes: 6 additions & 0 deletions hieradata/node/atarchiver.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,9 @@ nfs::client_mounts:
share: "home"
server: "nfs1.cp.lsst.org"
atboot: true

profile::core::k5login::k5login:
"/home/saluser/.k5login":
ensure: "present"
principals:
- "iip/comcam-fwd02.cp.lsst.org@LSST.CLOUD"
6 changes: 6 additions & 0 deletions hieradata/node/comcam-arctl01.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,9 @@ nfs::client_mounts:
share: "lsstdata"
server: "%{facts.fqdn}"
atboot: true

profile::core::k5login::k5login:
"/home/saluser/.k5login":
ensure: "present"
principals:
- "iip/comcam-fwd01.cp.lsst.org@LSST.CLOUD"
9 changes: 4 additions & 5 deletions hieradata/node/comcam-fwd02.cp.lsst.org.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
classes:
- "profile::ccs::daq_interface"
- "profile::core::debugutils" # XXX mv to permanent role (when known)
- "profile::core::nm_dispatch"
- "profile::core::sysctl::rp_filter"

profile::core::sysctl::rp_filter::enable: false
profile::ccs::common::sysctls: false
profile::ccs::daq_interface::hwaddr: "f8:f2:1e:56:95:f1"
profile::ccs::daq_interface::uuid: "02b6f32f-f0a0-4178-9ecf-7bf349c68897"
profile::ccs::daq_interface::was: "p2p2"
profile::ccs::daq_interface::hwaddr: "f8:f2:1e:56:95:f0"
profile::ccs::daq_interface::uuid: "b92aa237-1b70-4a2b-9bbb-da15a3f0e599"
profile::ccs::daq_interface::was: "p2p1"
profile::ccs::daq_interface::mode: "dhcp-client"
profile::core::nm_dispatch::interfaces:
em1:
Expand Down Expand Up @@ -39,7 +38,7 @@ network::interfaces_hash:
bootproto: "none"
onboot: "no"
type: "Ethernet"
p2p1: # not connected
p2p2: # not connected
bootproto: "none"
onboot: "no"
type: "Ethernet"
Expand Down
36 changes: 36 additions & 0 deletions hieradata/org/lsst/role/forwarder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
classes:
- "profile::archive::forwarder"
- "profile::core::common"
- "profile::core::debugutils"
- "docker"
- "python"

# disabling the kernel version check is needed on el7
docker::overlay2_override_kernel_check: true
docker::storage_driver: "overlay2"
docker::version: "19.03.4"
# ipa docker group is 70014
docker::socket_group: "70014"
docker::socket_override: true
# install docker-compose at system level
python::version: "python36"
python::pip: "present"
python::dev: "present"
python::virtualenv: "present"
# docker-compose is python3 only
python::python_pips:
"docker-compose":
virtualenv: "system"
ensure: "1.25.0"
files:
"/var/log/iip":
ensure: "directory"
mode: "0755"
owner: "iip"
group: "iip"
"/var/tmp/data":
ensure: "directory"
mode: "0755"
owner: "iip"
group: "iip"
27 changes: 27 additions & 0 deletions site/profile/manifests/archive/forwarder.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# @summary
# Generic archiver forwarder host profile
#
# @param keytab_base64
# base64 encoded krb5 keytab for the iip user
#
class profile::archive::forwarder(
String $keytab_base64,
) {
$iip_uid = 61003
$iip_keytab = '/home/iip/.keytab'

file { $iip_keytab:
ensure => file,
owner => 'iip',
group => 'iip',
mode => '0400',
content => base64('decode', $keytab_base64),
}

cron { 'k5start_root':
command => "/usr/bin/k5start -f ${iip_keytab} -U -o iip -k /tmp/krb5cc_${iip_uid} -H 60 > /dev/null 2>&1",
user => 'root',
minute => '*/1',
require => File[$iip_keytab],
}
}
1 change: 1 addition & 0 deletions site/profile/manifests/core/common.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
include profile::core::dielibwrapdie
include profile::core::hardware
include profile::core::ipa
include profile::core::k5login
include profile::core::selinux
include resolv_conf
include rsyslog
Expand Down
13 changes: 13 additions & 0 deletions site/profile/manifests/core/k5login.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @summary
# Generates k5login resoures
#
# @param k5login
# Hash of k5login resources to create
#
class profile::core::k5login (
Optional[Hash[String, Hash]] $k5login = undef,
) {
if $k5login {
ensure_resources('k5login', $k5login)
}
}