Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
@bugcy013
bugcy013 / infra-secret-management-overview.md
Created June 26, 2020 13:48 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

Tips to pass Certified Kubernetes Application Developer (CKAD) exam
Getting started Kubernetes :-
a) Book : Kubernetes: Up & Running
b) Practice practice & practice with CKAD Exercises
the Best Kubernetes CKAD sample exercises which cover all parts of the exam https://github.com/dgkanatsios/CKAD-exercises.
c) Again, the best practice is use kubectl command well. Use kubectl to create resources (such as deployment, service, cronjobs, secret, configmap…) instead of creating them from manifest files.
Incase you have to edit manifest, use dry-run and -o yamlto save yaml file then edit manifest files.
d) Kubernetes in Action by Mario Luksa. The book is the holy bible of Kubernetes, and it basically answer all questions you may have ;
e) Whether or not you use Kubernetes at work, you should still provision your own cluster somewhere and play with it.
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@bugcy013
bugcy013 / mk-heartbeat-check.sh
Created January 5, 2018 14:41 — forked from masterzen/mk-heartbeat-check.sh
Opennms General Poller for mk-heartbeat
#!/bin/sh
set -e
set -o pipefail
hostname=$2
RET=`/usr/bin/mk-heartbeat --database test --table heartbeat --user <user> --pass <pass> --host $hostname --check | sed -r -e 's, ,,g'`
RETVAL="$?"
if [ "$RETVAL" != "0" ]; then
exit $RETVAL
@bugcy013
bugcy013 / convert.sh
Created January 13, 2017 16:58 — forked from betatim/convert.sh
🚀 Minimal `nbconvert` template to convert jupyter notebooks to HTML + thebe (details: https://betatim.github.io/posts/really-interactive-posts/). Open the generated HTML in a browser it will look like a normal notebook except for the code cells, which you can edit and execute!
# Convert your notebook to an interactive webpage
#
# Attached a notebook (really-interactive-posts.ipynb) and the generated
# output (really-interactive-posts.html). The thebe.tpl template file is
# at the very end of the gist.
$ jupyter nbconvert --template thebe.tpl --to html <notebook.ipynb>
# You can open the generated webpage locally file://... howerver some
@bugcy013
bugcy013 / request.sh
Created January 4, 2017 20:11 — forked from nuxlli/unix_socket_request.sh
Examples of http request (in unix domain socket) with bash and [nc|socat]
#!/bin/bash
# References
# http://www.computerhope.com/unix/nc.htm#03
# https://github.com/daniloegea/netcat
# http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze
# http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982
# http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip
# http://www.dest-unreach.org/socat/
# http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES
@bugcy013
bugcy013 / mongodb_replication_master.md
Last active October 21, 2016 09:02 — forked from jhjguxin/mongodb_replication_master.markdown
how switch master/slave between replSet model on mongodb some prepare for migrate database from grandcloud to aliyun clound
@bugcy013
bugcy013 / mongodb_3.2.x_reporting.md
Created October 21, 2016 08:51 — forked from leommoore/mongodb_3.2.x_reporting.md
MongoDB 3.2.x Reporting

#MongoDB 3.2.x Reporting The find() operator creates a cursor to the data. The client can then parse through the data and do calculations on the data for reports purposes. However, with large data sets this is not practical. It makes far more sense for the server to do the calculations and return the result. This can save a considerable amount of unnecessary network traffic. You can however run the count on the cursor without much overhead.

db.mycollection.find().count()

Mongo has two other methods for reporting on data:

  • Aggregation
  • Map-Reduce
@bugcy013
bugcy013 / mongodb_3.2.x_security.md
Created October 21, 2016 08:49 — forked from leommoore/mongodb_3.2.x_security.md
MongoDB 3.2.x Security

#MongoDB 3.2.x Security

##Network Ports The standard ports used by mongo are:

ProcessRoleDefault Port
@bugcy013
bugcy013 / mongodb_3.2.x_logging.md
Created October 21, 2016 08:49 — forked from leommoore/mongodb_3.2.x_logging.md
MongoDB 3.2.x Logging

#MongoDB 3.2.x Logging The main log file is the mongod.log. You can specify the log file location when you are starting the mongod process but if you have installed on Ubuntu from a package then you log file will normally be located in /var/log/mongodb/mongod.log.

You can tail the log file using:

tail -f /var/log/mongodb/mongod.log

From the Mongo shell you can also view the log file using:

show logs