<?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 Ranika Madurawe on Medium]]></title>
        <description><![CDATA[Stories by Ranika Madurawe on Medium]]></description>
        <link>https://medium.com/@ranikamadurawe?source=rss-856e9165d8c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PhVdET6c37EjcRFTvqaHOA.jpeg</url>
            <title>Stories by Ranika Madurawe on Medium</title>
            <link>https://medium.com/@ranikamadurawe?source=rss-856e9165d8c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 20:50:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranikamadurawe/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[Using Managed Identities within Azure App Services]]></title>
            <link>https://medium.com/@ranikamadurawe/using-managed-identities-within-azure-app-services-9c7932e1dd40?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c7932e1dd40</guid>
            <category><![CDATA[managed-identity]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[app-service]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Wed, 13 Oct 2021 14:52:06 GMT</pubDate>
            <atom:updated>2021-10-13T14:52:06.986Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S65cn04rbdV0Z-3b" /><figcaption>Photo by <a href="https://unsplash.com/@jdent?utm_source=medium&amp;utm_medium=referral">Jason Dent</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>App Services are a Platform as a Service (PaaS) solution that allows users to quickly deploy their web applications. But one of the main issues that developers face is in maintaining credentials that the Application needs to use for any operation within the application; Such as connecting to the Database, Accessing a storage account or key vault, or even pulling Docker Images if you intend on using App Services for Docker. Maintaining these credentials add complications for developers, As now maintaining these credentials and passing them to the App Service at runtime, credential rotation needs to be handled by the developer.</p><p>Azure provides a solution to these problems by allowing App Services to use Managed Identities.</p><h3>So what is a Managed Identity?</h3><p>Officially speaking a Managed Identity is a type of Service Principal. This leads to the question of “What is a Service Principal?”. Well to access resources under an Azure tenant an entity needs to be associated with an object which Azure refers to as a <strong><em>Security Principal. </em></strong>This Security principal is used to define the Roles and Access privileges the associated entity has, using Role Assignments. When it comes to ordinary users they are associated with a Security Principal type known as a <strong><em>User Principal. </em></strong>Applications on the other hand are associated with the type known as <strong><em>Service Principals</em></strong></p><p>So Service Principals are also in many forms. You can explicitly define an Service Principal using App Registrations which then can be used within your application (Kind of like a Service account). This way your application can this App Registration to access other Azure resources</p><p>Sometimes you may want an Azure resource to be able to access other resources. In this case you are going to be using a managed identity. It provides the azure resource with a service principal which can then be configured to access any other resource. So typically you would see this option in Azure Service which typically require to access other resources like,</p><ul><li>Virtual Machines</li><li>App Services</li><li>Function Apps</li><li>Logic Apps</li><li>Azure Container Instances</li><li>Azure K8S Services</li></ul><p>So in summary, you can think of a Managed Identity as a separate user that runs in your app/resource (Not exactly). Then you can use this “user’s” credentials within the application to carry out any operation with other Services.</p><h3><strong>Enabling and using Managed Identities in App Services</strong></h3><p>You can easily enable this within your App service, by navigating to the <strong><em>Identity </em></strong>blade within your app service and, enabling the option. It will create the managed identity to your App Service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x9GD7ZRNLmIKM01AeRfSng.png" /></figure><p>You can see that there are 2 options for Managed Identities, namely,</p><ol><li>System Assigned</li><li>User Assigned</li></ol><p>System Assigned Identities are created per resource and are directly associated only with that resource (App Service in our case). Their lifecycle is associated with that of it’s resource (i.e created and destroyed with the resource itself). On the other hand User Assigned Identities can be created before hand and assigned at anytime to the resource and can also be shared amongst many resources. This also implies that their lifecycle is independent of the resources that they wind up being associated with.</p><p>Each type has it’s own use case. For instance to run a single workload which needs to access some resource independently a System assigned Identity would be fine. Like an App Service to connect to a CosmosDB or key vault. If on the other hand a workload is shared amongst many resources (Like VMs) you may find a User Managed Identity easier to manage instead of many system assigned identities. In this article since we are running a simple web app a System assigned Identity will suffice.</p><p>To actually use this you have to then assign permissions to the created Identity by going to the actual resource and providing it with the required permissions. In this article I am going to be providing access to a key vault</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIBmWaUkHnqKvWqOpBEzkw.png" /></figure><p>What happens under the hood is that the App Service creates a few environment variables with the following names</p><pre>MSI_ENDPOINT=&quot;https://xxx.xxx.xxx.xxx:xxxxx/MSI/token/&quot;<br>MSI_SECRET=&quot;XXXXXXXXXXXXXXXXXXXXXXXXXXXX&quot;</pre><p>Azure provides libraries in .NET to use the mentioned variables to access generate tokens for accessing Azure resources. In this article I will explain how to use CURL to access various Azure resources from your App Service. When you want to make a call to an Azure Service you make a call to the <strong><em>MSI_ENDPOINT</em></strong> with your <strong><em>MSI_SECRET</em></strong> and the resource type you intend to access. You can use the following command to obtain an access token</p><pre>raw_access_token=$(curl -H &quot;X-IDENTITY-HEADER: ${MSI_SECRET}&quot; &quot;${MSI_ENDPOINT}?resource=${RESOURCE_TYPE}&amp;api-version=2019-08-01&quot; | jq &#39;.access_token&#39;)</pre><pre>access_token=$(echo &quot;${raw_access_token}&quot; | tr -d &#39;&quot;&#39;)</pre><pre># EXAMPLE</pre><pre>raw_access_token=$(curl -H &quot;X-IDENTITY-HEADER: XXXXXXXXXXXXXXXXXXXXXXXXXXXX&quot; &quot;https://xxx.xxx.xxx.xxx:xxxxx/MSI/token/?resource=https://vault.azure.net&amp;api-version=2019-08-01&quot; | jq &#39;.access_token&#39;)</pre><pre>access_token=$(echo &quot;${raw_access_token}&quot; | tr -d &#39;&quot;&#39;)</pre><p>Here the <strong>RESOURCE_TYPE</strong> is the Service token provider endpoint for the required resources type. In the example I have mentioned the endpoint to request tokens when trying to access Key Vaults. After filtering the required parameter with <em>jq</em> and cleaning up the response, we can use the <strong><em>access_token </em></strong>to access the Key vault.</p><pre>key_vault_uri=&quot;https://bakedpotato.vault.azure.net/&quot;</pre><pre>curl &quot;${key_vault_uri}secrets/MY-SECRET?api-version=2016-10-01&quot; -H &quot;Authorization: Bearer ${access_token}&quot; | jq &#39;.value&#39; | tr -d &#39;&quot;&#39;</pre><p>While this example covers only key vaults, you can connect to many other Azure resources within your application. Just make sure to provide your Managed identity with the required permissions to access whichever resource you need, and provide make sure to change the <strong><em>RESOURCE_TYPE</em></strong> to match that resource.</p><h3>Summary</h3><p>Managed Identities are an easy way to manage you application credentials within your app services, to reduce the hassle it brings in during the development process. Once enabled on your application you can easily use CURL, or some of the existing Libraries for Azure REST API.</p><h3><strong>Foot Note</strong></h3><p>When using App Services for Containers, the following variables are only available from the Platform that hosts the docker container and not in the container instance itself. To access the mentioned endpoints and secrets you will need to pass the environment variables to the container using the following command.</p><pre>eval $(printenv | sed -n &quot;s/^\([^=]\+\)=\(.*\)$/export \1=\2/p&quot; | sed &#39;s/&quot;/\\\&quot;/g&#39; | sed &#39;/=/s//=&quot;/&#39; | sed &#39;s/$/&quot;/&#39; &gt;&gt; /etc/profile)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c7932e1dd40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Prometheus Basic Data formats]]></title>
            <link>https://medium.com/@ranikamadurawe/understanding-prometheus-basic-data-formats-37766ae6ce6e?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/37766ae6ce6e</guid>
            <category><![CDATA[alerting]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 08:24:31 GMT</pubDate>
            <atom:updated>2021-08-09T08:24:31.388Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eM6BdVVpHQ2YDn3p" /><figcaption>Photo by <a href="https://unsplash.com/@chrisliverani?utm_source=medium&amp;utm_medium=referral">Chris Liverani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Prometheus is an Open source Metrics gathering and Alerting tool. It was developed and released by <em>SoundCloud</em> and has now become one of the most common Metrics gathering tools used in many Monitoring systems. In this Blog post we will be diving in briefly to the main Data types within Prometheus.</p><p>As of writing this blog post. There are 4 main data types within Prometheus. They are</p><ol><li>Counters</li><li>Gauges</li><li>Histograms</li><li>Summaries</li></ol><p>Each data type has it’s unique characteristics and is meant to be used for different purposes. But, before diving into what is different about each of the data types it is good to know how Prometheus is used by Developers so as to know why a Developer would need to know the differences between data types.</p><p>As I mentioned earlier, Prometheus is used for Metrics Collection. A developer will chose the Metrics they wish to gather from their application and then Integrate a Prometheus Client (on the application side) which will publish the required metric. The Prometheus Server is then Configured to call this Client and obtain the latest value of the Metric and will do so in regular Intervals (called the Scraping Interval) and store it within the Database. As data is scraped at regular intervals each data point gathered would represent a single data point in an ever growing time series. Based on the Metric the developer will have to chose a suitable data type for each use case, and based on that data type Prometheus will define how it is stored, how it can later be queried (For alerting and viewing) and so on. To do this a developer needs to know the differences between each data type.</p><p><strong>Counters</strong></p><p>Counters are not an unheard term within the programming world. And much like the use cases within other software, Counters are used to represent an continuously growing values in Prometheus. One should note that Counters should not be used when values are expected to reduce. This rule has one exception and that is for Resets or Restarts where the counter value can be reset back to 0. Using this data types provides better Insight where users can obtain derivatives and other such useful information. This makes it ideal to use with Metrics which one expect to continuously grow like The amount of time a link is clicked within a webpage, or The number of 4xx requests in a Server.</p><p><strong>Gauges</strong></p><p>If you looked at a counter and thought, “Well I need something which has increasing AND decreasing values”, well then you can look at Gauges. Gauges can have increasing and decreasing values. So it’s based used for things like CPU or Memory usage, Queue or Stack Size or CPU temperature even. Unlike Counters Gauge’s don’t provide a way to analyze the derivative but make up for it in providing the ability to use changing values. Using Gauges you can query the Maximum, Minimum and Average values of a certain metric within a time period. Naturally does concepts such as Minimums and maximums do not make sense in the case of Counters as values are ever increasing.</p><p><strong>Histograms</strong></p><p>Histograms are well Histograms. Instead of storing an exact value (which the server obtains from scraping). It will store it within a Histogram. The Developer provides the Buckets (or ranges of Values) that Prometheus should keep in mind. When it obtains the value of the Metric instead of storing the exact value it will look at the Buckets, and see which Bucket the value is supposed to fall into and Increase the number of times it has seen a value relevant to that Bucket by one. For example if the buckets are “<em>less than 1</em>” , “<em>less than 10</em>” and“<em>10-infinity</em>”, and Prometheus obtains a scraped value of 5, it will increase the number of occurrences within the “<em>less than 10 bucket”</em>. All buckets are also cumulative. As such if you add a value to a certain bucket, all subsequent buckets also receive the value. It is interesting to note that each Bucket within a Histogram represents a counter (You can’t unsee a value that has already been added to the values for each bucket are ever increasing). This makes it possible to find the rate of increasing of each bucket.</p><p>Histograms are ideal to observe the metric values of sources that are often independent of each other, so you can observe the variation of the Metric across all measured instances. Things like Response Latencies of Requests. Ideally you should have a brief understanding on the ranges that these values will fall into so you can define the buckets (However, Prometheus also provides default bucket values too). Naturally the Histogram does remove a certain precision. In the example you can see the value of 5 falls into the “<em>less than 10</em>” bucket, thus loosing some information, as it is impossible to gather that value of 5 by simply looking into the bucket. So it should not be used in cases where a precise value is required, and where an Approximation is sufficient.</p><p><strong>Summaries</strong></p><p>Finally we have Summaries. Summaries are quite similar to Histograms as Histograms were implemented on top of Summaries. The main differences between Summaries and Histograms is mainly in implementation details. Summaries calculate Percentiles on the Client while Histograms do this on the server. This makes it hard to use Summaries when aggregating a metric that can come from many sources. Histograms also require an upfront definition of ranges for calculation, but Summaries do not require as such. So it makes for a good alternative in such scenarios. Summaries can be used in many situations where a Histogram is used but it is often recommended to use Histograms as it supersedes Summaries. You should consider it if you do not have a clear idea of the ranges of the values that you intend to obtain.</p><p>So there you have it a Basic introduction to the 4 data types in Prometheus. Just to summarize, If you have to monitor a single value, which increases and want exact values use <em>Counters</em>, if it can increase or decrease use <em>Gauges. </em>If you want to measure the variation of a certain metric across many instances and don’t mind an approximation go with <em>Histograms</em>, If you are not sure of the range consider <em>Summaries</em>. Each data type has its own use case so make sure to consider what you exactly need and what metric can help accomplish that need before diving into the coding aspect. I hope you found this small blog post helpful. Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37766ae6ce6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elastic Stack: Elasticsearch and Kibana]]></title>
            <link>https://codeburst.io/elasticstack-elasticsearch-and-kibana-571f38230558?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/571f38230558</guid>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[kibana]]></category>
            <category><![CDATA[elastic-stack]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Sat, 12 Sep 2020 17:57:45 GMT</pubDate>
            <atom:updated>2020-10-26T20:57:15.361Z</atom:updated>
            <content:encoded><![CDATA[<h4>Continuing onward with configuring and using the next two products in the Elastic Stack; Elasticsearch and Kibana</h4><p>In my previous <a href="https://medium.com/@ranikamadurawe/elasticstack-filebeats-and-logstash-cab0e34d553c">article</a>, we discussed the initial steps of the ElasticStack pipeline, starting with Filebeat and Logstash. Now in this article, we are going to move on to the next step by continuing onward with integrating Elasticsearch and Kibana into the mix</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*m5aV3alm561AcxhgA6zvSg.png" /></figure><h3>Installing Elasticsearch and Kibana</h3><p>We should start by installing Elasticsearch and Kibana. Again, both of them require the JAVA SDK to work. If you came here from my previous article, you should have it installed already but if not it’s just two simple commands to install it.</p><p>Once you’re done with that it’s time to install Elasticsearch and Kibana. Again, we can do that by issuing the following commands:</p><pre>$ sudo apt install elasticsearch<br>$ sudo apt-get install kibana</pre><p>To get the Elasticsearch service up and running you have to start the service manually. That can be achieved by issuing the following commands:</p><pre>$ sudo systemctl daemon-reload<br>$ sudo systemctl enable elasticsearch.service</pre><p>Then you can start and stop the service by issuing the following commands:</p><pre>$ sudo systemctl start elasticsearch.service<br>$ sudo systemctl stop elasticsearch.service</pre><p>Similarly, we have to do this with the Kibana Service:</p><pre>// Enable service<br>$ sudo systemctl daemon-reload<br>$ sudo /bin/systemctl enable kibana.service</pre><pre>// Start and Stop<br>$ sudo systemctl start kibana.service<br>$ sudo systemctl stop kibana.service</pre><p>Elasticsearch and Kibana should now be installed on your computer.</p><h3>Making sure everything is working</h3><p>To see whether Elasticsearch is working, open your preferred browser and load http://localhost:9200. You should be greeted with the following result:</p><pre>{<br>  &quot;name&quot; : &quot;your-pc-name&quot;,<br>  &quot;cluster_name&quot; : &quot;elasticsearch&quot;,<br>  &quot;cluster_uuid&quot; : &quot;xxxxxxxxxxxxxxxxxxxxx&quot;,<br>  &quot;version&quot; : {<br>    &quot;number&quot; : &quot;7.7.0&quot;,<br>    &quot;build_flavor&quot; : &quot;default&quot;,<br>    &quot;build_type&quot; : &quot;deb&quot;,<br>    &quot;build_hash&quot; : &quot;xxxxxxxxxxxxxxxxxxxxxxxxxx&quot;,<br>    &quot;build_date&quot; : &quot;2020-05-12T02:01:37.602180Z&quot;,<br>    &quot;build_snapshot&quot; : false,<br>    &quot;lucene_version&quot; : &quot;8.5.1&quot;,<br>    &quot;minimum_wire_compatibility_version&quot; : &quot;6.8.0&quot;,<br>    &quot;minimum_index_compatibility_version&quot; : &quot;6.0.0-beta1&quot;<br>  },<br>  &quot;tagline&quot; : &quot;You Know, for Search&quot;<br>}</pre><p>Additionally, you can open up a terminal and execute a curl command to get the same output as follows:</p><pre>$ curl <a href="http://localhost:9200/">http://localhost:9200</a></pre><p>To test whether Kibana is working enter <a href="http://localhost:5601/">http://localhost:5601</a> to the URL and view your output you should be redirected to the Kibana DashBoard as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4x7Gfz0FsmnZpx3F4XiL2g.png" /></figure><h3>Configuring Elasticsearch and Kibana</h3><p>Now that both of them are up and running, we can look into the configuration files for both Elasticsearch and Kibana. As we were doing with Logstash and Filebeat, we should first stop the respective services before doing anything to the configuration files.</p><p>The Elasticsearch configuration file is usually located in the etc/elasticsearch folder under the elasticsearch.yml file. Many of the properties and their functions are described within this file as comments. Two properties are likely to be uncommented and in use, however. The path.data and path.log files refer to where Elasticsearch stores its data and log files. You can customize these locations if you wish to do so. Additionally, you can bind the service to an IP and port of your choosing by uncommenting network.host and http.port if the default port of 9200 is already in use.</p><p>The Kibana configuration file can also be found similarly at etc/kibana/kibana.yml. Most features are described under the comments here as well, but the most significant properties will be left uncommented. Including the host , port and elasticsearch.host. The final property describes the Elasticsearch hosts that Kibana should use to gather data from, and should be changed to the appropriate host and port if you changed these properties when editing the Elasticsearch configuration file. Additionally, you can add certain security features such as basic authentication as well as SSL verification for remote logins.</p><h3>Creating Elasticsearch Indices and Searching with Kibana</h3><p>Before we connect everything together, I will start off by creating a simple index and add some dummy data to our ElasticSearch index so we can observe it using Kibana. Let’s start by creating an ElasticSearch Index. We can do this in two ways. We can do this by issuing curl commands in the terminal, or by issuing commands in the Kibana console. When using the terminal we issue the following command to create an index named “sample-index”:</p><pre>curl -X PUT &quot;localhost:9200/sample-index&quot;</pre><p>We can skip the complexity of adding curl commands and specifying the Elasticsearch hostname continuously by using the Kibana Console. The same action above can be simplified to work in the Kibana console as follows:</p><pre>PUT /sample-index</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qt0Ql9_rzbvjyUc4GswPag.png" /></figure><p>For the simplicity of the article, from this point onward I will use the Kibana console commands. Of course, you can expand them to the terminal version if you chose to do so.</p><p>Now that we have the index created we will start by seeing whether the index we created exists. We can do that easily by issuing:</p><pre>GET /_cat/indices</pre><pre>### OUTPUT<br>yellow open sample-index                          xxxxxxxxxxxxxxxxxxxxxx 1 1    0    0    208b    208b</pre><p>The output will list all indices along with some details of the index. Starting from the left they are <em>health </em>(which describes the health of the index), <em>status </em>(which describes whether the index can be used or not), the <em>index</em> (which is the name we provided), <em>uuid </em>(which acts as an identifier), <em>pri (</em>which describes the number of primary shards used by the index and which, by default, scales up to 5), <em>rep </em>(which describes the number of replicas of the index, like backups), <em>docs.count </em>(which describes the number of documents within the index), <em>docs.deleted </em>(which describes the number of documents deleted due to actual deletion or deleted through an update to the document), <em>store.size </em>(which describes the storage used for storing the documents including replicas), and <em>pri.store.size </em>(which<em> </em>is the size of the primary shard not considering any replicas).</p><p>Now that the index is created we can add a document by issuing the following commands:</p><pre>PUT /sample-index/_doc/1 <br>{<br>  &quot;stringfield&quot; : &quot;default&quot;,<br>  &quot;numberfield&quot; : 1,<br>  &quot;arrayfield&quot;: [1,2,3]<br>}</pre><pre>POST /sample-index/_doc <br>{<br>  &quot;stringfield&quot; : &quot;default&quot;,<br>  &quot;numberfield&quot; : 1,<br>  &quot;arrayfield&quot;: [1,2,3]<br>}</pre><p>The former command allows us to specify a <em>document id</em> when adding the document the latter creates a randomly generated document. We can see that the document has been added by viewing the index details again:</p><pre>GET /_cat/indices</pre><pre>### OUTPUT<br>yellow open sample-index                          xxxxxxxxxxxxxxxxxxxxxx 1 1    2    0     4kb     4kb<br>###</pre><pre>GET /sample-index/_search<br>{<br>    &quot;query&quot;: {<br>        &quot;match_all&quot;: {}<br>    }<br>}</pre><pre>### OUTPUT</pre><pre>{<br>  &quot;took&quot; : 585,<br>  &quot;timed_out&quot; : false,<br>  &quot;_shards&quot; : {<br>    &quot;total&quot; : 1,<br>    &quot;successful&quot; : 1,<br>    &quot;skipped&quot; : 0,<br>    &quot;failed&quot; : 0<br>  },<br>  &quot;hits&quot; : {<br>    &quot;total&quot; : {<br>      &quot;value&quot; : 4,<br>      &quot;relation&quot; : &quot;eq&quot;<br>    },<br>    &quot;max_score&quot; : 1.0,<br>    &quot;hits&quot; : [<br>      {<br>        &quot;_index&quot; : &quot;sample-index&quot;,<br>        &quot;_type&quot; : &quot;_doc&quot;,<br>        &quot;_id&quot; : &quot;1&quot;,<br>        &quot;_score&quot; : 1.0,<br>        &quot;_source&quot; : {<br>          &quot;stringfield&quot; : &quot;default&quot;,<br>          &quot;numberfield&quot; : 1,<br>          &quot;arrayfield&quot; : [<br>            1,<br>            2,<br>            3<br>          ]<br>        }<br>      },<br>      {<br>        &quot;_index&quot; : &quot;sample-index&quot;,<br>        &quot;_type&quot; : &quot;_doc&quot;,<br>        &quot;_id&quot; : &quot;xxxxxxxxxxxxxxxxxxxxxx&quot;,<br>        &quot;_score&quot; : 1.0,<br>        &quot;_source&quot; : {<br>          &quot;stringfield&quot; : &quot;default2&quot;,<br>          &quot;numberfield&quot; : 10,<br>          &quot;arrayfield&quot; : [<br>            10,<br>            20,<br>            30<br>          ]<br>        }<br>      }<br>    ]<br>  }<br>}<br>###</pre><pre>GET /sample-index/</pre><pre>### OUTPUT<br>{<br>  &quot;sample-index&quot; : {<br>    &quot;aliases&quot; : { },<br>    &quot;mappings&quot; : {<br>      &quot;properties&quot; : {<br>        &quot;arrayfield&quot; : {<br>          &quot;type&quot; : &quot;long&quot;<br>        },<br>        &quot;numberfield&quot; : {<br>          &quot;type&quot; : &quot;long&quot;<br>        },<br>        &quot;stringfield&quot; : {<br>          &quot;type&quot; : &quot;text&quot;,<br>          &quot;fields&quot; : {<br>            &quot;keyword&quot; : {<br>              &quot;type&quot; : &quot;keyword&quot;,<br>              &quot;ignore_above&quot; : 256<br>            }<br>          }<br>        }<br>      }<br>    },<br>    &quot;settings&quot; : {<br>      &quot;index&quot; : {<br>        &quot;creation_date&quot; : &quot;1599908898974&quot;,<br>        &quot;number_of_shards&quot; : &quot;1&quot;,<br>        &quot;number_of_replicas&quot; : &quot;1&quot;,<br>        &quot;uuid&quot; : &quot;xxxxxxxxxxxxxxxxxxxxxx&quot;,<br>        &quot;version&quot; : {<br>          &quot;created&quot; : &quot;7070099&quot;<br>        },<br>        &quot;provided_name&quot; : &quot;sample-index&quot;<br>      }<br>    }<br>  }<br>}<br>###</pre><p>As you can see, two documents have been created. The document where the ID has been specified has that specified id while the other document has a random id. The final command shows us that Elasticsearch has learned the variable types for all the data we have inserted which can be seen in the <em>mappings</em> section</p><p>You can also update or delete using similar commands:</p><pre>POST /sample-index/_update/1<br>{<br>  &quot;stringfield&quot; : &quot;default3&quot;,<br>  &quot;numberfield&quot; : 100,<br>  &quot;arrayfield&quot;: [100,200,300]<br>}</pre><pre>DELETE /sample-index/_doc/1</pre><p>Knowing the above-mentioned commands provides us with the basic tools on how to make an Elasticsearch Index. I won’t dive into too much more detail (such as making your own analyzers and tokenizers) as that dives more into the search engine capabilities of Elasticsearch. Perhaps I’ll save this for another day. With that being said, we should start looking into building a simple Kibana Dashboard.</p><p>First, you need to identify your index pattern with Kibana so that you can use Kibana’s functionalities to view and create dashboards. To do that all you must do is is click the index-pattern section in the Kibana Homepage that we visited earlier at localhost:5601 . Then click the “+create index pattern” button. Here you will see all the indices available within the ElasticSearch host (or hosts). You can then create an Index pattern to select one or multiple indices on the Kibana Dashboard. Since we have only one, we will type in “sample-index” to filter out or index. You can provide a pattern to select as many indices as you wish. Providing “*” as the index pattern will consider all indices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jm2v5q8dAot--usmnp1B8g.png" /></figure><p>Then proceed to create that index pattern by continuing forward through the screens. Then you will be greeted by a screen showing all the fields the index-pattern has as well as their type and properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sq2OwF8FR1Iw6RcIevxUzw.png" /></figure><p>Here the <em>Searchable </em>property defines whether the field is, well, searchable. Or, to put it simply, to figure out whether we can create queries to filter out documents based on the field in question. The <em>Aggregatable </em>property defines whether the field can be aggregated into specific buckets. You may notice that there are two properties called “stringfield” as well. Though we defined only one. The second has a <em>.keyword</em> suffix added to it as well if you notice. This has to do with how Elasticsearch stores strings for faster search queries. I won’t dive into how that works for now (perhaps I will do so during an article on how to make a Search Engine).</p><p>Now, since the index-pattern has been added, we should create a simple dashboard. We will start by creating a Search Object for our index pattern. On the toolbar to the left there will be a compass at the very top. Clicking on it will take you to the visualization page. Here we can search through all the documents (regardless of the index) that are within the Elasticsearch instance. But let’s change that to the sample-index we just created. We can see that because there is a “*” symbol denoted below the search bar. This is the index-pattern used and, as I mentioned above, this index pattern implies that all indices are being used to search for results. Clicking on it will allow us to change the index pattern. We will change it into the index-pattern we made above so we can search only within our created index.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGrVzNUNgWCgcmwWG5eyQg.png" /></figure><p>Now we can save this search by clicking the “save” option. Give it an appropriate name. Additionally, you can add a few clauses to search bar to filter out some more documents if you want to.</p><p>With the “Search object” created we can go back to the homepage and visit the dashboard page. Here we can create a new dashboard to see the results we want. Since we had that Search Object created, we will click on creating a dashboard with the “add an existing object” option and selecting the search object we just made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBpdiwp0KdcOb3cAvuaU-w.png" /></figure><p>The natural question now is why do we create this? After all, the visualize page gave us pretty much the same thing. Well, the answer to that is that the visualization page only allows us to view searches one at a time. As we get more and more indices, and more and more search queries to filter out documents, typing in and out search queries and changing index patterns becomes tiresome. So the dashboard comes in handy as a one-stop pitstop for all your analytics.</p><h3>Next Steps</h3><p>I hope this article has provided you with a basic introduction on how to work with Elasticsearch and Kibana. Again, for the purpose of this series of working with the ElasticStack, I did not dive into too many details of how to query and create indices within Elasticsearch. Rather I focused on providing a brief overview to get started with these two tools. In the next article, we will continue onward from here and integrate everything together. Until then, happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=571f38230558" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/elasticstack-elasticsearch-and-kibana-571f38230558">Elastic Stack: Elasticsearch and Kibana</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elastic Stack: Filebeat and Logstash]]></title>
            <link>https://codeburst.io/elasticstack-filebeats-and-logstash-cab0e34d553c?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cab0e34d553c</guid>
            <category><![CDATA[filebeat]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[logstash]]></category>
            <category><![CDATA[elastic-stack]]></category>
            <category><![CDATA[kibana]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Fri, 07 Aug 2020 11:31:01 GMT</pubDate>
            <atom:updated>2020-10-15T18:58:54.075Z</atom:updated>
            <content:encoded><![CDATA[<h4>An Introduction on configuring and how to use the first two products of the Elastic Stack</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*m-rpabzyFKLLEvZ9.png" /><figcaption>The first half of the pipeline</figcaption></figure><p>In the last article, I gave you a brief introduction to Elastic Stack. Now we are going to dive into implementing the Elastic Stack. So let’s start at the beginning with Filebeat and Logstash</p><h3>Installing Filebeat and Logstash</h3><p>Before we begin we need to ensure we have a proper Java JDK installed. So if you already have the Java JDK. First, we need to find out the JDK version required. As of writing this article the latest version of Logstash is v7.8 which works with OpenJDK v1.8. You can check your required Java JDK version for your version of Logstash by referring to the dependency matrix mentioned <a href="https://www.elastic.co/support/matrix#matrix_jvm">here</a>. If you already have a compatible JDK version installed feel free to skip this part of the tutorial. For those of you who do not have the JDK version installed, you can install it with a few commands. As I’m working on a Linux Distro so I can install it using an <strong>apt-get </strong>command as follows</p><pre>$ sudo apt-get update<br>$ sudo apt-get install openjdk-8-jdk</pre><p>After you have installed it issue the following command</p><pre>$ java -version</pre><p>You should get the following output</p><pre>openjdk version &quot;1.8.0_242&quot;<br>OpenJDK Runtime Environment (build 1.8.0_242-b09)<br>OpenJDK 64-Bit Server VM (build 25.242-b09, mixed mode)</pre><p>Now since that’s done we can start installing Filebeat and Logstash. The <strong>apt-get</strong> command comes to the rescue again as all we have to do is to run a few commands</p><pre>$ sudo apt-get install logstash<br>$ sudo apt-get install filebeat</pre><p>Now both Logstash and Filebeat should be installed on your computer</p><h3>Making sure everything is working</h3><p>First, let’s check whether our Logstash is running</p><pre>$ sudo systemctl status logstash</pre><pre>logstash.service - logstash<br>   Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset<br>   Active: inactive (dead)</pre><p>Seems like it’s inactive we can fix that by starting the service up</p><pre>$ sudo systemctl enable logstash<br>$ sudo systemctl start logstash<br>$ sudo systemctl status logstash</pre><pre>● logstash.service - logstash<br>   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset:<br>   Active: active (running) since Fri 2020-07-24 21:34:50 +0530; 4s ago<br> Main PID: 26392 (java)<br>    Tasks: 17 (limit: 4491)<br>   CGroup: /system.slice/logstash.service<br>           └─26392 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSIn</pre><p>Now Logstash is running. Let’s move onto Filebeat. You can issue a similar command to startup Filebeat</p><pre>$ sudo systemctl start filebeat<br>$ sudo systemctl status filebeat</pre><pre>Filebeat.service - Filebeat sends log files to Logstash or directly to Elastic<br>   Loaded: loaded (/lib/systemd/system/filebeat.service; disabled; vendor preset<br>   Active: active (running) since Fri 2020-07-24 21:41:07 +0530; 22s ago<br>     Docs: <a href="https://www.elastic.co/products/beats/filebeat">https://www.elastic.co/products/beats/filebeat</a><br> Main PID: 27548 (filebeat)<br>    Tasks: 13 (limit: 4491)<br>   CGroup: /system.slice/filebeat.service<br>           └─27548 /usr/share/filebeat/bin/filebeat -environment systemd -c /etc</pre><h3>Configuring Logstash and Filebeat</h3><p>Now that both of them are up and running let’s look into how to configure the two to start extracting logs. First, let’s stop the processes by issuing the following commands</p><pre>$ sudo systemctl stop filebeat<br>$ sudo systemctl stop logstash</pre><p>We will start with Filebeat</p><p>The Filebeat configuration file is located <strong>/etc/filebeat/filebeat.yml</strong>. It may change according to your OS and how you chose to install Filebeat if you can’t find it in this directory refer to the guide for your own OS/ Installation method. Once you find it open it up. This file would contain all the configurations for our file beats process. So let’s look into it first.</p><p>The sample YAML file describes most things in detail. But I’ll dive into some of the more important ones for the purpose of this tutorial</p><pre>filebeat.inputs:</pre><pre>- type: log<br>  paths:<br>  - /var/log/number.log<br>  enabled: true</pre><p>So first we see the <strong><em>filebeat.inputs</em></strong> each input corresponds to an input location to extract data from. So we can mention the <strong><em>type </em></strong>of data to be extracted, the <strong><em>path </em></strong>of the files to extract data from, any additional <strong><em>fields</em></strong> that we like to add to the data extracted, any files to <strong><em>exclude,</em></strong> and most importantly the<strong><em> enabled </em></strong>field which describes whether we wish to use that input when we start our Filebeat instance. Moving on the next significant part would be the <strong><em>output</em></strong> section</p><pre>output.logstash:<br>  hosts: [&quot;localhost:5044&quot;]</pre><p>Here we can mention where to send our data, most of the popularly used output paths would be written in by default. These include Elasticsearch, Logstash, and Kibana, but they would be disabled by default with # signs. You can enable any output location, multiple even as per your requirement.</p><p>That mainly covers the Filebeat Aspect of it. So now let’s move onto Logstash. Like Elasticsearch it has a few YAML files to be changed. There are 2 main files to consider one in <strong>/etc/logstash/logstash.yml</strong> and the other <strong>etc/logstash/pipelines.yml</strong>. The location of these files again may change based on how you installed Logstash and your OS. The former contains settings of the Logstash process which for now we will leave unaltered, the 2nd which is more important contains the location of where we should write our Logstash Pipelines</p><pre>/etc/logstash/pipelines.yml</pre><pre>- pipeline.id: main<br>  path.config: &quot;/etc/logstash/conf.d/*.conf&quot;</pre><p>As you can see we need to write our pipelines into the <strong>/etc/logstash/conf.d/ </strong>directory. The *.conf explains that Logstash would look for all files ending with <strong>.conf</strong> (i.e. with the .conf file extension) to start up the pipelines.</p><h3>Creating a Filebeat Logstash pipeline to extract log data</h3><p>So with most of the configuration details out of the way we should start a very simple example. First, we need a process that creates logs. So let’s make a simple application that can write simple logs to a location. I chose python to make my simple application quickly, but the choice is up to you ultimately.</p><pre>#log_gen.py</pre><pre>import time<br>import random<br>import datetime</pre><pre>def rand_nums():<br>    while True:<br>        # code things<br>        r = random.randint(0,10000)<br>        f = open(&#39;/var/logs/number.log&#39;, &#39;a&#39;)<br>        if r &lt; 10 :<br>            ts = time.time()<br>            st = datetime.datetime.fromtimestamp(ts).strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)<br>            f.write(&quot;[ERROR] I fell asleep at time {timestamp}\n&quot;.format(timestamp=st))<br>        else :<br>            ts = time.time()<br>            st = datetime.datetime.fromtimestamp(ts).strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)<br>            f.write(&quot;[LOG] I guessed {rn} at time {timestamp}\n&quot;.format(rn=random.randint(0,10000),timestamp=st))<br>        f.close()<br>        time.sleep(10)</pre><pre>rand_nums()</pre><p>It’s not much but enough for this tutorial. It simply runs a never-ending process of adding a few log lines to a file number.log. It generates a few random numbers and a timestamp for when it was generated. Using a random number we generate a few Error lines as well. You can run it by using the following command</p><pre>python random_log_gen.py</pre><p>So let’s stop the process for now and move on.</p><p>Now, we need a way to extract the data from the log file we generate. This is where Filebeat will come in. So, Let’s edit our <strong>filebeat.yml </strong>file to extract data and output it to our Logstash instance</p><pre>filebeat.inputs:</pre><pre>- type: log<br>  paths:<br>  - /var/log/number.log<br>  enabled: true</pre><pre>output.logstash:<br>  hosts: [&quot;localhost:5044&quot;]</pre><p>And that’s it for Filebeat. Now let’s make our Logstash pipeline. As we saw in the <strong>pipeline.yml,</strong> pipelines are read from the <strong>/etc/logstash/conf.d/ </strong>directory so let’s go there and create a pipeline</p><pre>#python.conf</pre><pre>input {<br>  beats {<br>    port =&gt; 5044<br>  }<br>}</pre><pre>filter {</pre><pre>}</pre><pre>output {<br>  file {<br>   path =&gt; &quot;/var/log/pipeline.log&quot;<br> }<br>}</pre><p>So we can see three parts <strong><em>input, filter, </em></strong>and <strong><em>output.</em></strong> The input section describes just that, our input for the Logstash pipeline. So our input would be the Filebeat Process which we have configured to output data to port 5044 of the localhost. So we use that as the input. The filter section contains the logic for filtering and processing the input we get. For now, we will skip the filtering section so we can remove that part. Finally, the output section will describe our output but as we haven’t set up Elasticsearch yet, for now, we can use the Logstash “file” plugin which will simply output the data it receives to a file mentioned under the <strong>path</strong></p><p>And that completes the pipeline generation. We should now be ready to run our process.</p><p>So first let’s start our Filebeat and Logstash Process by issuing the following commands</p><pre>$ sudo systemctl start filebeat<br>$ sudo systemctl start logstash</pre><p>If all went well we should see the two processes running healthily in by checking the status of our processes. Let’s listen in on the <strong>pipeline.log </strong>file that the Logstash pipeline will create. On a terminal execute the command.</p><pre>sudo tail -f /var/log/pipeline.log</pre><p>This will listen to the changes made in the pipeline.log file. Since we haven’t written anything to our <strong>number.log</strong> file, there shouldn’t be anything in this file. After all, Filebeat has no logs to send, so no logs will be seen by Logstash. So, let’s start our sample python program. Start the python program on a different terminal</p><pre>python random_log_gen.py</pre><p>Now every 10 seconds a new log file should be generated in the terminal listening on the pipeline.log file. Meaning the pipeline works!</p><h3>Next Steps</h3><p>So that’s the first half of the Elastic Stack Pipeline so that leaves Elasticsearch and Kibana left. In the next part, we’ll look into how to set that half up and create a simple Elasticsearch Pipeline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cab0e34d553c" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/elasticstack-filebeats-and-logstash-cab0e34d553c">Elastic Stack: Filebeat and Logstash</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elastic Stack: An Introduction]]></title>
            <link>https://medium.com/@ranikamadurawe/an-introduction-to-elasticstack-246244f32e50?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/246244f32e50</guid>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[filebeat]]></category>
            <category><![CDATA[kibana]]></category>
            <category><![CDATA[elastic-stack]]></category>
            <category><![CDATA[logstash]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Fri, 24 Jul 2020 14:01:12 GMT</pubDate>
            <atom:updated>2020-09-15T07:42:33.060Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Intro to a multipart series of using and configuring Elastic Stack</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jgbcJU9jBeFhDLS6" /><figcaption>Photo by <a href="https://unsplash.com/@ditakesphotos?utm_source=medium&amp;utm_medium=referral">Diana Parkhouse</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So before we get into the grit of it all we need to start with an introduction to the Elastic Stack. But even before that, we need to start off with its predecessor the ELK stack</p><p>The ELK stack is an open-source project consisting of 3 Open Source Products, a winning combination of products that allows users to extract, parse, collect, view and Manage Logs in a convenient and efficient manner. The 3 technologies are …</p><ol><li>Elasticsearch:- A search and storage Engine</li><li>Logstash:- Data extraction on parsing pipeline</li><li>Kibana:- Data viewing and Management Dashboard</li></ol><p>So what happens is simple. You would use <strong>Logstash</strong> to point at the files, extract the data and parse it sends that data to an <strong>Elasticsearch</strong> cluster and then view it using <strong>Kibana</strong> Dashboard. Just don’t let the order confuse you ( ELK does allow me to put a better thumbnail than LEK I guess ? )</p><p>So how does this differ from Elastic Stack? Well, Logstash was a bit heavyweight being able to extract, parse and send Data in it’s streamed pipeline. So they swapped it to run parallelly with more a lightweight single-purpose Beats process (Filebeat for Log File tailing, MetricBeat for metrics data and so on) Additionally you could use different processes and stream data it to different (or the same) Logstash instances and extract data from multiple sources to the same instance. Which provides much more flexibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oiVFwzBrg6S4sl-Z.png" /><figcaption>Source: <a href="https://communities.bmc.com/community/bmcdn/bmc_remedy_ar_system/blog/2018/07/31/using-the-elastic-stack-with-remedy-logs-part-1">https://communities.bmc.com/community/bmcdn/bmc_remedy_ar_system/blog/2018/07/31/using-the-elastic-stack-with-remedy-logs-part-1</a></figcaption></figure><p>Elastic Stack is quite popular because of the flexibility of its pipeline. With so many companies and industries going into the cloud with microservice architectures, a complex pipeline to extract data from your services is crucial. And that is where Elastic Stack comes in. Paired with cloud orchestration systems like Kubernetes, Elastic Stack is a very handy tool for extracting data.</p><h3>Next Steps</h3><p>So of course, we won’t be starting with the Kubernetes right away. But slowly dive into it by starting with the basics and diving deeper into its complexities.</p><p>So first let’s start with a Simple Example. Which I will dive into in this series of articles. But first, we need to configure the Elastic Stack first. So in the next tutorial, I will start with configuring the Elastic Stack. Starting with Logstash and Filebeat</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=246244f32e50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration / Continuous Delivery : An Introduction]]></title>
            <link>https://medium.com/@ranikamadurawe/continuous-integration-continuous-delivery-an-introduction-c7d40dfe9e06?source=rss-856e9165d8c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7d40dfe9e06</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[continous-deployment]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Ranika Madurawe]]></dc:creator>
            <pubDate>Thu, 19 Dec 2019 09:06:22 GMT</pubDate>
            <atom:updated>2020-09-15T07:38:43.255Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Integration / Continuous Delivery : An Introduction</h3><h4>A brief introduction to CI and CD and how it can help you as a Software Engineer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RfsPZkbaaIrSs92_Dsh3w.png" /><figcaption><a href="https://edge.siriuscom.com/_wss/clients/509/assets/503/CI-CD-graphic.PNG">Source : https://edge.siriuscom.com/_wss/clients/509/assets/503/CI-CD-graphic.PNG</a></figcaption></figure><blockquote>With the ever changing development Software Practices and the industry continuously demanding for increased performance &amp; Collaborative Coding from it’s software engineers, Two concepts have arisen to provide a Solution two aid Engineers to maintain that requirement.</blockquote><p>Those being Continuous Integration and Development. Chances are you have heard about these concepts in the more abbreviated form CI/CD. In this article, we will dive into a basic introduction of the two concepts.</p><h3>Continuous Integration</h3><p>Before I start off on CI, I should first say what Integration is. Chances are as a Developer unless you are on a solo project or freelancing you are probably working with a team. Each developer working on a specific feature of the product pushing his or her code to a central repository. Everybody’s code is fine and functional and then comes the dreaded day to merge or integrate all the code and suddenly all the builds that were working individually start failing and you hear everyone saying “It works on my Machine”. These issues often take days to fix and can drastically affect the speed of the development cycle.</p><p>This is where CI comes in. This concept is where a developer merges their code to the products main branch often as possible. The changes done by a developer are tested using an automated process that creates a build using the code and running automated tests against the new build.</p><p>Of course, for this to work you must provide automated tests to be checked for each time a commit is pushed as well as there should exist a CI server ( Jenkins, Travis CI ) which monitors the Repository and run these automated tests. However, This concept provides useful feedback to the developer as if their code breaks the build they are notified immediately. The load of testing is also removed from the developer and tests can run quickly on the server. But most importantly it drastically reduces the time taken to integrate all the code.</p><figure><img alt="source :- https://devopscube.com/java-continuos-integration-jenkins-beginners-guide/" src="https://cdn-images-1.medium.com/max/726/0*h7ZuHQ7jTKAZdh89.png" /></figure><h3>Continuous Delivery</h3><p>Continuous Delivery in just one step above CI. While CI makes sure that the process of integrating different codes to your product goes smoothly by automation CD automates the delivery of your product to customers by releasing changes to your customers if they pass all the tests during the CI process. This can be configured to happen monthly, weekly, daily. Creating builds which can then used for user testing.</p><p>Ideally, you should do this as often as possible as providing the build to customers so that each deliverable contains a small change in features. This makes it much easier to troubleshoot errors during the user testing phase as each deliverable only contains a small change in code. However, in the end, it all depends on the policies of your team.</p><p>Above Continuous Delivery, there is also Continuous Deployment. Not to be confused with Continuous Delivery, Continuous Deployment differs only the fact that each build is provided to the customer as soon as it passes all tests. With no developer having to configure the time it need be released.</p><p>To add CD to your development cycle nothing much else is required. So long as you have a strong CI base and a flagging system to ensure that incomplete features don’t make their way into customer builds you are good to go. CD makes the feedback loop of customers faster giving developers better information when implementing their code. It also helps in accelerating the development cycle by reducing the time spent on deciding which features should be in which build.</p><h3>Advantages of adding CI/CD</h3><p>So with a brief understanding of CI/CD in mind, We might be asking what does it provide for me. Well as I mentioned CI/CD decreases the time to deployment by a significant amount, this means speeding up the process of developing new features and fixing bugs which all in all means happier customers. Additionally CI/CD increases team transparency and coordination by removing the hassle of Integration and Testing which reduces the likelihood of errors down the line. This ripples down to better resource management and reduced costs. So it’s good in both a business perspective and a consumer perspective.</p><h3>Summary</h3><p>I hope that this gives you a basic understanding of what CI/CD is. Using Continous Integration and Contionous deployment can vastly change way you develop and deploy your products. I hope this short article gives you the basic idea of what CI/CD does and how it can help you in your next project. Until next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7d40dfe9e06" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>