Jenkins Architecture: Jenkins follows a Master/Slave architecture where master and slave communicate over TCP/IP protocol Jenkins Architecture has 2 main components: 1. Jenkins Master/Server 2. Jenkins Slave/Node/Build Server 1. Jenkins Master: The Main Server of Jenkins i.e. the brains is the Jenkins Master It is a dashboard which is powered from a war file Runs on port 8080 by default With the help of the dashboard we can configure the jobs/projects but the build takes places in the Node/Slave server By default one node is configured and running in Jenkins Server We can add more nodes using IP addresses, username, passwords using jnlp, ssh or webstart methods The main job of server is: Scheduling build jobs Dispatching builds to the nodes/slaves for actual execution Monitoring the nodes/slaves Recording and Presenting the build results A Master/Server instance of Jenkins can execute build jobs as well i.e. it can also act as a node itself 2. Jenkins Slave: The Jenkins sla
Why we need build tool? Consider this scenario where you want to run a java application You can use java compiler (javac) provided by JDK to compile java code into Byte Code which can then run on any Machine To compile Java Programs using javac you will have to list all java source files to run the entire application Ex., "javac Program1.java Program2.java Program3.java Program4.java" This is a very tedious job. Doing this manually is a pain since there are hundreds of libraries used even in the simplest of Java Application Also one has to add Compilation classpath to make the code work. For example if the code uses libraries like testNG, Selenium etc. You need to add it to Compilation Classpath using following code: "javac -cp testNG.jar; webdriver.jar; lib3.jar" MyProgram.java In conclusion, Compiling java code manually becomes very tedious and complex task Enter Third party build tools like Spring boot, apache-comm
- Write a code Read a JSON file in java and get all objects/array objects from it. - How is Vector different than a List? - Collections vs Collection? - How do you make sure a List is not accessed concurrently? - Are Thread.sleep() and wait method from selenium static? - Can we overload sleep() and wait() methods? - Difference between sleep() and wait() methods - What is Transient in Java? - Explain the whole hierarchy of Collections interface - Is ArrayList thread safe? - How to make a list thread safe? - What is Autoboxing and Unboxing in java? - Wrapper classes in java? - Can we have method implementation inside an Interface? - What is Fail fast in java? - Write a program Find all pairs of elements in an array whose sum is equal to given number array- {4,5,7,11,9,13,8,12,10,10} given number -20. Eg., O/p: should be: 11,9 8,12, 13,7 10,10 - What is fail fast mechanism in Java - Do you know lambda expressions?
Comments
Post a Comment