Full steam ahead

Finishing the first application meant that I had 2 more to go. I left off last time at almost finishing the 2nd application. At the time of writing this blog I can confirm that the 2nd and the 3rd application are deployed on the Kubernetes cluster and ready to use. So this will be the end of the blog. We reached the endgame and had a fun time doing it. The end. Obviously the story can’t end like this, right? Rest assured, I still have some fuel left for this blog. 

I started with building a Kubernetes Job for the MongoDB database which would feed the database with some basic login credentials so the app would be accessible after every clean deployment. The first issue that I had, was the fact that the MongoDB-dump that is used for the database was rather big in size. This meant that I couldn’t just mount it with the Kubernetes Job. In fact it was so big that the only viable solution was for the Kubernetes Job to download the dump file every time before importing it into the MongoDB database. 

With this problem my search began on finding a cloud solution which could securely host the MongoDB-dump. After many attempts my mentor and I decided on abusing the Nexus repository. Don’t worry, no binary repositories were harmed in the making of this blog.

We settled on configuring the Nexus Repository to host the dump file which we could afterwards acces with a curl-command. This might not seem as the most optimal solution but it works perfectly and sometimes you don’t need more than that. 

The migration of this application went without any big problems. I assume this has to do with the fact that I had already finished the deployment of the recruitment tool which was the biggest application of the 3. The knowledge that I had gained from that migration transferred smoothly to this one. I guess it is time to demonstrate the 2nd application.

Before you wonder why the fields are empty, they used to contain employee data which I thought shouldn’t be shared without permission. The employee data was gathered from the resumés that are stored in the application because that’s the whole point of the application. It’s a tool which is used to gather resumés from employees so they can be used in the future to find the right consultant for each project. The name of this application is the CV-App and the cool thing about it is the fact that the resumés are all made by a template which means that they can be dissected and analysed easily. The template also gives you a pretty looking resumé, I’m not going to lie, the template looks even better than my resumé. 

Having finished this application, I was ready to begin the next one as the finish line was already in sight. The last and third application exists out of three components. A React application together with a Spring boot application and a Postgresql database were waiting to receive some “Kubernetes magic”. The first obstacle which I struggled with was to build a Docker image of the React application. Previously I only needed to build  Docker images of Spring boot applications which was easily achieved by utilizing the Jib plugin. For this instance, I had to be a bit more creative. I took a little peak at the Jenkins pipeline of a previous Angular application as I noticed the same instructions could be used to build the Docker image for the React application. Copying those instructions I frankensteined an extra BitBucket branch which would create another Jenkins branch pipeline to build and package the React application to a Docker image. At last, success. The Jenkins pipeline had build a Docker image of the React application and it worked flawlessly. Based on the previous deployments, I quickly made the Kubernetes files for the last application and was ready to finalize it.

Imagine a drum roll on the background whilst I present you the final installment of this journey. 

The final application is a piece of software called the HR-tool. In a company like JIDOKA it’s important to support and help your employees. The HR-tool is created to gauge the feelings of the employee about his experience at work. It also contains many features to arrange coaching sessions and to set objectives within the context of the job. This clean and handy tool collects information which is of great value to the Human Resources department of the company. 

An important part of the project is to also make all the knowledge that is gained, transferable to the employees who are going to build further on this project. A good way of making this possible is writing documentation of the project. I started on writing the guidelines on how to deploy each application. An hour later I had clear and useful instructions which I could pass on to my mentor. He will be using those to migrate the application to a production environment where the real advantages of Kubernetes will be tested.

Even though it seems like there is no work more left, there still was the possibility of converting the Kubernetes files to Helm charts. But I will reveal more of that in the future posts of this blog.