Skip to content

Instantly share code, notes, and snippets.

View michaelact's full-sized avatar
🧐
Who are you?

Michael Act michaelact

🧐
Who are you?
View GitHub Profile
@michaelact
michaelact / get_docker.sh
Created March 10, 2022 02:49
Installing Docker without breaking the existing one. Very useful if you want to put it on VM User Data. Duplicate from https://get.docker.com/ with some modifications.
#!/bin/sh
set -e
# Docker CE for Linux installation script
#
# See https://docs.docker.com/engine/install/ for the installation steps.
#
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
@michaelact
michaelact / install_docker.sh
Created June 16, 2022 07:56
Install Docker
#!/bin/bash
# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg;
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null;
apt-get update;
apt-get -y install docker-ce docker-ce-cli containerd.io;
# Install Docker Compose
curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose;
services:
opensearch-data01: # This is also the hostname of the container within the Docker network (i.e. https://opensearch-node1/)
image: public.ecr.aws/opensearchproject/opensearch:2.5.0 # Specifying the latest available image - modify if you want a specific version
container_name: opensearch-data01
environment:
- network.bind_host=0.0.0.0
- network.publish_host=192.168.56.141
- cluster.name=nightwolf-cluster # Name the cluster
- node.name=opensearch-data01 # Name the node that will run in this container
- node.roles=data # Role of the node
@michaelact
michaelact / tuning.conf
Last active July 10, 2023 05:29
[Netflix] Network Kernel Tuning
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_max_syn_backlog = 8192
net.core.somaxconn = 1024
net.core.netdev_max_backlog = 5000
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_tw_reuse = 1
net.core.default_qdisc = fq
net.ipv4.ip_local_port_range = 10240 65535
net.ipv4.tcp_abort_on_overflow = 1