Skip to content

Instantly share code, notes, and snippets.

View Ham5ter's full-sized avatar
☠️
This account is Dead, Head over to: https://github.com/keyboardinterrupt/

Ham5ter Ham5ter

☠️
This account is Dead, Head over to: https://github.com/keyboardinterrupt/
View GitHub Profile
# This Script enables all "offline" RAM and CPU ressources on linux
# If you i.e. added RAM to your Virtual Machine, you can use this one liner so that Linux detects the new offline RAM and adds it to its RAM Pool
# same for CPU's
grep -l offline /sys/devices/system/memory/*/state | while read line; do echo "online" > ${line}; done
grep -l 0 /sys/devices/system/cpu/cpu*/online | while read line; do echo "1" > ${line}; done
# Create `/boot/` on `/dev/sda`
parted /dev/sda mklabel msdos
parted -a opt /dev/sda mkpart primary ext4 0% 100%
# Create LVM with `/` and `/var/` on `/dev/sdb`
pvcreate /dev/sdb
vgcreate centos /dev/sdb
lvcreate -l 35%FREE -n root centos
lvcreate -l 60%FREE -n var centos
lvcreate -l 100%FREE -n swap centos
@Ham5ter
Ham5ter / Ubuntu 16.04 Cloud preperations.sh
Created January 19, 2017 14:04
Ubuntu 16.04 Cloud preperations
apt update && apt upgrade -y && apt remove unattended-upgrades -y && apt autoremove -y
apt-get clean
echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf
sudo rmmod floppy
sudo update-initramfs -u
@Ham5ter
Ham5ter / haproxy_corosync_pacemaker_ubuntu.md
Last active May 1, 2021 10:29
Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

This Document roughly describes a HAProxy Cluster Setup on Ubuntu 16.04 based on an example Configuration with 3 Nodes

This Document is still work in Progress the Following Stuff still needs to be done:

  • Explain the crm configure steps
  • explain Miscellaneous CRM Commands for Cluster Management
  • Add all the external ressources used.
  • Add a simple HAProxy Configuration for testing purpouse
@Ham5ter
Ham5ter / freshclam_cronjob.yml
Created February 14, 2017 16:06
freshclam cronjob
---
- hosts: all
tasks:
- name: Creates daily Freshclam Cronjob
cron: special_time="daily"
name="Run Freshclam daily"
cron_file="freshclam.sh"
user="root"
job="/usr/bin/freshclam --quiet"
@Ham5ter
Ham5ter / .ansbile.cfg
Created February 14, 2017 16:33
My Ansible Configuration File
[defaults]
# ___________________________
# < Stop the mad Cow disease! >
# ---------------------------
# \ ^__^
# \ (oo)\_______
# (__)\ )\/\
# ||----w |
# || ||