mirror of
https://github.com/tommytran732/Fedora-CoreOS-Ignition
synced 2024-11-23 17:41:34 -05:00
Add files via upload
This commit is contained in:
parent
15cfee0043
commit
76bfa90fca
147
Docker-Compose.yml
Normal file
147
Docker-Compose.yml
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.4.0
|
||||||
|
boot_device:
|
||||||
|
passwd:
|
||||||
|
users:
|
||||||
|
- name: tomster
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDPgQ5VZDocVP2R9L+PCOczgpcuKBeb+NnwuXo6JgeFnR+ebZ8OHnWAqDMQoUN+VveN5ja+Bklrra8EifsaX6yysvtHqY+DgaClo+f4N8/Tcg9oOATuOPz5ls4ZPILWs6AN0p5NYP4UNQEAdSQKehQd1X1Q3Z4Am1CNs7u4mcsaeoKY29qbj+YJ2R2EfI9jq5y558vi7Bm7a5mpkQ8+l/7/mt3OO6OEy6osjnAoa3yRIHGhkpLBQkIGOg99DIK/FKMD+XK346P7Go+peUdV7lmOtKSaOHAmpuMWUXTBnPMsznfyhmIh56vuWhDm/3M4iHdowa0TNHgOL30a8IOWKrSQhwD4k2pKLqkjSZ50Yp3AtNN0kE4w/h22dIxnEQsUyA6WDSP3GVhsxX0BC/luA8b5hHGa+ID1bFgFx/UNQvLlb9UHTzmKrTaxaku3bwaPvdM4DTVajmRIUMH8mXW34iKBXF2zHpl9nKEfbYeT9/L8PekAAMdSWeG2YpOxOgRm79me8K5umqyFUano6F3K0ag+nIgrPf6oJ2n9DysUiaGxGwdmb40VitHE6i5K+eJDaZxqQHi9g4ItQXsJBg5q8YdQ3WUAUyPzv4way/7Qgz1cubvyWJwn51BDcESburBjoyieLfAhSiB2cS80AWVEpYIAknj8JCdhPRi/SdgLXppDFdAUnMuKUqFoXk14X6v2olXXSYNi3T6dFRiOsQHxjBA/x8sr15MK5Y4fCt1aAvGL+JhkOz5rhA0/Ay7Y0diELd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84XHDkICzneDDGv8e7eWBN1CZcVWozfG9+XLpWKlxI20gaxisyfIkl75VgdJYMXibfZmM5/fqAUj7/c1cyorGqlgQ33RCjwcPWjFGiBI+HHdw9c0KiQvgXVXddVyNkRUhD8mpM7WoDfzdcYSJQ8btVdFyIAM1ngIMLkZW4S7bcG6soSdOyR8zKCgIz2o3Ota8S7+DDnlkjCRKgdAz13YLkOBrcu126RW86eNGgrqtxwITmMqzU4IgzjsdkMYNv5NfKc//nKuWwHaOXByKEpJ8JUMNXaeUf+wJ/h1MdifzGsr91Dqp/qc3kKrebM4Oa8KHCzR2H5u6mXH3iOQPptyzVMBvq5GNs+JVZkCnF23CwzHH4+bHDZV6PC9xe9GY/rP/JcPb0prvQbXdZaehRejjGX136oHnn38Skc6XHmwuhuCsnHf3ryJT386G1Oz5iSu1UKgyqEr0eG1CvYuq87AGvOw3fp2CgXiZKq9om6P6TdiGEnVEj7d/jyb4Qe2qnDXZvi/Clv+RPX8yGWkYyPrpn+DMcqntJKXzo2g1FaZBUt9DnvVNt4tNzmQQbOudyaDTm+iDEonHXrk6+4kOM9t+B2w2Cc7WZGFyboZzUOo77gwXM/z3rYv8O6S5U1DPaHStBRRFUPhQu+24xJb2OWOLcFRHgu5IdXRp+hlhjPS+HzzoW++tCYeN23L2fDYQyAAvuGfQpJGPpheZKb2A52QRG7XBWIbWO4X1I/aQI12aQkzpcFWY1xnuTVjDzqF2eYx22HCQeCYhwMJ0vQNPbmOm57yCyU8q04+VYMQ1uO5x4zJ28BDCzQ4UFYVk7DgL5Fq4sjFUcAqCEc36dVJFw/aDEFnTeWlb6REzf2IqLNvWQ== tomster@PRL-01
|
||||||
|
groups:
|
||||||
|
- wheel
|
||||||
|
- sudo
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
- name: postinst.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup
|
||||||
|
# We run after `systemd-machine-id-commit.service` to ensure that
|
||||||
|
# `ConditionFirstBoot=true` services won't rerun on the next boot.
|
||||||
|
After=systemd-machine-id-commit.service
|
||||||
|
After=network-online.target
|
||||||
|
# We run before `zincati.service` to avoid conflicting rpm-ostree
|
||||||
|
# transactions.
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rpm-ostree install docker-compose fail2ban firewalld prelockd tuned qemu-guest-agent
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/sbin/setsebool -P container_use_cephfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_nfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_samba off
|
||||||
|
ExecStart=/usr/bin/sed 's/nullok//g' /etc/pam.d/system-auth
|
||||||
|
ExecStart=/usr/bin/curl https://raw.githubusercontent.com/Whonix/security-misc/master/etc/modprobe.d/30_security-misc.conf -o /etc/modprobe.d/30_security-misc.conf
|
||||||
|
ExecStart=/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: docker.service
|
||||||
|
enabled: true
|
||||||
|
- name: fstrim.timer
|
||||||
|
enabled: true
|
||||||
|
- name: systemd-oomd.service
|
||||||
|
enabled: true
|
||||||
|
- name: rpm-ostree-countme.timer
|
||||||
|
enabled: false
|
||||||
|
mask: true
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /etc/zincati/config.d/51-rollout-wariness.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[identity]
|
||||||
|
rollout_wariness = 1
|
||||||
|
- path: /etc/zincati/config.d/55-updates-strategy.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[updates]
|
||||||
|
strategy = "periodic"
|
||||||
|
[updates.periodic]
|
||||||
|
time_zone = "localtime"
|
||||||
|
[[updates.periodic.window]]
|
||||||
|
days = [ "Sun" ]
|
||||||
|
start_time = "0:00"
|
||||||
|
length_minutes = 60
|
||||||
|
- path: /etc/fail2ban/jail.local
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[DEFAULT]
|
||||||
|
# Maximum 3 failures:
|
||||||
|
maxentry = 3
|
||||||
|
# Ban hosts for ten hour:
|
||||||
|
bantime = 3600
|
||||||
|
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
|
||||||
|
banaction = iptables-multiport
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
- path: /etc/tuned/active_profile
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
virtual-guest
|
||||||
|
- path: /etc/tuned/profile_mode
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
manual
|
||||||
|
- path: /etc/systemd/zram-generator.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# This config file enables a /dev/zram0 device with the default settings
|
||||||
|
[zram0]
|
||||||
|
zram-fraction = 1
|
||||||
|
max-zram-size = 8192
|
||||||
|
- path: /etc/security/limits.d/30-disable-coredump.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
* hard core 0
|
||||||
|
- path: /etc/ssh/ssh_config.d/60-disable-GSSAPI.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
GSSAPIAuthentication no
|
||||||
|
- path: /etc/sysctl.d/20-silence-audit.conf
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# Raise console message logging level from DEBUG (7) to WARNING (4)
|
||||||
|
# so that audit messages don't get interspersed on the console that
|
||||||
|
# may frustrate a user trying to interactively log in.
|
||||||
|
kernel.printk=4
|
||||||
|
links:
|
||||||
|
- path: /etc/localtime
|
||||||
|
target: ../usr/share/zoneinfo/America/New_York
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/tuned.service
|
||||||
|
target: /usr/lib/systemd/system/tuned.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/prelockd.service
|
||||||
|
target: /usr/lib/systemd/system/prelockd.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/fail2ban.service
|
||||||
|
target: /usr/lib/systemd/system/fail2ban.service
|
||||||
|
- path: /etc/systemd/system/kdump.service.target
|
||||||
|
target: /dev/null
|
||||||
|
kernel_arguments:
|
||||||
|
should_exist:
|
||||||
|
- kvm.nx_huge_pages=force
|
||||||
|
- random.trust_cpu=off
|
||||||
|
- kernel.dmesg_restrict=1
|
||||||
|
- fs.protected_fifos=2
|
||||||
|
- fs.protected_regular=2
|
||||||
|
- fs.protected_symlinks=1
|
||||||
|
- fs.protected_hardlinks=1
|
||||||
|
- net.core.bpf_jit_harden=2
|
||||||
|
- kernel.kexec_load_disabled=1
|
||||||
|
- kernel.kptr_restrict=2
|
||||||
|
- vm.mmap_rnd_bits=32
|
||||||
|
- vm.mmap_rnd_compat_bits=16
|
||||||
|
- kernel.yama.ptrace_scope=2
|
||||||
|
- fs.suid_dumpable=0
|
||||||
|
- net.ipv4.tcp_rfc1337=1
|
||||||
|
- kernel.perf_event_paranoid=3
|
||||||
|
- kernel.randomize_va_space=2
|
||||||
|
- net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||||
|
- net.ipv4.conf.all.log_martians=1
|
160
Generic.ign
Normal file
160
Generic.ign
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
{
|
||||||
|
"ignition": {
|
||||||
|
"version": "3.3.0"
|
||||||
|
},
|
||||||
|
"kernelArguments": {
|
||||||
|
"shouldExist": [
|
||||||
|
"kvm.nx_huge_pages=force",
|
||||||
|
"random.trust_cpu=off",
|
||||||
|
"kernel.dmesg_restrict=1",
|
||||||
|
"fs.protected_fifos=2",
|
||||||
|
"fs.protected_regular=2",
|
||||||
|
"fs.protected_symlinks=1",
|
||||||
|
"fs.protected_hardlinks=1",
|
||||||
|
"net.core.bpf_jit_harden=2",
|
||||||
|
"kernel.kexec_load_disabled=1",
|
||||||
|
"kernel.kptr_restrict=2",
|
||||||
|
"vm.mmap_rnd_bits=32",
|
||||||
|
"vm.mmap_rnd_compat_bits=16",
|
||||||
|
"kernel.yama.ptrace_scope=2",
|
||||||
|
"fs.suid_dumpable=0",
|
||||||
|
"net.ipv4.tcp_rfc1337=1",
|
||||||
|
"kernel.perf_event_paranoid=3",
|
||||||
|
"kernel.randomize_va_space=2",
|
||||||
|
"net.ipv4.icmp_ignore_bogus_error_responses=1",
|
||||||
|
"net.ipv4.conf.all.log_martians=1"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"passwd": {
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"groups": [
|
||||||
|
"wheel",
|
||||||
|
"sudo"
|
||||||
|
],
|
||||||
|
"name": "tomster",
|
||||||
|
"sshAuthorizedKeys": [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDPgQ5VZDocVP2R9L+PCOczgpcuKBeb+NnwuXo6JgeFnR+ebZ8OHnWAqDMQoUN+VveN5ja+Bklrra8EifsaX6yysvtHqY+DgaClo+f4N8/Tcg9oOATuOPz5ls4ZPILWs6AN0p5NYP4UNQEAdSQKehQd1X1Q3Z4Am1CNs7u4mcsaeoKY29qbj+YJ2R2EfI9jq5y558vi7Bm7a5mpkQ8+l/7/mt3OO6OEy6osjnAoa3yRIHGhkpLBQkIGOg99DIK/FKMD+XK346P7Go+peUdV7lmOtKSaOHAmpuMWUXTBnPMsznfyhmIh56vuWhDm/3M4iHdowa0TNHgOL30a8IOWKrSQhwD4k2pKLqkjSZ50Yp3AtNN0kE4w/h22dIxnEQsUyA6WDSP3GVhsxX0BC/luA8b5hHGa+ID1bFgFx/UNQvLlb9UHTzmKrTaxaku3bwaPvdM4DTVajmRIUMH8mXW34iKBXF2zHpl9nKEfbYeT9/L8PekAAMd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zJ28BDCzQ4UFYVk7DgL5Fq4sjFUcAqCEc36dVJFw/aDEFnTeWlb6REzf2IqLNvWQ== tomster@PRL-01"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "/etc/zincati/config.d/51-rollout-wariness.toml",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:,%5Bidentity%5D%0Arollout_wariness%20%3D%201%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/zincati/config.d/55-updates-strategy.toml",
|
||||||
|
"contents": {
|
||||||
|
"compression": "gzip",
|
||||||
|
"source": "data:;base64,H4sIAAAAAAAC/2SNMarEMAxEe51C6ADB1S8+5BRbGmNMLLIGRw62TMieflGRats3b2b8PHNSHgGG9qS837gindxLy2UjePLlQQG0HBw/TdjM2rZUjRD4H3e5iuR2hQA53QNX9EivKYT2lrpGK9qK+3eOoLLs+o5Hkals+p+DbwAAAP//4Po2vKAAAAA="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/fail2ban/jail.local",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:;base64,W0RFRkFVTFRdCiMgTWF4aW11bSAzIGZhaWx1cmVzOgptYXhlbnRyeSA9IDMKIyBCYW4gaG9zdHMgZm9yIHRlbiBob3VyOgpiYW50aW1lID0gMzYwMAojIE92ZXJyaWRlIC9ldGMvZmFpbDJiYW4vamFpbC5kLzAwLWZpcmV3YWxsZC5jb25mOgpiYW5hY3Rpb24gPSBpcHRhYmxlcy1tdWx0aXBvcnQKW3NzaGRdCmVuYWJsZWQgPSB0cnVlCg=="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"overwrite": true,
|
||||||
|
"path": "/etc/tuned/active_profile",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:,virtual-guest%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"overwrite": true,
|
||||||
|
"path": "/etc/tuned/profile_mode",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:,manual%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"overwrite": true,
|
||||||
|
"path": "/etc/systemd/zram-generator.conf",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:;base64,IyBUaGlzIGNvbmZpZyBmaWxlIGVuYWJsZXMgYSAvZGV2L3pyYW0wIGRldmljZSB3aXRoIHRoZSBkZWZhdWx0IHNldHRpbmdzClt6cmFtMF0KenJhbS1mcmFjdGlvbiA9IDEKbWF4LXpyYW0tc2l6ZSA9IDgxOTIK"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"overwrite": true,
|
||||||
|
"path": "/etc/security/limits.d/30-disable-coredump.conf",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:,*%20hard%20core%200%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"overwrite": true,
|
||||||
|
"path": "/etc/ssh/ssh_config.d/60-disable-GSSAPI.conf",
|
||||||
|
"contents": {
|
||||||
|
"source": "data:,GSSAPIAuthentication%20no%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/sysctl.d/20-silence-audit.conf",
|
||||||
|
"contents": {
|
||||||
|
"compression": "gzip",
|
||||||
|
"source": "data:;base64,H4sIAAAAAAAC/0TOsUrEUBCF4f4+xYEU7jZbLVhZKMpikyIg1kMyubnkZibMTAJ5ewkiPsD5z9ego+KMXsW1MhZ2p8yomnORjMo7V4ymC94/3r4euDxfEYrv1679bB+43K+pgStiogBtQ4m/hmNQeQpkDhQJNl/ZnAeoIKb/y3OZGix0YLTNwygYhM3ZEHacitDfAvVRdq7HyUORW5rZhOtttSIxv9zTTwAAAP//Cm0jUs8AAAA="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"path": "/etc/localtime",
|
||||||
|
"target": "../usr/share/zoneinfo/America/New_York"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/systemd/system/multi-user.target.wants/tuned.service",
|
||||||
|
"target": "/usr/lib/systemd/system/tuned.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/systemd/system/multi-user.target.wants/prelockd.service",
|
||||||
|
"target": "/usr/lib/systemd/system/prelockd.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/systemd/system/multi-user.target.wants/fail2ban.service",
|
||||||
|
"target": "/usr/lib/systemd/system/fail2ban.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/systemd/system/kdump.service.target",
|
||||||
|
"target": "/dev/null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"systemd": {
|
||||||
|
"units": [
|
||||||
|
{
|
||||||
|
"contents": "[Unit]\nDescription=Initial System Setup\n# We run after `systemd-machine-id-commit.service` to ensure that\n# `ConditionFirstBoot=true` services won't rerun on the next boot.\nAfter=systemd-machine-id-commit.service\nAfter=network-online.target\n# We run before `zincati.service` to avoid conflicting rpm-ostree\n# transactions.\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/rpm-ostree install fail2ban firewalld prelockd tuned qemu-guest-agent\nExecStart=/bin/touch /var/lib/%N.stamp\nExecStart=/usr/sbin/setsebool -P container_use_cephfs off\nExecStart=/usr/sbin/setsebool -P virt_use_nfs off\nExecStart=/usr/sbin/setsebool -P virt_use_samba off\nExecStart=/usr/bin/sed 's/nullok//g' /etc/pam.d/system-auth\nExecStart=/usr/bin/curl https://raw.githubusercontent.com/Whonix/security-misc/master/etc/modprobe.d/30_security-misc.conf -o /etc/modprobe.d/30_security-misc.conf\nExecStart=/bin/systemctl --no-block reboot\n\n[Install]\nWantedBy=multi-user.target\n",
|
||||||
|
"enabled": true,
|
||||||
|
"name": "postinst.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"contents": "[Unit]\nDescription=Initial System Setup Part 2\n# We run this after the packages have been overlayed\nAfter=network-online.target\nConditionPathExists=!/var/lib/%N.stamp\nConditionPathExists=/var/lib/postinst.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/firewall-cmd --reload\nExecStart=/usr/bin/docker run --detach --privileged --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower --schedule \"0 5 0 * * 1\"\nExecStart=/bin/touch /var/lib/%N.stamp\n\n[Install]\nWantedBy=multi-user.target\n",
|
||||||
|
"enabled": true,
|
||||||
|
"name": "postinst2.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": true,
|
||||||
|
"name": "docker.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": true,
|
||||||
|
"name": "fstrim.timer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": true,
|
||||||
|
"name": "systemd-oomd.service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": false,
|
||||||
|
"mask": true,
|
||||||
|
"name": "rpm-ostree-countme.timer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
165
Generic.yml
Normal file
165
Generic.yml
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.4.0
|
||||||
|
boot_device:
|
||||||
|
passwd:
|
||||||
|
users:
|
||||||
|
- name: tomster
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDPgQ5VZDocVP2R9L+PCOczgpcuKBeb+NnwuXo6JgeFnR+ebZ8OHnWAqDMQoUN+VveN5ja+Bklrra8EifsaX6yysvtHqY+DgaClo+f4N8/Tcg9oOATuOPz5ls4ZPILWs6AN0p5NYP4UNQEAdSQKehQd1X1Q3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vOw3fp2CgXiZKq9om6P6TdiGEnVEj7d/jyb4Qe2qnDXZvi/Clv+RPX8yGWkYyPrpn+DMcqntJKXzo2g1FaZBUt9DnvVNt4tNzmQQbOudyaDTm+iDEonHXrk6+4kOM9t+B2w2Cc7WZGFyboZzUOo77gwXM/z3rYv8O6S5U1DPaHStBRRFUPhQu+24xJb2OWOLcFRHgu5IdXRp+hlhjPS+HzzoW++tCYeN23L2fDYQyAAvuGfQpJGPpheZKb2A52QRG7XBWIbWO4X1I/aQI12aQkzpcFWY1xnuTVjDzqF2eYx22HCQeCYhwMJ0vQNPbmOm57yCyU8q04+VYMQ1uO5x4zJ28BDCzQ4UFYVk7DgL5Fq4sjFUcAqCEc36dVJFw/aDEFnTeWlb6REzf2IqLNvWQ== tomster@PRL-01
|
||||||
|
groups:
|
||||||
|
- wheel
|
||||||
|
- sudo
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
- name: postinst.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup
|
||||||
|
# We run after `systemd-machine-id-commit.service` to ensure that
|
||||||
|
# `ConditionFirstBoot=true` services won't rerun on the next boot.
|
||||||
|
After=systemd-machine-id-commit.service
|
||||||
|
After=network-online.target
|
||||||
|
# We run before `zincati.service` to avoid conflicting rpm-ostree
|
||||||
|
# transactions.
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rpm-ostree install fail2ban firewalld prelockd tuned qemu-guest-agent
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/sbin/setsebool -P container_use_cephfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_nfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_samba off
|
||||||
|
ExecStart=/usr/bin/sed 's/nullok//g' /etc/pam.d/system-auth
|
||||||
|
ExecStart=/usr/bin/curl https://raw.githubusercontent.com/Whonix/security-misc/master/etc/modprobe.d/30_security-misc.conf -o /etc/modprobe.d/30_security-misc.conf
|
||||||
|
ExecStart=/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: postinst2.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup Part 2
|
||||||
|
# We run this after the packages have been overlayed
|
||||||
|
After=network-online.target
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
ConditionPathExists=/var/lib/postinst.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/docker run --detach --privileged --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower --schedule "0 5 0 * * 1"
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: docker.service
|
||||||
|
enabled: true
|
||||||
|
- name: fstrim.timer
|
||||||
|
enabled: true
|
||||||
|
- name: systemd-oomd.service
|
||||||
|
enabled: true
|
||||||
|
- name: rpm-ostree-countme.timer
|
||||||
|
enabled: false
|
||||||
|
mask: true
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /etc/zincati/config.d/51-rollout-wariness.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[identity]
|
||||||
|
rollout_wariness = 1
|
||||||
|
- path: /etc/zincati/config.d/55-updates-strategy.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[updates]
|
||||||
|
strategy = "periodic"
|
||||||
|
[updates.periodic]
|
||||||
|
time_zone = "localtime"
|
||||||
|
[[updates.periodic.window]]
|
||||||
|
days = [ "Sun" ]
|
||||||
|
start_time = "0:00"
|
||||||
|
length_minutes = 60
|
||||||
|
- path: /etc/fail2ban/jail.local
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[DEFAULT]
|
||||||
|
# Maximum 3 failures:
|
||||||
|
maxentry = 3
|
||||||
|
# Ban hosts for ten hour:
|
||||||
|
bantime = 3600
|
||||||
|
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
|
||||||
|
banaction = iptables-multiport
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
- path: /etc/tuned/active_profile
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
virtual-guest
|
||||||
|
- path: /etc/tuned/profile_mode
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
manual
|
||||||
|
- path: /etc/systemd/zram-generator.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# This config file enables a /dev/zram0 device with the default settings
|
||||||
|
[zram0]
|
||||||
|
zram-fraction = 1
|
||||||
|
max-zram-size = 8192
|
||||||
|
- path: /etc/security/limits.d/30-disable-coredump.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
* hard core 0
|
||||||
|
- path: /etc/ssh/ssh_config.d/60-disable-GSSAPI.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
GSSAPIAuthentication no
|
||||||
|
- path: /etc/sysctl.d/20-silence-audit.conf
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# Raise console message logging level from DEBUG (7) to WARNING (4)
|
||||||
|
# so that audit messages don't get interspersed on the console that
|
||||||
|
# may frustrate a user trying to interactively log in.
|
||||||
|
kernel.printk=4
|
||||||
|
links:
|
||||||
|
- path: /etc/localtime
|
||||||
|
target: ../usr/share/zoneinfo/America/New_York
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/tuned.service
|
||||||
|
target: /usr/lib/systemd/system/tuned.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/prelockd.service
|
||||||
|
target: /usr/lib/systemd/system/prelockd.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/fail2ban.service
|
||||||
|
target: /usr/lib/systemd/system/fail2ban.service
|
||||||
|
- path: /etc/systemd/system/kdump.service.target
|
||||||
|
target: /dev/null
|
||||||
|
kernel_arguments:
|
||||||
|
should_exist:
|
||||||
|
- kvm.nx_huge_pages=force
|
||||||
|
- random.trust_cpu=off
|
||||||
|
- kernel.dmesg_restrict=1
|
||||||
|
- fs.protected_fifos=2
|
||||||
|
- fs.protected_regular=2
|
||||||
|
- fs.protected_symlinks=1
|
||||||
|
- fs.protected_hardlinks=1
|
||||||
|
- net.core.bpf_jit_harden=2
|
||||||
|
- kernel.kexec_load_disabled=1
|
||||||
|
- kernel.kptr_restrict=2
|
||||||
|
- vm.mmap_rnd_bits=32
|
||||||
|
- vm.mmap_rnd_compat_bits=16
|
||||||
|
- kernel.yama.ptrace_scope=2
|
||||||
|
- fs.suid_dumpable=0
|
||||||
|
- net.ipv4.tcp_rfc1337=1
|
||||||
|
- kernel.perf_event_paranoid=3
|
||||||
|
- kernel.randomize_va_space=2
|
||||||
|
- net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||||
|
- net.ipv4.conf.all.log_martians=1
|
167
GitLab.yml
Normal file
167
GitLab.yml
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.4.0
|
||||||
|
boot_device:
|
||||||
|
passwd:
|
||||||
|
users:
|
||||||
|
- name: tomster
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDPgQ5VZDocVP2R9L+PCOczgpcuKBeb+NnwuXo6JgeFnR+ebZ8OHnWAqDMQoUN+VveN5ja+Bklrra8EifsaX6yysvtHqY+D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jGX136oHnn38Skc6XHmwuhuCsnHf3ryJT386G1Oz5iSu1UKgyqEr0eG1CvYuq87AGvOw3fp2CgXiZKq9om6P6TdiGEnVEj7d/jyb4Qe2qnDXZvi/Clv+RPX8yGWkYyPrpn+DMcqntJKXzo2g1FaZBUt9DnvVNt4tNzmQQbOudyaDTm+iDEonHXrk6+4kOM9t+B2w2Cc7WZGFyboZzUOo77gwXM/z3rYv8O6S5U1DPaHStBRRFUPhQu+24xJb2OWOLcFRHgu5IdXRp+hlhjPS+HzzoW++tCYeN23L2fDYQyAAvuGfQpJGPpheZKb2A52QRG7XBWIbWO4X1I/aQI12aQkzpcFWY1xnuTVjDzqF2eYx22HCQeCYhwMJ0vQNPbmOm57yCyU8q04+VYMQ1uO5x4zJ28BDCzQ4UFYVk7DgL5Fq4sjFUcAqCEc36dVJFw/aDEFnTeWlb6REzf2IqLNvWQ== tomster@PRL-01
|
||||||
|
groups:
|
||||||
|
- wheel
|
||||||
|
- sudo
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
- name: postinst.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup
|
||||||
|
# We run after `systemd-machine-id-commit.service` to ensure that
|
||||||
|
# `ConditionFirstBoot=true` services won't rerun on the next boot.
|
||||||
|
After=systemd-machine-id-commit.service
|
||||||
|
After=network-online.target
|
||||||
|
# We run before `zincati.service` to avoid conflicting rpm-ostree
|
||||||
|
# transactions.
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rpm-ostree install fail2ban firewalld prelockd tuned qemu-guest-agent
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/sbin/setsebool -P container_use_cephfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_nfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_samba off
|
||||||
|
ExecStart=/usr/bin/sed 's/nullok//g' /etc/pam.d/system-auth
|
||||||
|
ExecStart=/usr/bin/curl https://raw.githubusercontent.com/Whonix/security-misc/master/etc/modprobe.d/30_security-misc.conf -o /etc/modprobe.d/30_security-misc.conf
|
||||||
|
ExecStart=/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: postinst2.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup Part 2
|
||||||
|
# We run this after the packages have been overlayed
|
||||||
|
After=network-online.target
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
ConditionPathExists=/var/lib/postinst.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/echo "export GITLAB_HOME=/srv/gitlab" >> /etc/bashrc
|
||||||
|
ExecStart=/usr/bin/docker run --detach --privileged --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower --schedule "0 5 0 * * 1"
|
||||||
|
ExecStart=/usr/bin/docker run --detach --hostname your_domain --publish 443:443 --publish 80:80 --publish 7022:22 --name gitlab --restart unless-stopped --volume /srv/gitlab/config:/etc/gitlab:Z --volume /srv/gitlab/logs:/var/log/gitlab:Z --volume /srv/gitlab/data:/var/opt/gitlab:Z gitlab/gitlab-ee:latest
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: docker.service
|
||||||
|
enabled: true
|
||||||
|
- name: fstrim.timer
|
||||||
|
enabled: true
|
||||||
|
- name: systemd-oomd.service
|
||||||
|
enabled: true
|
||||||
|
- name: rpm-ostree-countme.timer
|
||||||
|
enabled: false
|
||||||
|
mask: true
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /etc/zincati/config.d/51-rollout-wariness.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[identity]
|
||||||
|
rollout_wariness = 1
|
||||||
|
- path: /etc/zincati/config.d/55-updates-strategy.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[updates]
|
||||||
|
strategy = "periodic"
|
||||||
|
[updates.periodic]
|
||||||
|
time_zone = "localtime"
|
||||||
|
[[updates.periodic.window]]
|
||||||
|
days = [ "Sun" ]
|
||||||
|
start_time = "0:00"
|
||||||
|
length_minutes = 60
|
||||||
|
- path: /etc/fail2ban/jail.local
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[DEFAULT]
|
||||||
|
# Maximum 3 failures:
|
||||||
|
maxentry = 3
|
||||||
|
# Ban hosts for ten hour:
|
||||||
|
bantime = 3600
|
||||||
|
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
|
||||||
|
banaction = iptables-multiport
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
- path: /etc/tuned/active_profile
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
virtual-guest
|
||||||
|
- path: /etc/tuned/profile_mode
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
manual
|
||||||
|
- path: /etc/systemd/zram-generator.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# This config file enables a /dev/zram0 device with the default settings
|
||||||
|
[zram0]
|
||||||
|
zram-fraction = 1
|
||||||
|
max-zram-size = 8192
|
||||||
|
- path: /etc/security/limits.d/30-disable-coredump.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
* hard core 0
|
||||||
|
- path: /etc/ssh/ssh_config.d/60-disable-GSSAPI.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
GSSAPIAuthentication no
|
||||||
|
- path: /etc/sysctl.d/20-silence-audit.conf
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# Raise console message logging level from DEBUG (7) to WARNING (4)
|
||||||
|
# so that audit messages don't get interspersed on the console that
|
||||||
|
# may frustrate a user trying to interactively log in.
|
||||||
|
kernel.printk=4
|
||||||
|
links:
|
||||||
|
- path: /etc/localtime
|
||||||
|
target: ../usr/share/zoneinfo/America/New_York
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/tuned.service
|
||||||
|
target: /usr/lib/systemd/system/tuned.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/prelockd.service
|
||||||
|
target: /usr/lib/systemd/system/prelockd.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/fail2ban.service
|
||||||
|
target: /usr/lib/systemd/system/fail2ban.service
|
||||||
|
- path: /etc/systemd/system/kdump.service.target
|
||||||
|
target: /dev/null
|
||||||
|
kernel_arguments:
|
||||||
|
should_exist:
|
||||||
|
- kvm.nx_huge_pages=force
|
||||||
|
- random.trust_cpu=off
|
||||||
|
- kernel.dmesg_restrict=1
|
||||||
|
- fs.protected_fifos=2
|
||||||
|
- fs.protected_regular=2
|
||||||
|
- fs.protected_symlinks=1
|
||||||
|
- fs.protected_hardlinks=1
|
||||||
|
- net.core.bpf_jit_harden=2
|
||||||
|
- kernel.kexec_load_disabled=1
|
||||||
|
- kernel.kptr_restrict=2
|
||||||
|
- vm.mmap_rnd_bits=32
|
||||||
|
- vm.mmap_rnd_compat_bits=16
|
||||||
|
- kernel.yama.ptrace_scope=2
|
||||||
|
- fs.suid_dumpable=0
|
||||||
|
- net.ipv4.tcp_rfc1337=1
|
||||||
|
- kernel.perf_event_paranoid=3
|
||||||
|
- kernel.randomize_va_space=2
|
||||||
|
- net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||||
|
- net.ipv4.conf.all.log_martians=1
|
201
LICENSE
Normal file
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
3
Mailcow/README.md
Normal file
3
Mailcow/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Notes
|
||||||
|
1. mailcow-updater can be used instead of auto-updater to take advantage of mailcow's update.sh script
|
||||||
|
2. You will need to compile and install the my-pdatesh module for SELinux to avoid the 203/EXEC error.
|
14
Mailcow/mailcow-updater.service
Normal file
14
Mailcow/mailcow-updater.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mailcow Automatic Updater
|
||||||
|
After=docker.service
|
||||||
|
Wants=network-online.target
|
||||||
|
Requires=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
WorkingDirectory=/opt/mailcow-dockerized/
|
||||||
|
ExecStart=/opt/mailcow-dockerized/update.sh --force
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
7
Mailcow/my-pdatesh.te
Normal file
7
Mailcow/my-pdatesh.te
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module my-pdatesh 1.0;
|
||||||
|
|
||||||
|
require {
|
||||||
|
type init_t;
|
||||||
|
type var_t;
|
||||||
|
class file { execute execute_no_trans open read };
|
||||||
|
}
|
166
OnlyOffice.yml
Normal file
166
OnlyOffice.yml
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.4.0
|
||||||
|
boot_device:
|
||||||
|
passwd:
|
||||||
|
users:
|
||||||
|
- name: tomster
|
||||||
|
ssh_authorized_keys:
|
||||||
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDPgQ5VZDocVP2R9L+PCOczgpcuKBeb+NnwuXo6JgeFnR+ebZ8OHnWAqDMQoUN+VveN5ja+Bklrra8EifsaX6yysvtHqY+DgaClo+f4N8/Tcg9oOATuOPz5ls4ZPILWs6AN0p5NYP4UNQEAdSQKehQd1X1Q3Z4Am1CNs7u4mcsaeoKY29qbj+YJ2R2EfI9jq5y558vi7Bm7a5mpkQ8+l/7/mt3OO6OEy6osjnAoa3yRIHGhkpLBQkIGOg99DIK/FKMD+XK346P7Go+peUdV7lmOtKSaOHAmpuMWUXTBnPMsznfyhmIh56vuWhDm/3M4iHdowa0TNHgOL30a8IOWK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+24xJb2OWOLcFRHgu5IdXRp+hlhjPS+HzzoW++tCYeN23L2fDYQyAAvuGfQpJGPpheZKb2A52QRG7XBWIbWO4X1I/aQI12aQkzpcFWY1xnuTVjDzqF2eYx22HCQeCYhwMJ0vQNPbmOm57yCyU8q04+VYMQ1uO5x4zJ28BDCzQ4UFYVk7DgL5Fq4sjFUcAqCEc36dVJFw/aDEFnTeWlb6REzf2IqLNvWQ== tomster@PRL-01
|
||||||
|
groups:
|
||||||
|
- wheel
|
||||||
|
- sudo
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
- name: postinst.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup
|
||||||
|
# We run after `systemd-machine-id-commit.service` to ensure that
|
||||||
|
# `ConditionFirstBoot=true` services won't rerun on the next boot.
|
||||||
|
After=systemd-machine-id-commit.service
|
||||||
|
After=network-online.target
|
||||||
|
# We run before `zincati.service` to avoid conflicting rpm-ostree
|
||||||
|
# transactions.
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rpm-ostree install fail2ban firewalld prelockd tuned qemu-guest-agent
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/sbin/setsebool -P container_use_cephfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_nfs off
|
||||||
|
ExecStart=/usr/sbin/setsebool -P virt_use_samba off
|
||||||
|
ExecStart=/usr/bin/sed 's/nullok//g' /etc/pam.d/system-auth
|
||||||
|
ExecStart=/usr/bin/curl https://raw.githubusercontent.com/Whonix/security-misc/master/etc/modprobe.d/30_security-misc.conf -o /etc/modprobe.d/30_security-misc.conf
|
||||||
|
ExecStart=/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: postinst2.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Initial System Setup Part 2
|
||||||
|
# We run this after the packages have been overlayed
|
||||||
|
After=network-online.target
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
ConditionPathExists=/var/lib/postinst.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/docker run --detach --privileged --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro containrrr/watchtower --schedule "0 5 0 * * 1"
|
||||||
|
ExecStart=/usr/bin/docker run --name onlyoffice --restart unless-stopped -i -t -d -p 80:80 -p 443:443 -e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail -e JWT_ENABLED=true -e JWT_SECRET=your_secret_here -v /srv/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z -v /srv/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z -v /srv/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z -v /srv/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq:Z -v /srv/onlyoffice/DocumentServer/redis:/var/lib/redis:Z -v /srv/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z onlyoffice/documentserver
|
||||||
|
ExecStart=/bin/touch /var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
- name: docker.service
|
||||||
|
enabled: true
|
||||||
|
- name: fstrim.timer
|
||||||
|
enabled: true
|
||||||
|
- name: systemd-oomd.service
|
||||||
|
enabled: true
|
||||||
|
- name: rpm-ostree-countme.timer
|
||||||
|
enabled: false
|
||||||
|
mask: true
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /etc/zincati/config.d/51-rollout-wariness.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[identity]
|
||||||
|
rollout_wariness = 1
|
||||||
|
- path: /etc/zincati/config.d/55-updates-strategy.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[updates]
|
||||||
|
strategy = "periodic"
|
||||||
|
[updates.periodic]
|
||||||
|
time_zone = "localtime"
|
||||||
|
[[updates.periodic.window]]
|
||||||
|
days = [ "Sun" ]
|
||||||
|
start_time = "0:00"
|
||||||
|
length_minutes = 60
|
||||||
|
- path: /etc/fail2ban/jail.local
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[DEFAULT]
|
||||||
|
# Maximum 3 failures:
|
||||||
|
maxentry = 3
|
||||||
|
# Ban hosts for ten hour:
|
||||||
|
bantime = 3600
|
||||||
|
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
|
||||||
|
banaction = iptables-multiport
|
||||||
|
[sshd]
|
||||||
|
enabled = true
|
||||||
|
- path: /etc/tuned/active_profile
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
virtual-guest
|
||||||
|
- path: /etc/tuned/profile_mode
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
manual
|
||||||
|
- path: /etc/systemd/zram-generator.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# This config file enables a /dev/zram0 device with the default settings
|
||||||
|
[zram0]
|
||||||
|
zram-fraction = 1
|
||||||
|
max-zram-size = 8192
|
||||||
|
- path: /etc/security/limits.d/30-disable-coredump.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
* hard core 0
|
||||||
|
- path: /etc/ssh/ssh_config.d/60-disable-GSSAPI.conf
|
||||||
|
overwrite: true
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
GSSAPIAuthentication no
|
||||||
|
- path: /etc/sysctl.d/20-silence-audit.conf
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
# Raise console message logging level from DEBUG (7) to WARNING (4)
|
||||||
|
# so that audit messages don't get interspersed on the console that
|
||||||
|
# may frustrate a user trying to interactively log in.
|
||||||
|
kernel.printk=4
|
||||||
|
links:
|
||||||
|
- path: /etc/localtime
|
||||||
|
target: ../usr/share/zoneinfo/America/New_York
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/tuned.service
|
||||||
|
target: /usr/lib/systemd/system/tuned.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/prelockd.service
|
||||||
|
target: /usr/lib/systemd/system/prelockd.service
|
||||||
|
- path: /etc/systemd/system/multi-user.target.wants/fail2ban.service
|
||||||
|
target: /usr/lib/systemd/system/fail2ban.service
|
||||||
|
- path: /etc/systemd/system/kdump.service.target
|
||||||
|
target: /dev/null
|
||||||
|
kernel_arguments:
|
||||||
|
should_exist:
|
||||||
|
- kvm.nx_huge_pages=force
|
||||||
|
- random.trust_cpu=off
|
||||||
|
- kernel.dmesg_restrict=1
|
||||||
|
- fs.protected_fifos=2
|
||||||
|
- fs.protected_regular=2
|
||||||
|
- fs.protected_symlinks=1
|
||||||
|
- fs.protected_hardlinks=1
|
||||||
|
- net.core.bpf_jit_harden=2
|
||||||
|
- kernel.kexec_load_disabled=1
|
||||||
|
- kernel.kptr_restrict=2
|
||||||
|
- vm.mmap_rnd_bits=32
|
||||||
|
- vm.mmap_rnd_compat_bits=16
|
||||||
|
- kernel.yama.ptrace_scope=2
|
||||||
|
- fs.suid_dumpable=0
|
||||||
|
- net.ipv4.tcp_rfc1337=1
|
||||||
|
- kernel.perf_event_paranoid=3
|
||||||
|
- kernel.randomize_va_space=2
|
||||||
|
- net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||||
|
- net.ipv4.conf.all.log_martians=1
|
@ -1,2 +1,8 @@
|
|||||||
# Fedora-CoreOS-Ignition
|
# Fedora-CoreOS-Ignition
|
||||||
Ignition configurations for Fedora CoreOS
|
Ignition configurations for Fedora CoreOS<br />
|
||||||
|
|
||||||
|
# Notes
|
||||||
|
1. These are the configs I personally use on my systems. You **MUST** edit the files before you use them. At the very least, you should add your SSH keys or password hash. <br />
|
||||||
|
2. These configurations are made with a VPS in mind. You should adapt it for a bare metal deployment if that is what you are using (adding additional kernel parameters, configuring drive encryption, configuring storage, etc). You should also change the tuned profile from `virtual-guest` appropriately.
|
||||||
|
3. In most of these configs, the timezone is set to `America/New_York` and the automatic reboot time is set at 12 AM on Sunday. Watchtower will kick in 5-10 minutes after the reboot to update and redeploy the containers. You should change it according to your needs. The Docker-Compose.yml file does not include Watchtower.
|
||||||
|
4. The auto-updater.service could be put in /etc/systemd/system and enable to have automatic updates for your docker-compose and its containers. Please make sure that the WorkingDir is appropriate.
|
||||||
|
15
auto-updater.service
Normal file
15
auto-updater.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Automatic Updater
|
||||||
|
After=docker.service
|
||||||
|
Wants=network-online.target
|
||||||
|
Requires=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
WorkingDirectory=/path/to/docker-compose/directory
|
||||||
|
ExecStart=/usr/bin/git pull
|
||||||
|
ExecStart=/usr/bin/docker-compose up -d
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user