Skip to content

Instantly share code, notes, and snippets.

View andrewlubenets's full-sized avatar
:electron:
Focusing

Andrew andrewlubenets

:electron:
Focusing
View GitHub Profile
@andrewlubenets
andrewlubenets / dynamodb-s3-compare.py
Created June 14, 2022 06:48 — forked from harisrinivaas/dynamodb-s3-compare.py
Compare dynamo db items with s3 back up files
# Comparing dynamo db items with s3 back up files
import boto3, datetime
def lambda_hander(event, context):
dynamodb_client = boto3.client('dynamodb','us-east-1')
s3_client = boto3.client('s3','us-east-1')
#Step:1 Getting item count from dynamodb tables 'test'
total_items_in_dynamo_db = 0
dynamodb_tables = ['table1','table2']
@andrewlubenets
andrewlubenets / InstallHaProxy.sh
Created August 6, 2019 19:12 — forked from jrouleau/InstallHaProxy.sh
Amazon Linux AMI Install HAProxy From Source (1.7.0 release pre configured). chmod +x InstallHaProxy.sh then ./InstallHaProxy.sh
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.7.0"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
green='\E[32;40m'
@andrewlubenets
andrewlubenets / ssh-tunnel.md
Created August 5, 2019 16:44 — forked from todgru/ssh-tunnel.md
How to set-up a SSH tunnel for AWS RDS

SSH Tunnel

Our db is hosted on Amazon. Our web server can connect to the db. Connections to the db are not allowed outside of the web server.

Run ssh tunnel locally:

This creates a tunnel from my local machine to the web server:

ssh -N -L 3307:my-rds-db.us-east-1.rds.amazonaws.com:3306 ec2-my-web-server.compute-1.amazonaws.com
@andrewlubenets
andrewlubenets / haproxy.aurora.endpoints.cfg
Created August 5, 2019 14:48 — forked from uorat/haproxy.aurora.endpoints.cfg
HAProxy configuration file with Aurora endpoints
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4096
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats user root group root level admin
@andrewlubenets
andrewlubenets / install-docker.md
Created July 19, 2019 10:20 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
Backup procedure for DeltaDevOps
One of very popular solution which support DeltaDevops it is etcd Backup Operator
etcd Backup Operator.
etc-operator which can:
- Periodic back up the data of a etcd cluster running on DeltaDevops to a remote storage such as PV, AWS S3, and Azure Blob Store. For periodical backup we have filed “backupIntervalInSecond:” and “maxBackups:”.Project official page: https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/backup-operator.md
- Restore backup with restore-operator https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/restore-operator.md
@andrewlubenets
andrewlubenets / kubernetes.md
Created May 8, 2019 21:19 — forked from carlessanagustin/kubernetes.md
Kubernetes tutorial steps

1. Create cluster

Cluster up and running

minikube version
minikube start
kubectl version