In my 10+ years of work life I have always been busy with work. I did learn many new things of course during my time though as the years passed a growing concern began to bubble up as I conducted interviews for my team.
People had missing bits (sometimes critical) in their knowledge of important components or tech. While this does sound normal and people of course could learn, it triggered something in me. Looking in to myself I noticed the following unacceptable flaws
In our ongoing nothing to something series, we will be learning some new popular tech in a concentrated bite-sized format. We will try to cover as much ground as possible. At the end of this wall of text, if you do everything here, you will have gained working knowledge of Ansible, the popular configuration automation tool.
The text here will read like a log of some sorts because I will be learning, applying and concentrating whatever I see, along with solutions to common problems I will most likely come across. …
We did a cluster installation previously using kubeadm and a lot of manual work. I remember how much of a hassle it was so lets do one with bit less “hands on” and with more suffering.
In short we are going to do the following
We are going to be using scripts for most of the ops and you can find them from the below repo if you are interested.
So previously we created VMs and set them up for various reasons with success but also magnificent suffering. Additionally, my local k8s cluster went down for many reasons too numerous to count so I had to reinstall everything from scratch, which I hated.
So to not hate this more than necessary, good people at HashiCorp created Terraform. There are similar tools like Pulumi, CloudFormation, and even Ansible in some cases but people love Terraform so let’s have a go at it shall we (and forever use it for infrastructure creation of all sorts from now on).
So to achieve this…
If we want to use Spring components for a microservices architecture, just understanding devops components is not enough. Let’s dive into Spring a little bit.
Note: This document will be updated continuously to cover all Spring components necessary for a microservices architecture.
First of all, I’m going to be using Intellij IDEA and the code I’m using for tests are going to be updated here:
Now lets start by creating a simple maven project with Spring Boot. Use the below bit as base, fill the next screen as whatever you want, Then choose the below components. …
So we setup a decent cluster and some usual CI/CD components before. Now lets get a pipeline running.
In a basic scenario, we could do the following;
To test the pipeline, create any Spring Boot app on github, if you want you can use mine.
Now lets get it connected to github;
First we create 2 credentials in Jenkins, one for the github access, the other…
Static analysis is king in the SDLC world so let’s get a common one, Sonar, running in our pipeline.
Lets run a postgres db first. Since I’m fiddling with the k8s cluster all the time (and breaking it), looking at you angrily calico, and I’m going to be using the db for other things, I can’t risk losing data so I’m going to run sonar in my swarm.
So we have the below stack.yml. Just run in a swarm or run as compose file. Adminer is a little db interface if thats your thing.
docker stack deploy -c stack.yml postgres
So yeah, why not use Jenkins in a k8s? Lets get one up an running.
First we need to create an image with some plugins we want pre installed. Normally if we were to install to a VM with internet connection, they could be installed via the Jenkins UI.
Our Dockerfile is like follows. I went a bit overboard with the plugins but I do want to try them all out. Plugins are here
Create a file called Dockerfile with the below content. We will be using the default jenkins image as a base.
Now, this is something supposedly easy right?
I’m recently in the process of setting up a local CI/CD pipeline and after finishing installation of harbor, I noticed I had 150MB of disk space left. No biggy right, lets increase the disk space as it says in VirtualBox documentation;
Open Virtual Media Manager,
This is going to be a long and continuously updated story and a long overdue one.
I often ask myself why I haven’t yet experimented with the tech I use. There is no answer other than procrastination. So lets dive right in.
Just a software everything fighting battles against mostly myself, and gaining small victories lately.