{"id":1552,"date":"2016-12-07T10:51:22","date_gmt":"2016-12-07T10:51:22","guid":{"rendered":"http:\/\/cloudkul.com\/blog\/?p=1552"},"modified":"2017-06-14T11:33:39","modified_gmt":"2017-06-14T11:33:39","slug":"getting-started-jenkins","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/","title":{"rendered":"Getting Started with Jenkins"},"content":{"rendered":"<p><strong>What is Jenkins ?<\/strong><\/p>\n<p>Jenkins is an opensource \u00a0automation software written in Java. Jenkins is mainly used for Continuous Integration and Continuous Delivery.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Continuous Integration<\/strong><\/span><\/p>\n<p>Continuous Integration is a development practice, where developers push their code to the central repository and get instant feedback of how their code works. When a developer commit some changes, a build process is triggered automatically. When the build is complete, the results are immediately sent back to the developers. In this way developers can debug their code more efficiently. Developers can exactly know which code causes the build to be failed \u00a0and change their code accordingly. It saves so much time, as you do not have to manually build the code, when everyone finishes pushing their codes to repository because build process is automated.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Continuous Delivery<\/strong><\/span><\/p>\n<p>Continuous Delivery is a development practice, where the codes are automatically built,tested and prepared to make release for the production. Continuous Integration is the expansion for the Continuous Integration. When the codes are successfully built, testers need to to test the code for using different test cases. The testing process can be automated by triggering a process whenever a build is made. The results of tests are immediately sent back to the testers and the developers. So developers can change their respective codes to pass the test cases. The automated process can save a lot of time.<\/p>\n<p><strong>Why Jenkins ?<\/strong><\/p>\n<p>Jenkins can satisfy both Continuous Integration and Continuous Delivery needs. We can integrate Jenkins with a central repository server. Jenkins can fetch data from the repository and make the build. After making the build Jenkins can run some tests on the build to check the code passes the test cases.<\/p>\n<p><strong>How to set up Jenkins in Ubuntu ?<\/strong><\/p>\n<p>Jenkins is written in Java. We need to install Java to start using Jenkins.<\/p>\n<p>Install Java<\/p>\n<pre class=\"lang:sh decode:true \">sudo apt-get install openjdk-7-jdk<\/pre>\n<p>Check if Java is installed or not<\/p>\n<pre class=\"lang:sh decode:true \">java -version<\/pre>\n<p>I am using apache tomcat to run <strong>jenkins.war<\/strong> file. First you need to install and setup apache tomcat in the server.<\/p>\n<p>Download apache tomcat from <a href=\"http:\/\/tomcat.apache.org\/\">http:\/\/tomcat.apache.org\/<\/a><\/p>\n<p>My tomcat directory is <strong>\/opt\/tomcat.\u00a0<\/strong>You can use any other directory.<\/p>\n<p>open your <strong>.bashrc<\/strong> file and add the following lines.<\/p>\n<pre class=\"lang:sh decode:true\">export CATALINA_HOME=\/opt\/tomcat\r\n<\/pre>\n<p>Make all the files inside <strong>\/opt\/tomact\/bin<\/strong> executable.<\/p>\n<pre class=\"lang:sh decode:true\">chmod +x \/opt\/tomcat\/bin\/*<\/pre>\n<p>go to <strong>\/opt\/tomcat\/bin<\/strong> directory and run the startup script<\/p>\n<pre class=\"lang:sh decode:true \">cd \/opt\/tomcat\/bin\r\n.\/startup.sh<\/pre>\n<p><a href=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/tomcat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1557\" src=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/tomcat.png\" alt=\"tomcat\" width=\"723\" height=\"143\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now go to url <strong>http:\/\/127.0.0.1:8080<\/strong> and you will see apache tomcat home page. you can use your own IP instead of <strong>127.0.0.1<\/strong> .<\/p>\n<p>Now configure apache tomcat user. Go to <strong>\/opt\/tomcat\/conf\/tomcat-user.xml<\/strong> and add the lines inside.<\/p>\n<pre class=\"lang:sh decode:true \">role rolename=\"manager-gui\"\/&gt;\r\n&lt;user username=\"tomcat\" password=\"tomcat\" roles=\"manager-gui\"\/&gt;<\/pre>\n<p>Now shutdown the service and again start the service.<\/p>\n<pre class=\"lang:sh decode:true \">.\/shutdown.sh\r\n.\/startup.sh<\/pre>\n<p>Now you can deploy servlets in apache tomcat.<\/p>\n<p>Download jenkins.war file from\u00a0<a href=\"https:\/\/jenkins.io\/\" target=\"_blank\">https:\/\/jenkins.io\/<\/a><\/p>\n<p>copy the <strong>jenkins.war<\/strong> file in <strong>\/opt\/tomcat\/webapps<\/strong><\/p>\n<p>Now restart apache tomcat service and hit the url <strong>http:\/\/127.0.0.1:8080\/jenkins<\/strong>.<\/p>\n<p><a href=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/jenkins.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1560\" src=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/jenkins.png\" alt=\"jenkins\" width=\"1257\" height=\"668\" \/><\/a><\/p>\n<p>Enter your initial admin password and go through rest of the setup process. After that you can start using Jenkins by hitting the url <strong>http:\/\/127.0.0.1:8080\/jenkins<\/strong>. To access from other computer you need to replace localhost IP with original IP in the url. If you have any doubts regarding setting up Jenkins, you can ask me in the comment.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\">\u00a0<a href=\"http:\/\/cloudkul.com\/contact\/\" target=\"_blank\">IN CASE OF ANY QUERY,CONTACT US<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Jenkins ? Jenkins is an opensource \u00a0automation software written in Java. Jenkins is <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":8,"featured_media":1602,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[94],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Getting Started with Jenkins - Cloudkul<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with Jenkins - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"What is Jenkins ? Jenkins is an opensource \u00a0automation software written in Java. Jenkins is [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-07T10:51:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-06-14T11:33:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/JENKINS.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"suranjan horrow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\",\"name\":\"Getting Started with Jenkins - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2016-12-07T10:51:22+00:00\",\"dateModified\":\"2017-06-14T11:33:39+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/a653191c790a89b07d4b4aaefc3e2809\"},\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting Started with Jenkins\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/a653191c790a89b07d4b4aaefc3e2809\",\"name\":\"suranjan horrow\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dfd7f87bc7d62c1426e1f4c07653ff00?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dfd7f87bc7d62c1426e1f4c07653ff00?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"suranjan horrow\"},\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/cloudkul.com\/blog\/author\/suranjan-horrow869\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started with Jenkins - Cloudkul","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started with Jenkins - Cloudkul","og_description":"What is Jenkins ? Jenkins is an opensource \u00a0automation software written in Java. Jenkins is [...]","og_url":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/","og_site_name":"Cloudkul","article_published_time":"2016-12-07T10:51:22+00:00","article_modified_time":"2017-06-14T11:33:39+00:00","og_image":[{"width":848,"height":422,"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/12\/JENKINS.png","type":"image\/png"}],"author":"suranjan horrow","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/","url":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/","name":"Getting Started with Jenkins - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2016-12-07T10:51:22+00:00","dateModified":"2017-06-14T11:33:39+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/a653191c790a89b07d4b4aaefc3e2809"},"breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/getting-started-jenkins\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Getting Started with Jenkins"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/a653191c790a89b07d4b4aaefc3e2809","name":"suranjan horrow","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dfd7f87bc7d62c1426e1f4c07653ff00?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dfd7f87bc7d62c1426e1f4c07653ff00?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"suranjan horrow"},"sameAs":["http:\/\/webkul.com"],"url":"https:\/\/cloudkul.com\/blog\/author\/suranjan-horrow869\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1552"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=1552"}],"version-history":[{"count":11,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1552\/revisions"}],"predecessor-version":[{"id":1603,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1552\/revisions\/1603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media\/1602"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}