This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROCKSDB_VERSION=5.11.3 | |
#Run as a root user | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root (with sudo command)" | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ETCD User/Role Management Commands | |
# Users | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} user list | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} user add <user_name> | |
# Roles | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role list | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role add {role_name} | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role grant-permission {role_name} --prefix=true read /system/delivery-services/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -ti <container_name> grafana-cli admin reset-admin-password --homepath /usr/share/grafana mypass@123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Run as a root user | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root (with sudo command)" | |
exit | |
fi | |
#Colours | |
GREEN='\e[32m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
ROCKSDB_VERSION="5.18.4" | |
ZSTD_VERSION="1.1.3" | |
yum update -y && yum install epel-release -y | |
yum install -y \ | |
wget \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2' | |
services: | |
zookeeper: | |
container_name: zookeeper | |
image: confluentinc/cp-zookeeper:latest | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt install docker.io | |
docker volume create gitlab-runner-config | |
docker run -d --name gitlab-runner --restart always -v /var/run/docker.sock:/var/run/docker.sock -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest | |
docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "key:" | kafkacat -b <broker1,broker2> -t <topic> -p <partition> -Z -K: -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
TABLE_SCHEMA, | |
TABLE_NAME, | |
COLUMN_NAME, | |
DATA_TYPE, | |
COLUMN_TYPE, | |
IF( | |
LOCATE('unsigned', COLUMN_TYPE) > 0, | |
1, | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ! /bin/bash | |
# Share internet connection | |
# enxfcde56ff0106 -> interface which has an internet connection | |
# enp1s0 -> Interface which has connected to the network that we have to share the internet | |
# 192.168.100.0/24 -> local subnet | |
# Please replace the above values/interaces with the ones you have in your computer | |
sudo iptables -A FORWARD -o enxfcde56ff0106 -i enp1s0 -s 192.168.100.0/24 -m conntrack --ctstate NEW -j ACCEPT | |
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -t nat -F POSTROUTING |
OlderNewer