Skip to content

Instantly share code, notes, and snippets.

View jinnabaalu's full-sized avatar

Jinna Baalu jinnabaalu

View GitHub Profile
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;
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
apiVersion: v1
kind: Service
metadata:
name: kaf1
spec:
type: LoadBalancer
ports:
- name: port-9092
port: 9092
protocol: TCP
apiVersion: v1
kind: ReplicationController
metadata:
name: kafka1
spec:
replicas: 1
selector:
app: kafka1
template:
metadata:
kind: Service
apiVersion: v1
metadata:
name: zoo1
spec:
type: LoadBalancer
ports:
- name: port-2181
port: 2181
protocol: TCP
apiVersion: v1
kind: ReplicationController
metadata:
name: zookeeper1
spec:
replicas: 1
selector:
app: zookeeper1
template:
metadata:

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

Docker Swarm

To join a worker

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

To join a manager

@jinnabaalu
jinnabaalu / Docker-commds.md
Last active September 30, 2017 05:50
Docker commands for volumes, docker containers, docker images, docker volumes, docker networks, docker swarm, docker swarm services, remove unused images, dangling

Docker Images

List Images

 docker images
 
 docker rmi <ImageNameOrImageId>

Tag Image

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