<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manas Jain on Medium]]></title>
        <description><![CDATA[Stories by Manas Jain on Medium]]></description>
        <link>https://medium.com/@mjmanass0699?source=rss-4f83f89c4b85------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VydJQ3VdrBor4TzNXVL9Bg.jpeg</url>
            <title>Stories by Manas Jain on Medium</title>
            <link>https://medium.com/@mjmanass0699?source=rss-4f83f89c4b85------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:02:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mjmanass0699/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Merge Github branches after testing through Jenkins]]></title>
            <link>https://medium.com/@mjmanass0699/merge-github-branches-after-testing-through-jenkins-905690eb3899?source=rss-4f83f89c4b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/905690eb3899</guid>
            <dc:creator><![CDATA[Manas Jain]]></dc:creator>
            <pubDate>Fri, 07 Aug 2020 07:16:16 GMT</pubDate>
            <atom:updated>2020-08-07T07:16:16.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jxPsy5zF6SnwacjexPU_HQ.jpeg" /></figure><p>JOB#1</p><p>If Developer pushes to dev branch then Jenkins will fetch from dev and deploy on the dev-docker environment.</p><p>JOB#2</p><p>If the Developer pushes to the master branch then Jenkins will fetch from master and deploy on the master-docker environment.</p><p>both dev-docker and master-docker environments are on different docker containers.</p><p>JOB#3</p><p>Manually the QA team will check (test) for the website running in the dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2</p><p>Whenever a developer pushes the code in GitHub, the code have to undergo a lot of testing process before coming to the Market or getting ready for the production. First, the code is made by the developer in his local repository then the developer pushes the code in the SCM i.e. Github, after that the code has to undergo a lot of testing.</p><h3><strong>Job-1</strong></h3><p>1. Creating the local repository for developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*F3g9dEABCJlwJGYkJJedXg.jpeg" /></figure><p>2. Connecting the local repo with GitHub repo</p><p>Make a GitHub repository then follow these steps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*mwRe2H2-kOaDYK-z1QO60A.jpeg" /></figure><p>3. Creating a developer branch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*kUbenf91Y6nC0oY2_GAW3w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*foyitjkxClf0yKH4PXCXUw.jpeg" /></figure><p>4. Linking and Configuring Job1 in Jenkins</p><p>In Jenkins create a new project with the name “Job1” and add your GitHub URL there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4n3g2O6DzrYYuXgG5HyvaQ.jpeg" /></figure><p>Make the testing directory in your deployment operating system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_20OSSMgh1c40yRyWPC9UA.jpeg" /></figure><h3>Job 2</h3><p>Here we will add the master branch so both the branches in different different containers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SqJSfRmtI4-geRdIdBpv2Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ljJA71GfH6NFSJVPTC38Tw.jpeg" /></figure><h3><strong>Job 3</strong></h3><p>Merging the developer branch with developer branch and updating the website Make a project in Jenkins named as Job3 and then give the details of your GitHub URL in Jenkins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqPsuwSnAODGEb8gcXftZg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YffFTuMQlrTdH6CJdLvlMA.jpeg" /></figure><p>So finally all the jobs have been created.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=905690eb3899" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Website On Kubernetes through Jenkins With Groovy Scripting]]></title>
            <link>https://medium.com/@mjmanass0699/deploy-website-on-kubernetes-through-jenkins-with-groovy-scripting-78cdf68cfcf0?source=rss-4f83f89c4b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/78cdf68cfcf0</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[groovy]]></category>
            <dc:creator><![CDATA[Manas Jain]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 10:50:45 GMT</pubDate>
            <atom:updated>2020-08-05T10:50:45.281Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*xPNSSfbyFk6ME46UU-cv2g.png" /><figcaption><a href="https://pattern-match.com/">https://pattern-match.com</a></figcaption></figure><p>What is <strong>Groovy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*BXC0pxNw0QjeRGTcoIlvHw.png" /></figure><p><em>It can be used to orchestrate your pipeline in Jenkins and it can glue different languages together meaning that teams in your project can be contributing in different languages. Groovy can seamlessly interface with the Java language and the syntax of Java and Groovy is very similar</em></p><p><a href="https://www.linkedin.com/in/manas-jain-6b5946177/detail/recent-activity/posts/">4 articles</a></p><h3>Technologies I Used In this Project</h3><blockquote><strong>Docker</strong></blockquote><blockquote><strong>Github</strong></blockquote><blockquote><strong>Kubernetes</strong></blockquote><blockquote><strong>Groovy</strong></blockquote><blockquote><strong>Jenkins</strong></blockquote><blockquote><strong>jq — jq is a command-line tool for parsing JSON</strong></blockquote><p>Here First I Create Create container image that’s has Jenkins installed using Dockerfile</p><p><strong>RUN (Line 3–17)</strong>-Download all the required files from the Internet</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ccc2a112a5543c5ad3feaa8f11d4340/href">https://medium.com/media/7ccc2a112a5543c5ad3feaa8f11d4340/href</a></iframe><p><strong>COPY (Line 19–21)</strong> — Copy the files from the host and these are the file which is used to send a request to Kubernetes Cluster Todo something this is like passwords for the machines, and 2nd Config is dependent on 1st three files in this file we have to mention the path of these files 3rd</p><p>→ — — PHP.yml — —</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca70131addf286f30f761728bf3796e7/href">https://medium.com/media/ca70131addf286f30f761728bf3796e7/href</a></iframe><p>— — PVC.yml — —</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c79695d0372747b7c850625f561b416e/href">https://medium.com/media/c79695d0372747b7c850625f561b416e/href</a></iframe><p>— — Service.yml — —</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed189c5c751f340717d89076717f5703/href">https://medium.com/media/ed189c5c751f340717d89076717f5703/href</a></iframe><p>than That create Docker Image and as soon as you run the docker container it automatically starts service in the backend</p><pre>docker run -itd -p 8111:8080 jenkinskuber:latest</pre><h4><strong>Github Of Developer</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*HsViLYZxm8WWDhj6uRxz1Q.png" /></figure><p>the Jenkinsfile.groovy file is …</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f50237fa18e4f4c8af129bb7ec9b022d/href">https://medium.com/media/f50237fa18e4f4c8af129bb7ec9b022d/href</a></iframe><h3>Now Jenkins Role Come In-Play</h3><p><strong>Jenkins → </strong>Jenkins is a free and open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery</p><h4><strong>Plugin Required :</strong></h4><h4><strong>Job-DSL</strong></h4><h4><strong>Github</strong></h4><h4><strong>Email-Extension</strong></h4><h4><strong>Build Pipeline</strong></h4><p>Job DSL plugin is used for orchestrated Jobs through Groovy this groovy code is written by the developers</p><p>For this, We have to create one <strong>Seed Job</strong> in Jenkins, the duty of this job this will fetch the repository of the developer of GitHub where the groovy file exists.</p><p>before making this job we have to download the plugin <strong>Job-DSL </strong>and select the DSL in the <strong>build drop-down</strong> menu</p><p>So upper side we have to mention the GitHub URL where the groovy file exists. and downside the path of groovy (like *.groovy)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9TwFDZNDdSxYFCjXLDF5KQ.jpeg" /></figure><p><strong>Then Save the Job</strong></p><h4>Then Build the Job, as you build the job you will see the <strong>Error</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*mii3P8knwdCZ8MMWBii7oA.jpeg" /></figure><p>To Resolve this Error we have Approved this Groovy Script In the</p><p><strong>Manage Jenkins → In-process Script Approval</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suUl1EQ_Vi341Py5Bllmng.jpeg" /></figure><p>Open This then Approve This Script so after approve we can build the <strong>Seed Job</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*ydwHWuMBOFB_Yugj6D7S2A.jpeg" /></figure><p>So as soon as you build you will see new Jobs Come with pre-set code, previously there only single.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*KwrxEg5PoDGSLqcFcVP0sQ.jpeg" /></figure><p>Now we Will see What inside the Jobs</p><p><strong>Start With Job-1</strong></p><p>This job will Pull the code of Developer which developer pushed on GitHub . for this we have to download the plugin from the plugin store which is provided by Jenkins and we have to only paste the git repo link and if this repo is private so for this we have to provide credentials so the Jenkins can go there and pull it for us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qBPXzka4oxeJQUgRyuUFw.jpeg" /></figure><p>This is also the part of job1 and this will copy the whole code from the Jenkins directory and paste in the mentioned directory and this directory is created when we deploy our Dockerfile .we will understand why we do this in next jobs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Ybd8UTK_FvCS8CR8cqCtA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*L6CmDGuD31DPLabjpvEQ_g.jpeg" /></figure><h4>Job-2</h4><p>Here the main Challenge start so there we have to choose only that container which type of code developer push if this code contains PHP so it autostarts that container for this we have to create multiple containers because we don’t know which type of code developer pushed but here I’m the developer and I’m the admin so here is put PHP code only but we can use Conditions in BASH</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pq_MwM_pGAW8x1GwZ1CNCA.jpeg" /></figure><p>And there are some jq parts which work is fetch the data from JSON file which is created after sleep 25 pods.json and after this, it fetches a required value from pods.json file in this case here I required Kubernetes status of deployment if it is TRUE it will go inside conditions after this one more condition inside this will provide the Kubernetes pod name to $trans variable and then it Exposes it to the public world And there are some optional things one is store $ip and $port of exposed hostIP and Port</p><h3>OUTPUT OF JOB-2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*x8hAMSWqsiDkzviBLo_52g.jpeg" /></figure><p><strong>Job-3</strong>: Test your app</p><p>This job will test the IP: PORT is working or not in case if it is not working then it will trigger to next job</p><p>So first this will retrieve data from JSON and store that in given ports in my case I retrieve IP of the host and port number where my website is running</p><p>then it will do testing with the help of conditions in bash if the website is working then it will stop and if it is not working then it will auto-trigger to the next job in else statement and fail this job</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Q0IwuzfnBGxcsHLJ6zuXw.jpeg" /></figure><h3>Output Of job3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*zkkXiIIST7nFcB0jsuprUQ.jpeg" /></figure><p><strong>Job4</strong>: if the website is not working, then send email</p><p>The Work of this job only to send Email to the developer that the website is not working</p><p>here is using this trigger redhat which means the else statement of job three this all the part of Jenkins and I use email plugin and do the setup from configure Jenkins in the setting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O1vnaXE1IqX9Hy9zOFitXw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xaBVryctKeipI9aJycOk3g.jpeg" /></figure><p>and here just, for example, I intensionally failed my job 3 to show how mail come like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*LNb5XDKnfO76JAZtyogsFg.jpeg" /></figure><p>And after the website launch, it looks like this, And this on same port no. which is retrieved by the jq</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZS_nWZtGN9TwkPaya6wTUg.jpeg" /></figure><h4>OUTPUT OF JOB4</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*6YZ6BaP8l3S3gouPgBZpug.jpeg" /></figure><h3><strong>Kubernetes Output</strong></h3><p>Some Images of <strong>services</strong> of Kubernetes which is launch by Jenkins is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vaZILwHAQB-FT8b_-peCaw.jpeg" /></figure><p>and you can verify from here also the port no. where our website is running</p><p>We have made all the data persistent and we created volumes in YAML file of deployment so here is the location where our volumes are mounted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*Liv-_xVftnmTnNo8W8Ct-w.jpeg" /></figure><h3>Linkedin → <a href="https://www.linkedin.com/in/manas-jain-6b5946177/">https://www.linkedin.com/in/manas-jain-6b5946177</a></h3><p><a href="https://github.com/mjmanas0699/Devops_Task_6">mjmanas0699/Devops_Task_6</a></p><h3>Thanks For reading</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78cdf68cfcf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Save your Grafana & Prometheus Data With Kubernetes Using Pvc & ConfigMap]]></title>
            <link>https://faun.pub/save-your-grafana-prometheus-data-with-kubernetes-using-pvc-configmap-f0518bb60469?source=rss-4f83f89c4b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0518bb60469</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Manas Jain]]></dc:creator>
            <pubDate>Tue, 04 Aug 2020 09:34:19 GMT</pubDate>
            <atom:updated>2020-08-05T17:16:05.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*NmbsfNVIEQVv64vxLWNkfw.jpeg" /></figure><p>In this Article I Will cover how to make data persistent with the help of Kubernetes PVC and Config Map</p><h4>What is Prometheus?</h4><p>Prometheus is an open-source software application used for event monitoring and alerting. It records real-time metrics in a time series database (allowing for high dimensionality) built using an HTTP pull model, with flexible queries and real-time alerting. It is now a standalone open source project and maintained independently of any company</p><blockquote><em>source — </em><a href="https://prometheus.io/"><em>https://prometheus.io</em></a></blockquote><h4>What is Grafana?</h4><p>Grafana is an open-source solution for running data analytics, pulling up metrics that make sense of the massive amount of data &amp; to monitor our apps with the help of cool customizable dashboards.</p><p>Grafana connects with every possible data source, commonly referred to as databases such as Graphite, Prometheus, Influx DB, ElasticSearch, MySQL, PostgreSQL, etc.</p><p>Grafana being an open-source solution also enables us to write plugins from scratch for integration with several different data sources.</p><p>The tool helps us study, analyze &amp; monitor data over a period of time, technically called time-series analytics</p><blockquote>s<em>ource -https://grafana.com/</em></blockquote><p>Start From Here so First we’ll create<strong> Prometheus YML file</strong></p><p>So, First of all, we have to create PVC For<strong> Prometheus</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9eea1e7327ff56b39e547121940c5ab2/href">https://medium.com/media/9eea1e7327ff56b39e547121940c5ab2/href</a></iframe><p>after creating this file run this below command and this command will create PVC</p><pre>kubectl apply -f promethusPVC.yml #filename.yml</pre><p>So after creating PVC now we need something where we mount this PVC so obviously we want PODS with some Powers like Deployment &amp; ReplicaSet</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2bcd8d8d9e7045b37680be39ef2233c3/href">https://medium.com/media/2bcd8d8d9e7045b37680be39ef2233c3/href</a></iframe><p>Here I use my Own Docker Image &amp; the Config Map? So what is ConfigMap</p><p>It is used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps as environment variables, command-line arguments, or as configuration files in a volume</p><p>So we have to create Configmap file for Prometheus so we can provide some information from the outside with the help of configMap</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66ca1c9cafc9f583efad2526a7fc7e38/href">https://medium.com/media/66ca1c9cafc9f583efad2526a7fc7e38/href</a></iframe><pre>kubectl apply -f configprom.yml #first create configmap<br>--------------------------------<br>kubectl apply -f promedeploy.yml # then run this deployment file </pre><p>in the deployment file of Prometheus, we also have created service in the last this service or nodePort will help us to connect this Prometheus through URL.</p><p>Run this command below to check IP Of Node and the service port where Prometheus is running</p><pre>minikube ip &amp;&amp; kubectl get svc </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*UJsDUWWkmnHtffNMLJhEVQ.jpeg" /></figure><p>So After the visit on this URL Output Something Like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jF26IA5sBCIhP4IrrP20MQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8HcNAMdctKG256WbywFmA.jpeg" /></figure><p>So here the mount Path of PVC Where the data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZwBgUpSbBMyeojg4Swccg.jpeg" /></figure><h3><strong>Grafana</strong></h3><h4><strong>Creating PVC for Grafana Pod</strong></h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c72ada80380adc3d854fd179896b76c/href">https://medium.com/media/1c72ada80380adc3d854fd179896b76c/href</a></iframe><p>After This Run This below command</p><pre>kubectl apply -f grafavol.yml #file_name.yml</pre><p>then create the deployment of Grafana</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f57ee9ac7394d7a452995b9a7c2f3ed/href">https://medium.com/media/3f57ee9ac7394d7a452995b9a7c2f3ed/href</a></iframe><p>Then again run the command to know about service port and Node Ip</p><pre>minikube ip &amp;&amp; kubectl get svc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*mp_Kua_uvrAYpDK2ATasqA.jpeg" /></figure><p>So After the visit on this URL Output Something Like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DlPE0QblG0xixpOsPeCwGQ.jpeg" /></figure><p>☝️ This Is the first login screen of Grafana. the default username &amp; password is “<strong>admin”</strong></p><p>After entering the username and password it asks you to enter a new password so choose accordingly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzZQAlUtv93HmkdkQNywBg.jpeg" /></figure><p>so now you’ve logged in successfully</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEFCDcbtAvQx4toY5nt01w.jpeg" /></figure><p>So Prometheus and Grafana are running on Kubernetes with the persistent data so if any issue occurs happens it may destroy the pod and after launching a new one, the previous data won&#39;t be lost. It auto-updates the previous data with data so we don&#39;t face any issue.</p><p>Now let&#39;s Check if Our data is consistent or not with Grafana</p><p>So firstly we will create a dashboard in Grafana and connect the data source as Prometheus so that Grafana will fetch the data from Prometheus. So first, add Prometheus as a <strong>data source</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*RRzUQEIsYXtM-9Oze85GOQ.jpeg" /></figure><p>After click on <strong>Add Data Sources → Prometheus</strong></p><p>Add URL of Prometheus</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B8ZWo-70tG4nBncCcwQFQw.jpeg" /></figure><p>then click on <strong>Save &amp; Test →Back</strong></p><p>After Click on Dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*Y8eSzJY8SO96RZYdVY55aQ.jpeg" /></figure><p>After this click on <strong><em>Add new Panel</em></strong></p><p>run any query which is supported by Prometheus then the result is the above</p><p>then click on<strong> Save → give dashboard name</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PPbwMWAkYY5m5RLJ3lITGQ.jpeg" /></figure><p>Add Multiple Panel on the dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yksDjl3cf9-mX38kHwpQw.jpeg" /></figure><p>Now Delete All the Pods Of Grafana So we can check if we lost any data or not</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*YQOxyL1jsTU7BIHz7LtPTA.jpeg" /></figure><p>After, you will see your dashboard is saved and the other data is also consistent like username password and other things</p><blockquote><strong>Thanks For Reading</strong></blockquote><p><a href="https://github.com/mjmanas0699/Grafana_Prom_Task">mjmanas0699/Grafana_Prom_Task</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Subscribe to </strong><a href="https://www.faun.dev/join?utm_source=medium.com/faun&amp;utm_medium=medium&amp;utm_campaign=faunmediumprebanner"><strong>FAUN topics</strong></a><strong> and get your weekly curated email of the must-read tech stories, news, and tutorials </strong>🗞️</p><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬</p><figure><a href="https://www.faun.dev/join?utm_source=medium.com/faun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cT0_laE4iPcqW1qrbstAg.gif" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0518bb60469" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/save-your-grafana-prometheus-data-with-kubernetes-using-pvc-configmap-f0518bb60469">Save your Grafana &amp; Prometheus Data With Kubernetes Using Pvc &amp; ConfigMap</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Nextcloud and MySQL On Elastic Kubernetes Service & Efs]]></title>
            <link>https://medium.com/analytics-vidhya/deploying-nextcloud-and-mysql-on-elastic-kubernetes-service-efs-ae3d23e8c2ff?source=rss-4f83f89c4b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae3d23e8c2ff</guid>
            <category><![CDATA[nextcloud]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Manas Jain]]></dc:creator>
            <pubDate>Wed, 15 Jul 2020 13:37:17 GMT</pubDate>
            <atom:updated>2020-07-19T16:27:12.875Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*hNxvyyuebBcXR4L34uBcjA.jpeg" /></figure><h3><strong>Amazon EKS</strong></h3><p>Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications. Customers such as Intel, Snap, Intuit, GoDaddy, and Autodesk trust EKS to run their most sensitive and mission-critical applications because of its security, reliability, and scalability. For more understanding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*zBfBvQv3sJtqkX6H7p7s9w.jpeg" /><figcaption>AMAZON-EKS</figcaption></figure><h3><strong>Benefits Of EKS</strong></h3><p>scale, reliability, and availability of the AWS platform, as well as integrations with AWS networking and security services, such as Application Load Balancers for load distribution, Identity Access Manager (IAM) for role-based access control</p><p>On the Top Top Of EKS, we Have Developed NextCloud and Use MySql as Database <strong>So What Is Next Cloud</strong>?</p><h3><strong>NextCloud</strong></h3><p>Nextcloud is a suite of client-server software for creating and using file hosting services. Nextcloud is free and open-source, which means that anyone is allowed to install and operate it on their own private server devices Nextcloud application functionally is similar to Dropbox, Office 365 or Google Drive, but can be used on home-local computers or for off-premises file storage hosting.</p><h3><strong>MYSQL</strong></h3><p><strong>MySQL</strong> is a relational database often used to store data for websites working in conjunction with PHP. Relational means that different tables of the database can be cross-referenced to one another. SQL stands for “Structured Query Language” which is the standard language used to interact with databases</p><h3><strong>Here We Goo…</strong></h3><p><strong>Prerequisite for this Deployment</strong></p><p><strong>1-aws cli</strong></p><p><strong>2-kubectl</strong></p><p><strong>3-eksctl</strong></p><p>First Of All We Will <strong>Create an IAM user</strong> to get access to AWS EKS through CommandLine</p><blockquote>Click on the ADD USER</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgze0zoWZnMt_04ODLOELg.jpeg" /><figcaption><a href="https://console.aws.amazon.com/iam">https://console.aws.amazon.com/iam</a></figcaption></figure><blockquote>Give<strong> User name</strong> , <strong>Programmatic Access </strong>so user will get <strong>access key and Secret Key</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApbPaCcM48dTABcMRAhszA.jpeg" /><figcaption><a href="https://console.aws.amazon.com/iam">https://console.aws.amazon.com/iam</a></figcaption></figure><blockquote>Click On <strong>Attach existing policies</strong> and Select <strong>AdministratorAccess </strong>then<strong> Next Tags</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*5kB3AsHtkh2d62ViybUjlQ.jpeg" /><figcaption><a href="https://console.aws.amazon.com/iam">https://console.aws.amazon.com/iam</a></figcaption></figure><blockquote>Add Tags If You Want otherwise go-ahead Then<strong> Next</strong> And <strong>Create User</strong></blockquote><blockquote>After Click On <strong>Create User, Download keys</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6nJghWthwZXr70AsoaVeA.jpeg" /><figcaption><a href="https://console.aws.amazon.com/iam">https://console.aws.amazon.com/iam</a></figcaption></figure><blockquote>Configure<strong> accesss Key &amp; Secret Keys</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*It8LU_qj_vEf5G4TXIXfBg.jpeg" /><figcaption>Windows CMD</figcaption></figure><p>Now The <strong>EKS Role Come in Play</strong></p><blockquote><strong>Before This Create SSH Public keys</strong></blockquote><p>First We will Create Cluster configuration File in YAML format</p><p>in this file, we have to select which type of instance we need and other things</p><p><strong>I suggest run all files in the end</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*L3yfew3LJX_QuYM6SmLAmQ.jpeg" /></figure><blockquote><strong><em>eksctl create cluster -f clusterconfig.yml </em></strong><em>#run this command to create cluster</em></blockquote><p>As soon you run this command you will see output something like this. then <strong>wait for the minimum. 20 mins</strong> then cluster will automatically create</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*0GsBC7EZm_lGhi1CmKa1Pg.jpeg" /></figure><p>after created you can see the cluster in AWS EKS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dof7DAIaIS2Fcpgnjp0XsA.jpeg" /><figcaption>console.aws.amazon.com</figcaption></figure><p>AWS EKS cluster behind the scene using EC2 as master &amp; slave Nodes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*-jeUtQ_ndFlwB2zT9Hxggg.jpeg" /><figcaption>console.aws.amazon.com</figcaption></figure><p>EKSCTL send a request to Cloudformation Behind the scene so it Also Creates Cloudformation Stack</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGzpb8KcvTGJemWbuh588Q.jpeg" /><figcaption>console.aws.amazon.com/cloudformation</figcaption></figure><h3>Manage Kubernetes From Your Local</h3><p>Our Kubernetes cluster is running on the cloud so we can send a command from anywhere in the world for this we only need Kubernetes configuration file to manage it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*hOUl6vLwKLJK3lWKLV6gWQ.jpeg" /></figure><blockquote><strong>aws eks update-kubeconfig — name productionEnv </strong>#run this command to setup Kubernetes configuration in your pc and dont forget to give your clustername</blockquote><p><strong>So Now Our Kubernetes is Fully working. </strong>we can check with<strong> Kubectl get pods </strong>Command</p><p><strong>EFS - Elastic File System</strong></p><p><strong>What is EFS</strong></p><p>Amazon Elastic File System (Amazon <strong>EFS</strong>) provides a simple, scalable, fully managed elastic NFS file system for use with <strong>AWS</strong> Cloud services and on-premises resources</p><p>We have to Create one centralized Storage So our all the nodes mount the data there</p><p>Go in EFS and then click on <strong>Create file system</strong></p><p>Select Your <strong>VPC, </strong>At the time of creating cluster it also creates its own virtual private network So we have to <strong>select that one </strong>and as soon as we select it auto-select all the connected node with VPC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1LiKx2UAWnFac9ST8hVVA.jpeg" /></figure><p>Then we have to Select the same security group. so they are can make connectivity with each other</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSUklChPdklidMXjKJ9t9A.jpeg" /></figure><p>Then Next, Next, Next and Create File System</p><p>After this, We Have To Install <strong>amazon-efs-utils </strong>in all<strong> three instances</strong>. With SSH so here we have to use that ssh key which we enter while configuring the cluster</p><blockquote><strong><em>sudo yum install amazon-efs-utils -y </em></strong><em>#run and install this in all the nodes</em></blockquote><h3>Now Start Our today’s Main deployment of NextCloud &amp; MySql</h3><p>First We have to create EFS Provisioner</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*TLHu4kZ6z4RxvbYXr60LRA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*Up29dBmAw1K3VbbD2lDllA.jpeg" /></figure><p>in this yml file, we have only given our <strong>efs id in Value</strong> and the<strong> server name of our efs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*PQaRqDLn756FwXJT7C6CXQ.jpeg" /></figure><p>it internally creates a deployment of EFS, to use the efs storage, we need to set the efs-provisioner</p><p>Now we create <strong>ClusterRoleBinding</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*iugr0FmnD0P0mDo1fuK7vA.jpeg" /></figure><p>To grant permissions across a whole cluster, we can <strong>use</strong> a <strong>ClusterRoleBinding</strong>. The following <strong>ClusterRoleBinding</strong> allows any user in the group “manager” to read secrets in any namespace</p><p>Now we create <strong>Storage Classes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*DtHZ15UlTczCZd3__4G-Xg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*O3mVfETi7oQ28wapNMajOA.jpeg" /></figure><p>this will Send PVC request to EFS and take the storage from there and create PVC for it so Now Our Pvc is created and it&#39;s connected with one centralized storage so now we can mount our pods data in it within one centralized location</p><p>Now we create <strong>deploy-mysql.yml</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*tAPd3xuehzqyFQNp-91BPw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*mXe66xP5bVn68c5MOVPneQ.jpeg" /></figure><p>MySql Store Our Data Which is generated by NextCloud and here we use a secret to hide data from other team members this is not used to secure data is just for hide this from human so they can&#39;t read and in secret, we store data in BASE64 encoding</p><p>Now we create <strong>deploy-nextcloud.yml</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*aJjvX7jOvCwAqJNsTM15_w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*LHhIEI3WQfH1sLeRTwA-Xw.jpeg" /></figure><p>in NextCloud it is just for safe our data in the private world so no one can access it in over the internet so we can achieve it with the nextcloud</p><p>After This RUN all these below commands in this sequence</p><p><strong>1-kubectl apply -f create-efs-provisioner.yaml</strong></p><p><strong>2-kubectl apply -f create-rbac.yaml</strong></p><p><strong>3-kubectl apply -f create-storage.yaml</strong></p><p><strong>4-kubectl apply -f secret.yml</strong></p><p><strong>5-kubectl apply -f deploy-mysql.yaml</strong></p><p><strong>6-kubectl apply -f deploy-nextcloud.yaml</strong></p><p>After Run All this The load balancer will automatically launch in the AWS and its provide Public DNS to Access Website with it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lLsfWWNvVpgKd7xtT6VBQ.jpeg" /></figure><p>NextCloud is deployed successfully on EKS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6GId8-7gzT4jbnoFleKGXw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7lhdgwCBE3JL-ZFJEyTYg.jpeg" /></figure><h3>NOW WE CAN DELETE THE CLUSTER</h3><blockquote><strong><em>eksctl delete cluster -f clusterconfig.yml</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mF7xelGvZyXCr-a02VSaJQ.jpeg" /></figure><p><a href="https://github.com/mjmanas0699/EKS-NEXTCLOUD-MYSQL">mjmanas0699/EKS-NEXTCLOUD-MYSQL</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae3d23e8c2ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/deploying-nextcloud-and-mysql-on-elastic-kubernetes-service-efs-ae3d23e8c2ff">Deploying Nextcloud and MySQL On Elastic Kubernetes Service &amp; Efs</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform Integration With Cloud Front & S3]]></title>
            <link>https://medium.com/@mjmanass0699/terraform-integration-with-cloud-front-s3-186aa90f4d20?source=rss-4f83f89c4b85------2</link>
            <guid isPermaLink="false">https://medium.com/p/186aa90f4d20</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Manas Jain]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 09:45:34 GMT</pubDate>
            <atom:updated>2020-06-22T09:45:34.878Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7FSHqH3IR8KX7Dl9IvrDw.jpeg" /></figure><h3>USE CASE</h3><p>Task 1 : Have to create/launch Application using Terraform</p><ol><li>Create the key and security group which allow the port 80.</li><li>Launch EC2 instance.</li><li>In this Ec2 instance use the key and security group which we have created in step 1.</li><li>Launch one Volume (EBS) and mount that volume into /var/www/html</li><li>Developer have uploded the code into github repo also the repo has some images.</li><li>Copy the github repo code into /var/www/html</li><li>Create S3 bucket, and copy/deploy the images from github repo into the s3 bucket and change the permission to public readable.<br>8 Create a Cloudfront using s3 bucket(which contains images) and use the Cloudfront URL to update in code in /var/www/html</li></ol><p>1-The Amazon Web Services (AWS) provider is used to interact with the many resources supported by AWS. The provider needs to be configured with the proper credentials before it can be used.</p><p>2-A <strong>security group</strong> acts as a virtual firewall for your instance to control incoming and outgoing traffic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFNfyWJ3TD67DUdjAPeyDw.png" /></figure><p>3-Amazon <strong>AWS</strong> uses <strong>key pair</strong> to encrypt and decrypt login information.</p><p>4-Amazon EBS volume is a durable, block-level storage device that you can attach to your instances.</p><p>5-Amazon Web Services, that allows users to rent virtual computers on which to run their own computer applications</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8xIxlod2nqJHM5WQ9D0P7w.png" /></figure><p>6-AWS allows you to create new <strong>EBS</strong> volumes and you can <strong>attach</strong> it to instances for extra storage. And for making Data Persistent</p><p>7-Amazon Simple Storage Service (Amazon <em>S3</em>) is an object storage service … to all of your objects at the <em>bucket</em> or the account level with <em>S3</em> Block Public Access</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szFsFKxNlkdeIUyv_AZ6ww.png" /></figure><p>8-An Origin Access Identity (<strong>OAI</strong>) is used for sharing private content via Cloud Front</p><p>9-<strong>bucket policy</strong> to a <strong>bucket</strong> to grant other AWS accounts or IAM users access permissions for the <strong>bucket</strong> and the objects in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5UJ2o_usubgWKk9xHNzEg.png" /></figure><p>10-<strong>Amazon CloudFront is a content delivery network (CDN) offered by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers which cache content, such as web videos or other bulky media, more locally to consumers, thus improving access speed for downloading the content</strong></p><p>I connect s3 to cloud front with the help of this user can no need to face much latency coz cloud front will automatically send this data to there edge location so website can load faster</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHM5KyaEYSoPigXRm1tyMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zsU35VzQs20QchnAg3qRA.png" /></figure><p>11-<em>Provisioners</em> are used to execute scripts on a local or remote machine as part of resource creation or destruction. <em>Provisioners</em> can be used to bootstrap a resource</p><p>Here I send this link to AWS instance so whenever someone try to come so the CloudFront URL will load and the server of this URL is near edge location</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSD0G5IZ-c_9-yIrVVefmQ.png" /></figure><h3>HERE SOME PROOFS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBhbPEtoGA_8b2jmetqCTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPa8pS-aBeQoeLpstal0RA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntvN0VHbyzYLxElp9OC_Rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjgPQFnOh4oAghf5UBWy1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uu1gJId8IbTdQYYkdhRK7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqAJRH4sjA-lj-PuClFmqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZUgasTsgNJm0OtKVTrKeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59dHmLcUmlN_L80ZhradoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dP6ECp4qpTkROtU7Wv_zEg.png" /></figure><h3>Thank You For Reading This hope You like it</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=186aa90f4d20" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>