sh install-docker.sh
- log out
- log back in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# libssl-dev and pkg-config are required in order to build websocat | |
# | |
apt-get update && apt-get install -y curl build-essential libssl-dev pkg-config | |
curl https://sh.rustup.rs -sSf | sh | |
export PATH=$HOME/.cargo/bin:$PATH | |
cargo install --features=ssl websocat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Out of Memory (OOM) refers to a computing state where all available memory, including swap space, has been allocated. | |
Normally this will cause the system to panic and stop functioning as expected. | |
There is a switch that controls OOM behavior in /proc/sys/vm/panic_on_oom. | |
When set to 1 the kernel will panic on OOM. | |
A setting of 0 instructs the kernel to call a function named oom_killer on an OOM. | |
Usually, oom_killer can kill rogue processes and the system will survive. | |
The easiest way to change this is to echo the new value to /proc/sys/vm/panic_on_oom. | |
# cat /proc/sys/vm/panic_on_oom 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Processor Information: | |
Vendor: GenuineIntel | |
CPU Family: 0x6 | |
CPU Model: 0x3c | |
CPU Stepping: 0x3 | |
CPU Type: 0x0 | |
Speed: 3600 Mhz | |
4 logical processors | |
4 physical processors | |
HyperThreading: Unsupported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |