Skip to content

Instantly share code, notes, and snippets.

@cpard
cpard / gist:02aa1b47cba2809792b4
Created March 22, 2016 13:23
Kafka Connect Connector interface
public String version()
public void start(Map<String, String> map)
public Class<? extends Task> taskClass()
public List<Map<String, String>> taskConfigs(int i)
public void stop()
@cpard
cpard / ESLog
Created May 28, 2014 12:23
ElasticSearch Node added to a cluster on Azure
[2014-05-28 12:16:08,698][INFO ][http ] [Xorr the God-Jewel] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/100.92.56.47:9200]}
[2014-05-28 12:16:08,736][INFO ][gateway ] [Xorr the God-Jewel] recovered [0] indices into cluster_state
[2014-05-28 12:16:08,737][INFO ][node ] [Xorr the God-Jewel] started
[2014-05-28 12:16:30,667][INFO ][cluster.service ] [Xorr the God-Jewel] added {[Occulus][SmioHKuCRFmiixo_6NLkfg][apiserv2][inet[/100.92.26.62:9300]],}, reason: zen-disco-receive(join from node[[Occulus][SmioHKuCRFmiixo_6NLkfg][apiserv2][inet[/100.92.26.62:9300]]])
@cpard
cpard / ESConfigAzure
Created May 28, 2014 12:19
ElasticSearch coniguration for supporting the Azure plugin
#put that into your config/elasticsearch.yml file
cloud:
azure:
keystore: #path your keystore file
password: #the password of your keystore, you didnt forget to put one right? ;)
subscription_id: #your Azure subscription ID
service_name: #this one should be common for all your VMs which is also the case for those belonging to the same #availability zone
discovery:
type: azure
@cpard
cpard / azureESPlugin
Created May 28, 2014 11:55
install the Windows Azure ElasticSearch plugin
./bin/plugin -install elasticsearch/elasticsearch-cloud-azure/2.2.0
@cpard
cpard / azureKeystore
Created May 28, 2014 11:38
openssl commands to create a pkcs12 keystore to be used by ElasticSearch on Azure
#it requires to have your keys created already
openssl pkcs8 -topk8 -nocrypt -in azure-private.key -inform PEM -out azure-pk.pem -outform PEM
openssl x509 -inform der -in azure-certificate.cer -out azure-cert.pem
cat azure-cert.pem azure-pk.pem > azure.pem.txt
openssl pkcs12 -export -in azure.pem.txt -out azurekeystore.pkcs12 -name azure -noiter -nomaciter
#do not forget to do the following in an appropriate directory ;)
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout azure-private.key -out azure-certificate.pem
chmod 600 *
openssl x509 outform der -in azure-certificate.pem -out azure-certificate.cer
@cpard
cpard / mariaDB1stNode
Created April 29, 2014 19:52
initiate the galera cluster by running the first none with --wsrep-new-cluster param
service mysql start --wsrep-new-cluster
@cpard
cpard / mariaDBConf
Created April 29, 2014 19:49
mariaDB Galera cluster config file
[mysqld]
#mysql settings
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0
#galera settings
@cpard
cpard / MariaDBShell1
Created April 29, 2014 19:45
MariaDB Galera Install the appropriate packages
DEBIAN_FRONTEND=noninteractive apt-get install -y rsync galera mariadb-galera-server
@cpard
cpard / MariaDBShell1
Last active August 29, 2015 14:00
Adding the MariaDB Galera Repository
apt-get install software-properties-common python-software-properties
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://mirror.klaus-uwe.me/mariadb/repo/5.5/ubuntu saucy main'
apt-get update