In the fast-paced landscape of modern fleet management, precision and real-time data are paramount. Meet Fleetman, an innovative application revolutionizing how vehicle fleets are monitored and managed. Powered by a sophisticated microservices architecture, Fleetman integrates cutting-edge technologies to provide seamless tracking, data management, and insightful analytics.
At its core, Fleetman comprises several specialized microservices, each playing a crucial role in ensuring operational excellence. The journey begins with the Simulator Service, capturing real-time vehicle positions across bustling city streets. This data is swiftly relayed to the Apache MQ, a robust message queue microservice that efficiently manages message flow to and from the Position Tracker Service. Here, vehicle positions are meticulously tracked and stored in the MongoDB Database Service, ensuring persistent and reliable data storage.
Facilitating seamless data access and integration is the API Gateway Service, which acts as the gateway to retrieve vehicle tracking information from the Position Tracker Service. Finally, presenting these insights in a user-friendly interface is the Front-end Service, crafted with Angular to visualise and interpret the tracked paths and locations of fleet vehicles.
Let's dive into the blog, where we unravel the technological advancements driving Fleetman's impact on fleet management.
References: //www.udemy.com/course/kubernetes-microservices/
Note: If you follow the course then no need to clone the below repository. I have forked repository and changed few code to work on EKS while the app is deployed on minikube in course.
GitHub Repository:https://github.com/orgs/shubz-fleetman-org/repositories
Prerequisites:
EKS Cluster with minimum 2 t2.medium nodes.
Clone code from repository for jenkins : https://github.com/shubz-fleetman-org/jenkins
Step 1: Creating the jenkins pod:
You will get 2 files inside cloned jenkins repository. 1) Dockerfile 2) jenkins.yml
Apply the jenkins.yml to create the pod for the jenkins image.
kubectl apply -f jenkins.yml
Next, check on which node is the jenkins pod running so that we can access jenkins using address as : node_public_ip:nodeport
You can check node using the below command:
kubectl get pods -o wide
Now you can access the jenkins home page.
Step 2: Creating pipeline
Firstly set the ORGANIZATION_NAME environment variable. Click Manage Jenkins > System > Environment variable > Add > Name as ORGANIZATION_NAME and value as shubz-fleetman-org in my case.
Next on dashboard click on new item to create new jenkins job.
-
Enter the project name (any-name) select organisation folder as we are going to run all repositories inside organisation. Click OK.
-
Next you will get the above page select github organization under projects section.
Next, under credentials section click on add dropdown will appear select Jenkins from that to enter credentials for github account.
-
Next enter the username for you account in my case I have entered mine and the password as your github token. Enter ID it can be any and the description if you want to.
-
Next select our entered credentials from the dropdown.
-
Enter the organization name in the owner section.
-
Click on Apply and Save.
Jenkins will start scanning your organization for the repositories and the Jenkinsfile to build and deploy the code/images.
Step 3: Accessing the application
Use the command
kubectl get pods -o wide
to find the node on which your web application (the Frontend Micro service) is running. This command provides essential information about the pods, including their status and the node they are deployed on.For example, if your node's IP address is node_public_ip and the NodePort assigned to your frontend service is nodeport, you would enter
node_public_ip:nodeport
into your web browser.
In this blog post, we've explored the deployment journey of Fleetman, a cutting-edge application revolutionizing fleet management through advanced microservices architecture.
If you have any questions, need further clarification, or just want to share your DevOps success stories, feel free to reach out. I'm here to help and eager to hear about your DevOps adventures. Drop me a message, and let's keep the conversation going. Happy coding!