Skip to content

Instantly share code, notes, and snippets.

View sbuvaneshkumar's full-sized avatar
🎯
Chasing dreams

Buvanesh Kumar sbuvaneshkumar

🎯
Chasing dreams
View GitHub Profile
@sbuvaneshkumar
sbuvaneshkumar / docker_and_docker_compose
Last active May 4, 2019 06:14
Docker compose and Docker
yum remove -y docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
yum install -y yum-utils \
device-mapper-persistent-data \
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
yum install -y nodejs
@sbuvaneshkumar
sbuvaneshkumar / k8s-issues-fix
Created May 1, 2019 14:59
Kubernetes issues encountered and fix
1. error: unable to upgrade connection: pod does not exist
$ kubectl exec -it busybox -- sh
error: unable to upgrade connection: pod does not exist
student@ubuntu:~$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ubuntu Ready master 22d v1.13.1 10.0.2.15 <none> Ubuntu 16.04.6 LTS 4.4.0-142-generic docker://18.9.2
worker1 Ready <none> 22d v1.13.1 10.0.2.15 <none> Ubuntu 16.04.6 LTS 4.4.0-142-generic docker://18.9.2
INTERNAL-IP of both master and worker node are same, I had to change the MAC address of worker1 node and also added hostname of worker1 and master node
yum update -y
yum install -y wget qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils libvirt-daemon-kvm qemu-kvm
usermod -a -G libvirt $(whoami)
newgrp libvirt
systemctl enable --now libvirtd
curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 -o /usr/local/bin/docker-machine-driver-kvm
chmod +x /usr/local/bin/docker-machine-driver-kvm
@sbuvaneshkumar
sbuvaneshkumar / dhcpd.conf
Created November 24, 2018 10:25
Sample dhcpd.conf file
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp-server/dhcpd.conf.example
# see dhcpd.conf(5) man page
# default lease time
default-lease-time 600;
# max lease time
max-lease-time 7200;
1. server certificate verification failed
git config --global http.sslverify false
export GIT_SSL_NO_VERIFY=1
yum install gcc python-devel krb5-devel krb5-workstation python-devel python-pip -y
pip install errata-tool
yum install -y qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils libvirt-daemon-kvm qemu-kvm
usermod -a -G libvirt $(whoami)
newgrp libvirt
systemctl enable --now libvirtd
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
@sbuvaneshkumar
sbuvaneshkumar / perf-tool.py
Created November 10, 2018 13:41 — forked from brandtg/perf-tool.py
A script that runs Netflix's "Linux Performance Analysis in 60,000 Milliseconds"
#!/usr/bin/env python
#
# A script that runs the commands to perform Netflix's
# "Linux Performance Analysis in 60,000 Milliseconds"
#
# (http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html)
#
import subprocess
import datetime
import argparse
pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo 150%