Skip to content

Instantly share code, notes, and snippets.

Martin Magakian martin-magakian

Block or report user

Report or block martin-magakian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@martin-magakian
martin-magakian / setup-kubernetes-ubuntu-16.md
Last active Jul 30, 2018 — forked from ruanbekker/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18
View setup-kubernetes-ubuntu-16.md

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@martin-magakian
martin-magakian / compress.sh
Last active Dec 3, 2017 — forked from bvaudour/compress.sh
tar.lz4 creation/extraction
View compress.sh
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage : $0 <file to compress>"
exit 1
fi
input=${1%%/}
output=$(PWD)/$(basename $input).tar.lz4
@martin-magakian
martin-magakian / vagrant-main-os
Last active Aug 29, 2015
some vagrant command
View vagrant-main-os
#download all box (optional)
vagrant box add chef/debian-7.8
vagrant box add ubuntu/trusty64
vagrant box add neilinger/centos-7.0-x86_64
vagrant box add chef/fedora-21
#start all box
mkdir ~/devHouse/vagrant/debian7.8 && cd ~/devHouse/vagrant/debian7.8
vagrant init chef/debian-7.8
vagrant up
View README.md

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec plugin in collectd to execute the collectd-docker.sh script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

View debian_stable_docker.sh
# assumes you've done a pretty basic 7.4 install, I used http://cdimage.debian.org/debian-cd/7.4.0/amd64/bt-cd/
# add wheezy-backports repo, http://backports.debian.org/Instructions/
sudo sh -c "echo deb http://ftp.us.debian.org/debian wheezy-backports main > /etc/apt/sources.list.d/wheezy-backports.list"
sudo apt-get update -y
sudo apt-get -t wheezy-backports install linux-image-amd64 -y
sudo reboot
You can’t perform that action at this time.