Skip to content

Instantly share code, notes, and snippets.

View nashmaniac's full-sized avatar
😃
Happy Always

Raju Ahmed Shetu nashmaniac

😃
Happy Always
  • KOHO Financial Inc
  • Toronto, Canada
View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: user-deployment
labels:
app: user
spec:
replicas: 2
selector:
matchLabels:
apiVersion: v1
kind: Namespace
metadata:
name: default
labels:
istio-injection: enabled # this is necessary coz without this the istio proxy will not work
apiVersion: v1
kind: Service
metadata:
name: application-service
spec:
selector:
pod: application
ports:
- port: 80
targetPort: 8000
apiVersion: apps/v1
kind: Deployment
metadata:
name: application-deployment
spec:
replicas: 2
selector:
matchLabels:
pod: application
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: application-configmap
data:
APP_NAME: My app name
@nashmaniac
nashmaniac / gist:1f165b96b5257285f1b329173716da6c
Created January 11, 2020 11:04
django-project-intialize-commands
➜ ~ mkdir docker_demo
➜ ~ cd docker_demo
➜ docker_demo virtualenv venv -p /usr/bin/python3
➜ docker_demo source venv/bin/activate
(venv) ➜ docker_demo pip install django gunicorn
(venv) ➜ docker_demo django-admin startproject .
(venv) ➜ docker_demo django-admin startproject docker_demo .
(venv) ➜ docker_demo pip freeze > requirements.txt
@nashmaniac
nashmaniac / Dockerfile
Last active January 6, 2020 11:49
Dockerfile for building a datascience image
FROM alpine:latest
LABEL MAINTAINER="Raju Ahmed Shetu<[email protected]>"
# Linking of locale.h as xlocale.h
# This is done to ensure successfull install of python numpy package
# see https://forum.alpinelinux.org/comment/690#comment-690 for more information.
WORKDIR /var/www/
@nashmaniac
nashmaniac / update_kafka_config.sh
Created October 24, 2019 11:46
Update Kafka config in google deployment
#!/bin/bash
#
# Script to update Kafka configuration information
# Must be run using sudo as the Kafka config file is owned by root
#
# Use colors for notification purposes
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
CYAN='\033[0;36m'
@nashmaniac
nashmaniac / install.sh
Last active October 23, 2019 20:37
Helm & Tiller
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
helm init