Posts

Source code migration (Github <=> Bitbucket)

What is a BARE git repository? Understand the difference between BARE and NON-BARE repositories and learn how to migrate source code from one SCM(bitbucket) to another SCM(git) including all branches, tags and commit history. Learn cherry-pick to push specific commit to another branch. 10_commands_for_scm_migration 1.clone_old_repo.sh git clone --mirror https://github.com/tvajjala/application.git NEW 2.change_working_dir.sh cd NEW 3.make_.git_folder.sh mkdir .git 4.move_files.sh mv info/ .git/ && mv description .git/ && mv hooks/ .git/ && mv refs/ .git/ && mv objects/ .git/ && mv config .git/ && mv packed-refs .git/ && mv HEAD .git/ && mv FETCH_HEAD .git/ 5.make_non_bare.sh git config --local --bool core.bare false 6.make_it_working_repo.sh git reset --hard 7.remote_remote_origin.sh git remote rm origin 8.add_remote_origin.sh git remote add origin htt...

Kubernetes Ingress with Minikube

1. Using Pod Configuration Kubernetes ingress is a collection of routing rules that govern how external users access services running in a Kubernetes cluster. — ThirupathiReddy Vajjala Kubernetes does not run containers directly; instead it wraps one or more containers into a higher-level structure called a pod . There are two possible ways we can create pods. 1. Using Pod Configuration Pod contains one /more different kind of container grouped and assigned under single IP. Any containers in the same pod will share the same resources and local network. Containers can easily communicate with other containers in the same pod as though they were on the same machine while maintaining a degree of isolation from others. pod_config.yaml apiVersion: v1 kind: Pod metadata: name: documentation.tvajjala.com labels: app: documentation spec: containers: - name: docuementation image: tvajjala/documentation ports: - containerPort: 8080 ...

Multi-stage Docker Build

How Multi-stage Build Works Demonstrating docker multi-stage builds which helps to build smaller docker images. This process also referred as Docker’s BUILDER PATTERN — ThirupathiReddy Vajjala One of the most challenging things about building images is keeping the image size down. Multi-stage builds are a new feature requiring Docker 17.05 or higher on the daemon and client. It was actually very common to have one Dockerfile to use for development (which contained everything needed to build your application), and a slimmed-down one to use for production, which only contained your application and exactly what was needed to run it. How Multi-stage Build Works With multi-stage builds, you use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them begins a new stage of the build. You can selectively copy artifacts from one stage to another, leaving behind everything you don’t wan...