Skip to content

Instantly share code, notes, and snippets.

Avatar

Anoop Vijayan Maniankara maniankara

View GitHub Profile
@maniankara
maniankara / http-put-request.go
Last active Sep 28, 2021
handling put request in golang
View http-put-request.go
package fragments
import (
"net/http"
"io"
"log"
"strings"
"os"
"bytes"
)
@maniankara
maniankara / nexus-nginx
Created Jan 29, 2018
SSL translation for a nexus repository manager implementing two repository connectors dockerfetch and dockerpushtest
View nexus-nginx
upstream dockerfetch {
server 127.0.0.1:8082 fail_timeout=0;
server HOSTNAME.YOURDOMAIN.com:8082 fail_timeout=0;
}
upstream dockerpushtest {
server 127.0.0.1:8083 fail_timeout=0;
server HOSTNAME.YOURDOMAIN.com:8083 fail_timeout=0;
}
server {
listen 48082 ssl;
@maniankara
maniankara / fabric-node-configs.csv
Last active Dec 8, 2019
Used as a table for medium article
View fabric-node-configs.csv
NODE SERVICES IP OS HARDWARE
Admin node Orderer/fabric-ca 192.168.10.142 Ubuntu 18.04 1vCPU/1GB RAM/80GB HDD
Peer node Peer0 192.168.10.143 Ubuntu 18.04 1vCPU/1GB RAM/80GB HDD
View elastic-blog-versions.csv
APPLICATION VERSION
elastic 7.1
golang 1.11
docker 18.09
docker-compose 1.23
python 2.7
@maniankara
maniankara / elasticstack-docker.yaml
Created May 30, 2019
Elasticsearch and Kibana 7.2
View elasticstack-docker.yaml
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.2
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@maniankara
maniankara / walk.go
Last active May 30, 2019
Simple Golang snippet which checks for file availability on filesystem - Used in blog
View walk.go
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() {
err := filepath.Walk("/home/go", func(path string, info os.FileInfo, err error) error {
@maniankara
maniankara / fe-be-lb-stack.yaml
Created May 10, 2019
Deploy a node frontend with elasticsearch backend
View fe-be-lb-stack.yaml
---
apiVersion: v1
kind: Service
metadata:
name: loadbalancer
spec:
selector:
app: node
ports:
- protocol: TCP
View create-helm-service-account.yaml
# This is an extract from here: http://jayunit100.blogspot.fi/2017/07/helm-on.html
apiVersion: v1
kind: ServiceAccount
metadata:
name: helm
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
View kubenetes_max_pod_limit_medium
$ kubectl describe po/nginx-77c5cd5446-8rcjm
Name: nginx-77c5cd5446-8rcjm
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app=nginx
pod-template-hash=77c5cd5446
Annotations: <none>
Status: Pending
View jx-troubleshooting_medium.md
Description Error Resolution
No Jenkins service found in development namespace  anoop@myMac ~ $ jx create lile
? Pick a name for the new project: mygrpc
Created lile project at mygrpcect: (myapp)
mygrpc error: no Jenkins service be found in the development namespace!
Are you sure you installed Jenkins X? Try: http://jenkins-x.io/getting-started/
anoop@myMac ~ $
Your user account is lacking permissions, see section 'Elevate privileges for ClusterRoleBindings'
jx hangs/kubectl top node shows heavy load  anoop@myMac ~ $ kubectl top nodes | awk {'print $1 " " $3'}
NAME CPU%
gke-jx-default-pool-47e201fa-hwc9 14%
gke-jx-default-pool-47e201fa-pjmd 82%
gke-jx-default-pool-47e201fa-v3cl 23%
Increase the number of nodes atleast to 4
jenkins-maven node offline [Pipeline] node
Still waiting to schedule task
All nodes of label ‘jenkins-maven’ are offline
check the status of all th