Skip to content

Instantly share code, notes, and snippets.

View devynspencer's full-sized avatar
:octocat:

Devyn Spencer devynspencer

:octocat:
View GitHub Profile
@devynspencer
devynspencer / logstash-json.conf
Last active May 10, 2023 15:10 — forked from untergeek/logstash-json.conf
JSON rsyslog output for Logstash
template(name="ls_json" type="list" option.json="on") {
constant(value="{")
constant(value="\"@timestamp\":\"") property(name="timereported" dateFormat="rfc3339")
constant(value="\",\"@version\":\"1")
constant(value="\",\"message\":\"") property(name="msg")
constant(value="\",\"host\":\"") property(name="hostname")
constant(value="\",\"severity\":\"") property(name="syslogseverity-text")
constant(value="\",\"facility\":\"") property(name="syslogfacility-text")
constant(value="\",\"programname\":\"") property(name="programname")
constant(value="\",\"procid\":\"") property(name="procid")
#!/bin/bash
# hostname server.domain.com
# vi /etc/hostname
# deb http://apt.numeezy.fr wheezy main
# deb-src http://apt.numeezy.fr wheezy main
# wget -qO - http://apt.numeezy.fr/numeezy.asc | apt-key add -
apt-get update
@devynspencer
devynspencer / kickstart_install.md
Last active February 12, 2016 21:32
Process for installing Centos/RHEL 7 via kickstart template

To save time and ensure an identical baseline configuration, use a kickstart template. Kickstart functionality is inherent to the Anaconda installer, and therefore other than indicating the file to use, no additional effort is required.

For this example, we will download an existing kickstart file, upload it to a private http server, and then reference the file as an argument to the kernel during the boot sequence from an unmodified installation .iso.

Upload Kickstart Template

for simplicity, I'll download one of mine from gist.

remote_kickstart=https://git.io/vgMq3
kickstart_host=lpetsappl07.odc.pvt
@devynspencer
devynspencer / logs.md
Last active June 16, 2021 21:50
Useful logs, for every occasion.
# freeipa server
/var/log/httpd/access_log
/var/log/httpd/error_log
/var/log/kadmind.log
/var/log/krb5kdc.log
/var/log/pki/pki-tomcat/ca/transactions
/var/log/sssd/sssd.log
/var/log/sssd/krb5_child.log
/var/log/sssd/ldap_child.log
#!/bin/bash
set -ex
# prepare environment
if [[ -d /tmp/ansible ]]; then
sudo rm -rf /tmp/ansible
fi
# install python & pip
@devynspencer
devynspencer / ovirt.answers.txt
Created January 15, 2016 11:22
Installation answerfile for oVirt.
OVEHOSTED_CORE/screenProceed=none:None
OVEHOSTED_CORE/deployProceed=bool:True
OVEHOSTED_CORE/confirmSettings=none:None
OVEHOSTED_NETWORK/fqdn=none:None
OVEHOSTED_NETWORK/bridgeName=str:ovirtmgmt
OVEHOSTED_NETWORK/firewallManager=none:None
OVEHOSTED_NETWORK/gateway=none:None
OVEHOSTED_ENGINE/insecureSSL=none:None
OVEHOSTED_ENGINE/clusterName=none:None
OVEHOSTED_STORAGE/storageDatacenterName=none:None
# remove a vm
vm=ansible_ovirt_node; sudo virsh destroy $vm && sudo virsh undefine $vm
# test virtualization capabilities of the os
sudo virt-host-validate
#
# configure installation settings
install
cdrom
lang en_US.UTF-8
keyboard us
timezone UTC
unsupported_hardware
text
#!/bin/bash
set -e && set -x # enable fail on error & verbose output
su - stack
rdo_repository='http://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm'
# install repositories
sudo yum -y install \