Skip to content

Instantly share code, notes, and snippets.

@Harinath120
Harinath120 / README.md
Created November 30, 2020 15:18 — forked from danielepolencic/README.md
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@Harinath120
Harinath120 / elk-docker-compose.yml
Created January 28, 2019 11:26 — forked from Shmarkus/elk-docker-compose.yml
ELK stack (version 6.4.1) Docker compose bundle
version: "2"
services:
elasticsearch:
image: elasticsearch:6.4.2
container_name: elasticsearch
ports:
- 9200:9200
- 9300:9300
volumes:
- ./esdata/:/usr/share/elasticsearch/data
@Harinath120
Harinath120 / cleanup_docker.sh
Created December 12, 2018 06:08 — forked from ralphtheninja/cleanup_docker.sh
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.
@Harinath120
Harinath120 / gist:104084b9c729e5b5eb3a7ade32a7656e
Created December 12, 2018 06:08 — forked from eduardocardoso/gist:82a629882ddb02ab3677
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi