Jenkins Questions

Samyog GhimireSamyog Ghimire
2 min read

1. CICD Process:

First, we check out the code from the source control. Then, we build the application and run tests to check for code vulnerabilities and perform code scanning. After that, we store the built artifacts and deploy them to the Kubernetes cluster. For deployment, we can use either Ansible(Configuration Management tool) or ArgoCD (Continuous Deployment tool).

2. How do you install Jenkins?

To install Jenkins, I would first make sure the system has Java installed since Jenkins requires it. For Linux, I can use package managers like apt or yum depending on the system. After installation, I would start the Jenkins service and make sure it runs properly. I would open a web browser and go to http://localhost:8080 (or the server’s IP address) to access the Jenkins dashboard. Once Jenkins is up and running, I would install the necessary plugins to support the project.

3. How do you handle issues in your worker nodes?

If a worker node goes down or becomes unresponsive, I first try to log in and check for any problems. I would write a Python script to monitor the health of the worker nodes, or I could set up auto-scaling for the EC2 instances to handle issues automatically. The best approach would be to use a Docker agent. This way, I can run Docker containers, ensuring Jenkins stays up and running even if there are problems with the worker nodes.

4. How do you expose the Jenkins port to external world?

To expose Jenkins to the external world, I would start by ensuring that Jenkins is running on the correct port, which by default is port 8080. If needed, I can modify the Jenkins configuration to use a different port. Next, I would configure the system's firewall to allow incoming traffic on the Jenkins port. If I want to add an extra layer of security and improve user accessibility, I can set up a reverse proxy using tools like Nginx or Apache. This would not only allow access through a more user-friendly domain name but also help manage and secure the traffic. If Jenkins is hosted on a cloud platform like AWS or Azure, I would adjust the security group or network settings to allow inbound connections to the Jenkins port from external sources. This way, Jenkins can be accessed securely from outside the network.

0
Subscribe to my newsletter

Read articles from Samyog Ghimire directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Samyog Ghimire
Samyog Ghimire