Skip to content

Instantly share code, notes, and snippets.

View bot11's full-sized avatar

Ramakrishna Deepak Battu bot11

  • Sydney, Australia
View GitHub Profile
@bot11
bot11 / redirect.yaml
Created February 20, 2020 19:35
Why is this redirection not working ?!
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: tt
name: tt
spec:
containers:
- command:
@bot11
bot11 / maria_db.sh
Last active April 17, 2019 03:44
MySQL mariadb run a test container on your machine
1) Pull docker image
$ docker pull mysql:5.7
2) Generate mysql random password for rot user.
$ export MYSQL_ROOT_PASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | sed 1q)
3) create the container.
$ docker run -d --name mysql -p 3306:3306 --env MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} docker.io/mysql:5.7
4) Connect to the container to change the password and create new user if you want to connect from the host.
@bot11
bot11 / kube-controller logs
Created November 15, 2017 13:07
kube-controller logs
I1115 02:12:54.697338 1 controllermanager.go:487] Started "bootstrapsigner"
E1115 02:12:54.848177 1 core.go:70] Failed to start service controller: WARNING: no cloud provider provided, services of type LoadBalancer will fail.
W1115 02:12:54.848205 1 controllermanager.go:484] Skipping "service"
W1115 02:12:54.848219 1 core.go:128] Unsuccessful parsing of cluster CIDR : invalid CIDR address:
I1115 02:12:54.848236 1 core.go:131] Will not configure cloud provider routes for allocate-node-cidrs: false, configure-cloud-routes: true.
W1115 02:12:54.848240 1 controllermanager.go:484] Skipping "route"
I1115 02:12:54.998878 1 controllermanager.go:487] Started "persistentvolume-binder"
I1115 02:12:54.998967 1 pv_controller_base.go:259] Starting persistent volume controller
I1115 02:12:54.998997 1 controller_utils.go:1041] Waiting for caches to sync for persistent volume controller
I1115 02:12:55.147719 1 controllermanager.go:487] Started "endpoint"
@bot11
bot11 / kubelet logs
Created November 15, 2017 13:06
kubelet logs
This file has been truncated, but you can view the full file.
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228459 27740 flags.go:52] FLAG: --register-schedulable="true"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228465 27740 flags.go:52] FLAG: --register-with-taints="<nil>"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228472 27740 flags.go:52] FLAG: --registry-burst="10"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228476 27740 flags.go:52] FLAG: --registry-qps="5"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228482 27740 flags.go:52] FLAG: --require-kubeconfig="false"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228486 27740 flags.go:52] FLAG: --resolv-conf="/etc/resolv.conf"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228492 27740 flags.go:52] FLAG: --rkt-api-endpoint="localhost:15441"
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228497 27740 flags.go:52] FLAG: --rkt-path=""
Nov 15 01:58:39 af867b kubelet[27740]: I1115 01:58:39.228501 27740 flags.go:52] FLAG: --rkt-stage1-imag
@bot11
bot11 / lan.conf
Created June 2, 2015 10:52
openipmi_lan.conf
# A configuration file for lanserv or ipmi_sim to configure the various
#communication parameters for the device.
# This is a name used to identify this instance, and used to create
# the default name of the emulator startup command file and eventually # the storage facility for permanent storage.
name "mybmc"
#
# Work on the BMC first
set_working_mc 0x20
@bot11
bot11 / mybmc.emu
Created June 2, 2015 10:51
BMC.emu
# This is an example simulation setup for ipmi_sim. It creates a single
# management controller as a BMC. That will have the standard watchdog
# sensor and we add a temperature sensor.
# The BMC is the MC at address 20
mc_setbmc 0x20
# Now add the BMC
mc_add 0x20 0 no-device-sdrs 0x23 9 8 0x9f 0x1291 0xf02 persist_sdr
sel_enable 0x20 1000 0x0a
This document describes about installation and configuration of IPMI simulator.
We need: qemu-kvm, OpenIPMI, OpenIPMI-tools
1) Install the qemu-kvm. We need the qemu, which have the IPMI pacthes.
Use the source https://github.com/cminyard/qemu/tree/stable-2.2-ipmi
./configure, make and make install
2) Download the OpenIPMI libraries, from http://sourceforge.net/projects/openipmi/
Follow the process documented in lanserv/README.vm
./configure --prefix=/opt/openipmi/usr --sysconfdir=/opt/openipmi/etc \
--with-perlinstall=/opt/openipmi/usr/lib/perl \
@bot11
bot11 / screen commands
Created April 16, 2015 05:08
screen commands
# list all screens
screen -ls
# Setup a shared screen
screen -d -m -S <sessionname>
#Attach to the screen using.
#Multiple users can attach to the same screen using the below command and share.
screen -x <sessionname>
#Kill a screen session
@bot11
bot11 / install_java_from_source.txt
Created April 4, 2015 02:12
Install java from source
Download java from this link:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Alternatively , wget as below:
wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
sudo mv jdk-7u51-linux-x64.tar.gz /usr/lib/jvm [create if /usr/lib/jvm not present, can be put in /usr/local also.]
sudo tar zxvf jdk-7u51-linux-x64.tar.gz
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_51/bin/javac 1
@bot11
bot11 / send_from_gmail.py
Created April 3, 2015 13:38
send mail using gmail.
import smtplib
gmail_user = "[email protected]"
gmail_pwd = "frompwd"
TO = '[email protected]'
SUBJECT = "Testing sending using gmail"
TEXT = "Testing sending mail using gmail servers"
server = smtplib.SMTP('smtp.gmail.com', 587)