Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Jinna Balu JinnaBalu

🏠
Working from home
View GitHub Profile
View create-databases-dev.sql
DROP DATABASE IF EXISTS online_auction_bidding;
DROP USER IF EXISTS online_auction_bidding;
CREATE DATABASE online_auction_bidding;
CREATE USER online_auction_bidding WITH PASSWORD 'online_auction_bidding';
GRANT ALL PRIVILEGES ON DATABASE online_auction_bidding to online_auction_bidding;
View postgres.yml
version: '3.3'
services:
postgresql:
image: postgres:10.4
container_name: postgress-service
volumes:
- /var/db/data/postgresql:/var/lib/postgresql
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
View kafka-service.yaml
apiVersion: v1
kind: Service
metadata:
name: kaf1
spec:
type: LoadBalancer
ports:
- name: port-9092
port: 9092
protocol: TCP
View kafka-cluster.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: kafka1
spec:
replicas: 1
selector:
app: kafka1
template:
metadata:
View zookeeper-service.yaml
kind: Service
apiVersion: v1
metadata:
name: zoo1
spec:
type: LoadBalancer
ports:
- name: port-2181
port: 2181
protocol: TCP
View zookeeper-cluster.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: zookeeper1
spec:
replicas: 1
selector:
app: zookeeper1
template:
metadata:
View AWS-CIDR.md

VPC in AWS

  • AWS Virtual Private Cloud (VPC) : user defined vertual network

  • Public and Private Subnets : Subnets we can define into private and public t expose to the external or internet

  • Route Tables - Main and Custom to map to the public internet gate way

  • Internet Gateway - to associate the the any route table to the internet

View docker-swam.md

Docker Swarm

To join a worker

docker swarm join --token <worker_token> <manager_ip>:2377

To join a manager

@JinnaBalu
JinnaBalu / Docker-commds.md
Last active Sep 30, 2017
Docker commands for volumes, docker containers, docker images, docker volumes, docker networks, docker swarm, docker swarm services, remove unused images, dangling
View Docker-commds.md

Docker Images

List Images

 docker images
 
 docker rmi <ImageNameOrImageId>

Tag Image

View jenkins-master-demo.sh
export CLUSTER_DNS=[...]
export CLUSTER_IP=[...]
ssh -i workshop.pem docker@$CLUSTER_IP
docker container run -d --name jenkins -p 8080:8080 jenkins:alpine
docker container ls # Wait until it is up and running
You can’t perform that action at this time.