Skip to content

Instantly share code, notes, and snippets.

View kshailen's full-sized avatar

Shailendra kshailen

View GitHub Profile
##################### ElasticSearch Configuration Example #####################
# This file contains an overview of various configuration settings,
# targeted at operations staff. Application developers should
# consult the guide at <http://elasticsearch.org/guide>.
#
# The installation procedure is covered at
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
#
# ElasticSearch comes with reasonable defaults for most settings,
@kshailen
kshailen / ETCD Run Book - REST API
Last active July 14, 2017 08:44
CoreOS ETCD Cluster RUN book
Other way of intracting with ETCD is HTTP/JSON API.
Etcd HTTP/JSON API Usage
The other way to interacting with etcd is with the simple HTTP/JSON API.
To access the API, you can use a simple HTTP program like curl. You must supply the -L flag to follow any redirects that are passed back. From within your cluster, you can use the local 127.0.0.1 interface and port 4001/2379 for most queries.
The normal keyspace can be reached by going to http://127.0.0.1:4001/v2/keys/ on any of the host machines. For instance, to get a listing of the top-level keys/directories, type:
1.Test procedure
A- Take cluster of 3 etcd noses as shown below
core@core-02 ~ $ etcdctl cluster-health
member 348dd9a63bc9c9d3 is healthy: got healthy result from http://172.17.8.102:2379
member 7d26e3d2ee11a98e is healthy: got healthy result from http://172.17.8.103:2379
member 95d2e7af71fc961d is healthy: got healthy result from http://172.17.8.101:2379
cluster is healthy
core@core-02 ~ $ etcdctl member list
348dd9a63bc9c9d3: name=219d42232433483c8ad19163ba1c6020 peerURLs=http://172.17.8.102:2380 clientURLs=http://172.17.8.102:2379 isLeader=true
7d26e3d2ee11a98e: name=edbfd19500b0496485e286801bdfa04b peerURLs=http://172.17.8.103:2380 clientURLs=http://172.17.8.103:2379 isLeader=false
@kshailen
kshailen / Build and RUN Dockerfile with becnchmark and hey
Last active June 21, 2017 01:59
Building a docker which has go language , benchmark tool , hey and bech.sh
#Go to the directory where you have put this docker file.
cd <Path to the DockerFile>
# Run following to build an docker image
docker build -t go-container .
#Check image by using docker images. It will show like this.
shailendra-kumar:Docker shailendra.kumar$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
@kshailen
kshailen / Functional Test cases for putting and getting keys in etcd cluster
Last active July 12, 2017 02:23
Pythn Program to put key value pair in etcd cluster
#Suppose both files are presenen in functionalTest directory. There is following way to run context on this.
#Method 1
[root@marx-vagrant-setup coreos-vagrant]# run-contexts functionalTest
10
.....
----------------------------------------------------------------------
PASSED!
2 contexts, 3 assertions
(0.2 seconds)