Skip to content

Template for Devops repo, this could be a starting point for new Go lang repo with some devops principles

License

Notifications You must be signed in to change notification settings

vadlakiran/Devops

 
 

Repository files navigation

Docker and K8S

Go Reference

Golang, Docker and Kube Practise session

Kubernetes 1.6+

Quotes to spice my work

“What's measured improves” ― Peter Drucker https://en.wikipedia.org/wiki/Peter_Drucker

Helm

brew install helm

Automated PR

brew install github/gh/gh
git add .
git commit -am "just testing"
gh pr create -f

Create Nginx Service

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx

helm install -f minikube/nginx/values.yaml nginx ingress-nginx/ingress-nginx
$ minikube service ingress-nginx-controller  --url
http://192.168.99.100:32080
http://192.168.99.100:31443
http://192.168.99.100:32443

Add awesome-http.example.com in /etc/hosts to connect local

curl http://awesome-http.example.com:32080/dev

Kind environment

Testing in kind cluster, port mapping required for docker image of Kube worker node. So please make sure extraport mappings are added in the kind/config.yaml Remember to add in /etc/hosts (to nginx to work)

Follow the document

https://github.com/ranjith-ka/Docker/tree/master/kind#kubernetes-in-docker-kind

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                       NAMES
89c1110261bb        kindest/node:v1.16.15   "/usr/local/bin/entr…"   13 minutes ago      Up 13 minutes       127.0.0.1:65273->6443/tcp   openfaas-control-plane
84a1f8bc9b54        kindest/node:v1.16.15   "/usr/local/bin/entr…"   13 minutes ago      Up 13 minutes       0.0.0.0:32080->32080/tcp    openfaas-worker
$ helm install -f minikube/dev/canary.yaml canary-dev charts/dev
$ helm install -f minikube/dev/prd.yaml prd-dev charts/dev

$ curl -s -H "testing: always" http://awesome-http.example.com/dev
Welcome to my canary website!%

$ curl -s -H "testing: never" http://awesome-http.example.com/dev
Welcome to my prod website!%

Install Cobra

Dadjoke CLI Tool

Just trying out the tutorial

cobra init --pkg-name github.com/ranjith-ka/Docker
go mod init github.com/ranjith-ka/Docker

Add new command

cobra add random

Used below to convert JSON To go Struct online.

https://mholt.github.io/json-to-go/

Added the Pluing REST Client for postman things.

ctrl + alt + M -- Stop the running code.

Go Learning

https://github.com/StephenGrider/GoCasts

YAML remove comments

Remove all comments https://marketplace.visualstudio.com/items?itemName=plibither8.remove-comments

GIT FLOW

I created GIT FLOW using the same nvie git flow, but added two release to understand better. GIT FLOW (1)

sequenceDiagram
    autonumber
    Alice->>John: Hello John, how are you?
    loop Healthcheck
        John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
Loading

About

Template for Devops repo, this could be a starting point for new Go lang repo with some devops principles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 83.6%
  • Makefile 5.9%
  • Mustache 5.1%
  • Shell 4.3%
  • Dockerfile 1.1%