<?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 Deshani Geethika Poddenige on Medium]]></title>
        <description><![CDATA[Stories by Deshani Geethika Poddenige on Medium]]></description>
        <link>https://medium.com/@deshanigeethika?source=rss-ff4c45548f6a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ia34PvKOMublg6vbzRdOPw.jpeg</url>
            <title>Stories by Deshani Geethika Poddenige on Medium</title>
            <link>https://medium.com/@deshanigeethika?source=rss-ff4c45548f6a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:51:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deshanigeethika/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[Getting Started with Apache Spark]]></title>
            <link>https://deshanigeethika.medium.com/getting-started-with-apache-spark-dd5389e4c150?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd5389e4c150</guid>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Thu, 02 May 2019 11:31:40 GMT</pubDate>
            <atom:updated>2019-05-03T11:25:17.874Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>According to Wikipedia definition:</p><blockquote>Apache Spark is an open-source distributed general-purpose cluster-computing framework.</blockquote><ul><li>Open-source cluster-computing framework</li><li>Can perform real-time data processing and batch processing</li><li>Originally developed at the University of California, Berkeley&#39;s AMPLab and later donated to Apache Software Foundation</li><li>High-level APIs in Java, Scala, R, Python</li></ul><h4>Hadoop MapReduce Limitations</h4><ol><li>Not suitable in real-time processing — As MapReduce is only capable of batch processing, it takes minutes to execute.</li><li>Not suitable for trivial operations — For operations such as Filter, Join, it requires to rewrite the jobs, and it is too complex with MapReduce Framework as it has to follow the key-value pattern in reducer and mapper code.</li><li>Doesn’t work well when the large number of data on the network — It works on the data locality principle hence, works well on the node where the data resides. But when lots of data in the network, it takes a lot of time to copy the data, which may cause bandwidth issues.</li><li>Not suitable for OLTP (Online Transaction Processing) — Since OLTP requires short transactions with the latency of seconds or milliseconds, MapReduce can’t provide that amount of latency with the batch processing.</li><li>Unfit for iterative execution — Because of the state-less nature, it will run from the start in every iteration. For example, K-Means need iterative computation</li></ol><h4>Spark over MapReduce</h4><ol><li>Suitable for real-time processing, trivial operations, and processing larger data on the network, OLTP, graphs, iterative execution</li><li>Compared with two-stage disk-based MapReduce, Spark provides up to 100 times faster performance for a few applications with in-memory primitives</li><li>Because of the faster performance, it is suitable for machine learning algorithms, as it allows programs to load data into the memory of a cluster and feed the data constantly.</li></ol><h3>Apache Spark Eco-system</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/0*8z6yeBaX5J_AgP3i.jpg" /><figcaption><a href="https://d2h0cx97tjks2p.cloudfront.net/blogs/wp-content/uploads/sites/2/2017/07/apache-spark-ecosystem-components.jpg">https://d2h0cx97tjks2p.cloudfront.net/blogs/wp-content/uploads/sites/2/2017/07/apache-spark-ecosystem-components.jpg</a></figcaption></figure><h4>Spark Core API</h4><p>The foundation of the entire Spark project. It provides basic I/O functionality, distributed task dispatching, and scheduling.</p><h3>RDD (Resilient Distributed Dataset) in Spark</h3><p>RDD is the fundamental data structure of spark. It is an immutable distributed collection of objects in different types (eg: Python, Scala, Java, R). This collection of data is partitioned across machines logically. RDDs can be generated by applying transformations (eg: reduce, join, filter, map) for existing RDDs or referencing external datasets. RDDs are used to achieve faster map-reduce operations, compared with MapReduce.</p><h4>MapReduce slow data sharing</h4><p>When iterative and interactive applications require faster data sharing across parallel jobs, MapReduce can’t provide it due to replication, serialization and disk io.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd5389e4c150" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Know it all on Regression in ML]]></title>
            <link>https://medium.com/sysco-labs/know-it-all-on-regression-in-ml-393d210c92bc?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/393d210c92bc</guid>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Tue, 02 Apr 2019 03:01:31 GMT</pubDate>
            <atom:updated>2019-04-02T03:01:31.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>Where Comes Regression in ML?</h3><p>Following chart describes the main categorization of ML</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*It8QPnb4XwrIihg6.png" /><figcaption>Types of Machine Learning [1]</figcaption></figure><p>According to that, regression comes under supervised learning. If you are completely new to ML, supervised learning is simply where a labeled dataset is provided for the model in the training phase. In contrast to that, unsupervised learning is where a labeled dataset is not provided. Providing labeled dataset in the sense, the model is aware which class(s) to be predicted (in classification problem) or which kind of values to be predicted (in regression problem). On the other hand, in the unsupervised approach, the model will decide which clusters to be predicted by itself. So, simply saying, regression is a technique used in predicting real numerical values. Reinforcement learning is another main type of machine learning, where it continuously learn unlike in other approaches, using reward systems.</p><p>In this article, we focus on different kind of regression techniques under separate sections.</p><h3>Linear Regression</h3><p>The simplest form of regression. There are the independent variable(s) (x) and the dependent variable (y). The dependent variable is the one that is predicted. Here the following assumptions are made.</p><ul><li>As the name denotes, independent variables are independent of each other.</li><li>Independent variables are linearly-correlated to the dependent variable</li></ul><p>If there is only one independent variable, it is known as a simple linear regression. In that case, y = m*x equation is formed resulting in a line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cKsCuXxSyM7VvGHG.png" /><figcaption>Simple Linear Regression [2]</figcaption></figure><p>When multiple independent variables have come into the problem, it is known as a multiple linear regression problem, which results in a hyperplane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xv3hLR53aJtnoJbh.png" /><figcaption>Multiple Linear Regression resulting in a hyperplane [3]</figcaption></figure><p>In linear regression, what the model does is, finding coefficients of the equation. For example consider the equation: y = b0 + b1*x1 + b2*x2 + b3*x3. Here the model will predict the values for b0, b1, b2, b3.</p><h4>Pros</h4><ul><li>Easy to use​</li><li>Useful when the relationship to be modeled is not extremely complex and smaller datasets</li></ul><h4>Cons</h4><ul><li>Not suitable for non-linear or complex relationships​</li><li>Not suitable for huge data sets​</li></ul><h3>Polynomial Regression</h3><p>Here the model assumes that the independent variables are polynomially correlated to the dependent variable. Some example polynomials are sin, cos, quadratic, etc. Here the main problem is the need for understanding the correlation of data beforehand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/0*FWi9Z5xi-G3bC0wo" /><figcaption>Polynomial Regression [4]</figcaption></figure><h4>Pros</h4><ul><li>Can model non-linear relationships</li></ul><h4>Cons</h4><ul><li>The relationship between features and output variable should be known beforehand</li></ul><h3>Random Forest (Regression Trees)</h3><p>Random forest is a forest (set of trees) of multiple decision trees. Random Forest is used in both classification and regression problems. Each decision tree in the forest represents a random subset of features from the original feature set. So, each data point is going through each decision tree and predict a value for the output. The final result is considered as the average of all the results from trees. (In Random Forest Classifier, each decision tree predicts a class and from a majority vote, the class is decided). Because of this reason, overfitting is unlikely to happen in random forests. Those who don’t know about decision trees and overfitting, I have described it after the pros and cons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/0*tiCiemNwODZiDOH4.png" /><figcaption>Random Forest Regression[5]</figcaption></figure><h4>Pros</h4><ul><li>Suitable to capture complex non-linear relationships</li><li>Not overfitting</li></ul><h4>Cons</h4><ul><li>Larger forest may require larger memory</li></ul><h4>Decision Trees</h4><p>Decision trees are used in both classification and regression problems. In classification problems, the decision tree predicts a class, and in regression problem, it predicts a real value. Simply stating a decision tree is a tree, with a set of nodes connected as a tree, wherein each node is responsible for taking a decision. Based on the decision at each node, the final outcome may change.</p><figure><img alt="Image result for decision tree" src="https://cdn-images-1.medium.com/proxy/0*Yclq0kqMAwCQcIV_.jpg" /><figcaption>Decision Tree [6]</figcaption></figure><h4>Overfitting</h4><p>Overfitting is a consequence that happened when the model is trying to capture the behavior of each and every data point in the training sample. This results in a complex model, which cannot capture the behavior of an unseen data point. In decision trees, this is highly likely to happen if the number of nodes is high. That means the model is taking more decisions to describe the dataset. In Random Forest, since a subset of features is taken into consideration at each tree, it is highly unlikely of overfitting.</p><h3>References</h3><p>[1] <a href="https://i.pinimg.com/originals/22/97/e1/2297e1d26b8f78d35eaacdf5803650d9.jpg">https://i.pinimg.com/originals/22/97/e1/2297e1d26b8f78d35eaacdf5803650d9.jpg</a></p><p>[2] <a href="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Linear_regression.svg/1200px-Linear_regression.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Linear_regression.svg/1200px-Linear_regression.svg.png</a></p><p>[3] <a href="http://marcelojo.org/marcelojoeng/wp-content/uploads/2017/10/multi_result_plan2.png">http://marcelojo.org/marcelojoeng/wp-content/uploads/2017/10/multi_result_plan2.png</a></p><p>[4] <a href="https://lh3.googleusercontent.com/mrLRYhDGQY-mPoJ6A-uqfVP2nByTYS4G98kGX1duhVERE_EY85Bb6YBtL5CWi2KpJK1SoLZfLMGAldFSrJz_Rg38knAVz8PqLfKA8SGnmV2ftRUQz3cfZE9c6DJ7g5TX2h3iFDHMcw=w2400">https://lh3.googleusercontent.com/mrLRYhDGQY-mPoJ6A-uqfVP2nByTYS4G98kGX1duhVERE_EY85Bb6YBtL5CWi2KpJK1SoLZfLMGAldFSrJz_Rg38knAVz8PqLfKA8SGnmV2ftRUQz3cfZE9c6DJ7g5TX2h3iFDHMcw=w2400</a></p><p>[5] <a href="https://dsc-spidal.github.io/harp/img/4-5-1.png">https://dsc-spidal.github.io/harp/img/4-5-1.png</a></p><p>[6] <a href="https://cdn-images-1.medium.com/max/1200/0*Yclq0kqMAwCQcIV_.jpg">https://cdn-images-1.medium.com/max/1200/0*Yclq0kqMAwCQcIV_.jpg</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=393d210c92bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sysco-labs/know-it-all-on-regression-in-ml-393d210c92bc">Know it all on Regression in ML</a> was originally published in <a href="https://medium.com/sysco-labs">Sysco LABS Sri Lanka</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Cheat Sheet]]></title>
            <link>https://deshanigeethika.medium.com/docker-cheat-sheet-63a434ba02c2?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/63a434ba02c2</guid>
            <category><![CDATA[cheet-sheets]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Sun, 30 Sep 2018 06:26:12 GMT</pubDate>
            <atom:updated>2018-09-30T06:26:12.347Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Create an image from Dockerfile</li><li>Push docker image to Docker Hub</li><li>Pull docker image</li><li>See all the docker images</li><li>See all the docker images including intermediate images</li><li>Run a docker image</li><li>Remove an image</li><li>Remove all the images at once</li><li>See all the containers</li><li>See running containers</li><li>Inspect a running container (See the details such as IPAddress)</li><li>Start a container</li><li>Stop a running container</li><li>Stop all the running containers at once</li><li>Remove a container</li><li>Stop all the running containers at once</li><li>Bash into a running container</li></ol><h4>1. Create an image from Dockerfile</h4><pre>docker build . -t IMAGE_NAME</pre><h4>2. Push docker image to Docker Hub</h4><pre>docker tag IMAGE_ID MY_DOCKER_ID/IMAGE_NAME<br>Eg: docker tag 7916deb8689c tony/static_scanner</pre><pre>docker push MY_DOCKER_ID/IMAGE_NAME<br>Eg: docker push tony/static_scanner</pre><h4>3. Pull docker image</h4><pre>docker pull IMAGE_NAME</pre><h4>4. See all the docker images</h4><pre>docker images</pre><h4>5. See all the docker images including intermediate images</h4><pre>docker images -a</pre><p>When an image is built from a Dockerfile, intermediate layers are created. These intermediate layers increase re-usability, decrease disk usage, and speed up docker build by allowing each step to be cached. When we run docker images -a , we can see all the intermediate images with intermediate layers. These images are shown as &lt;none&gt;:&lt;none&gt; images.</p><h4>6. Run a docker image</h4><pre>docker run IMAGE_NAME</pre><p>You don’t have to pull and run an image. Instead, you can use docker run command, and it will pull the image if it is not founded in the local machine, and run.</p><h4>7. Remove an image</h4><pre>docker rmi IMAGE_NAME</pre><h4>8. Remove all the images at once</h4><pre>docker rmi $(docker images -aq)</pre><p>When removing an image, you might find an error response like &quot;Error response from daemon: conflict: unable to delete 12c3b9873b07 (must be forced) -image is referenced in multiple repositories” In such a case, --force or -f flag should be used. Therefore, the final command for removing an image would look like as follows</p><pre>docker rmi -f IMAGE_NAME</pre><h4>9. See all the containers</h4><pre>docker ps -a</pre><h4>10. See running containers</h4><pre>docker ps</pre><h4>11. Inspect a running container (See the details such as IPAddress)</h4><pre>docker inspect CONTAINER_ID/ CONTAINER_NAME</pre><h4>12. Start a container</h4><pre>docker start CONTAINER_ID/ CONTAINER_NAME</pre><h4>13. Stop a running container</h4><pre>docker stop CONTAINER_ID/ CONTAINER_NAME</pre><h4>14. Stop all the running containers at once</h4><pre>docker stop $(docker ps -aq)</pre><h4>15. Remove a container</h4><pre>docker rm CONTAINER_ID/ CONTAINER_NAME</pre><p>You have to stop a running container before it is removed</p><h4>16. Remove all the containers at once</h4><pre>docker rm $(docker ps -aq)</pre><h4>17. Bash into a running container</h4><pre>docker exec -it CONTAINER_ID/ CONTAINER_NAME bash</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63a434ba02c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[GSoC 2018] Apache Allura — Personal Dashboard]]></title>
            <link>https://deshanigeethika.medium.com/gsoc-2018-apache-allura-personal-dashboard-631b4bc23ec5?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/631b4bc23ec5</guid>
            <category><![CDATA[apache-allura]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Thu, 02 Aug 2018 13:13:02 GMT</pubDate>
            <atom:updated>2018-08-10T17:33:26.082Z</atom:updated>
            <content:encoded><![CDATA[<h3>Project Summary</h3><p>A nice improvement to Allura project/code hosting would be a personal dashboard when a user is logged in. It would provide quick access to the projects that the user is part of, tickets that created by the user, tickets assigned to the user, pull requests of the user, activity stream of people that the user follows, etc.</p><h3>List of Commits (Merged)</h3><h4><strong>[#8202] Personal Dashboard — Creating basics of Dashboard (Creating file structure, defining routes and loading sections to main UI)</strong></h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/26bae5618c4d311f21c178dd9e2397da13d765bd">26bae5</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/030a6881fcce2aa604bd57cad0770327ee166492">030a68</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/c269f4a1f0c7243b4dd02d8c116d1aa48d31f7cf">c269f4</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/3de45d2d20f5b393b13ef11812554d8757e02848">3de45d</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/6ed41089aa04136e332e562c9e16c48afb14d5d5">6ed410</a>]</li></ul><h4><strong>[#8205] Personal Dashboard — Test dashboard basics</strong></h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/2114a6cda790ab982aca9db92d908fadfef76208">2114a6</a>]</li></ul><h4><strong>[#8206] Personal Dashboard — Add helper method to load sections in Dashboard and Profile</strong></h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/26fad5e4c7d3fbd4ee9031a764bc40d38f50a749">26fad5</a>]</li></ul><h4>[#8207] Personal Dashboard — Add parent class for ProfileSectionBase and DashboardSectionBase</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/f7aa0e065c50427f4bb9b4e11b5d9bad13439b6d">f7aa0e</a>]</li></ul><h4>[#8208] Personal Dashboard — Create Projects section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/93eaaa279cd361e6ea2c1d58e32302eb806febb5">93eaaa</a>]</li></ul><h4>[#8209] Personal Dashboard — Create Tickets section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/19429487ea2f0ee21200e9ba65de80f0676595ce">194294</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/1fe9f02e22bf8cf9c90e4fce6a3d52ec75428998">1fe9f0</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/1d155ce858e01dad01a0ac23f1e13ce49e92d5dd">1d155c</a>]</li></ul><h4>[#8215] Personal Dashboard — Create Merge Requests Section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/1e8a47e0ca2cf300bd2849504a00d0027adbd789">1e8a47</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/762f9938dbfbb07c483b46c5ca7bbf3866adbd0e">762f99</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/a1181f25f0f982af095393dacd6ba4ca8852225b">a1181f</a>]</li></ul><h4>[#8216] Personal Dashboard — Create Followers Section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/ce15220f18bc4c4eee30a04d5d6c6c469d5005ef">ce1522</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/0d602084c2c80ad099de4c046b3e2ca9b39c5b5e">0d6020</a>]</li></ul><h4>[#8218] Personal Dashboard — Test Dashboard sections</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/50d318d1e1cfbd3e52baec8fb292bf9271312e9e">50d318</a>]</li></ul><h4>[#8219] Personal Dashboard — Test Tickets section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/a7ddd0c0bbcfe89cb14fc5214deff168cbb20477">a7ddd0</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/3548605b7609ce97c6091f84b15c22c9450be3a0">354860</a>]</li><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/986bab083cfbea117fbc8fe803e6c21b6b7df019">986bab</a>]</li></ul><h4>[#8220] Personal Dashboard — Create Tests for Merge Requests Section</h4><ul><li>[<a href="https://forge-allura.apache.org/p/allura/git/ci/1267d9c51c5b1883f57c6dcbb92573ee3ee341ac">1267d9</a>]</li></ul><h3>TODOs</h3><ul><li>Add docstrings</li><li>Add styles sheets</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=631b4bc23ec5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Apache Allura in Ubuntu]]></title>
            <link>https://deshanigeethika.medium.com/in-progress-setting-up-apache-allura-in-ubuntu-1fa166406448?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fa166406448</guid>
            <category><![CDATA[apache-allura]]></category>
            <category><![CDATA[software-forge]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[apache]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 04:29:11 GMT</pubDate>
            <atom:updated>2018-03-25T05:33:27.609Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*cEvT5476l-3GZai0ZYRujg.png" /><figcaption><a href="https://www.linkedin.com/pulse/apache-allura-releases-v140-new-customization-madison-moore/">https://www.linkedin.com/pulse/apache-allura-releases-v140-new-customization-madison-moore/</a></figcaption></figure><p>Apache Allura is a new kind of extensible forge, with a new set of highly integrated forge tools.</p><h4>What is a software forge?</h4><p>Forge is a collaborative web platform, which is used to develop and share software applications.</p><p>Apache Allura is an open-source software forge, which has following features, providing best experience to its users.</p><ul><li><a href="https://forge-allura.apache.org/p/allura/wiki/Features/#issue-tracking">Issue Tracking</a></li><li><a href="https://forge-allura.apache.org/p/allura/wiki/Features/#threaded-discussion-forums">Threaded Discussion Forums</a></li><li><a href="https://forge-allura.apache.org/p/allura/wiki/Features/#code-repository">Code Repository</a></li><li><a href="https://forge-allura.apache.org/p/allura/wiki/Features/#documentation">Documentation</a></li></ul><p>Here is a step-by-step guide for a beginner to install Apache Allura. Let’s get started.</p><p><strong><em>Note:</em></strong><em> My operating system is Ubuntu 16.04. But following commands are also applicable to other Ubuntu versions as well.</em></p><h3>Installing VirtualBox</h3><p>You may probably wonder why we need to install VirtualBox. The reason is, it is easy for us to isolate the environment, as platform issues can be occurred. But keep in mind that you can skip this step and install Allura directly into your local machine.</p><p>If you haven’t install VirtualBox yet, use the following command to install</p><pre>sudo apt install virtualbox</pre><p>If you use other platform, use <a href="https://www.virtualbox.org/wiki/Downloads">this link</a> to download and install VirtualBox</p><h4>Create Ubuntu Virtual Machine</h4><p>Download a minimal <a href="https://help.ubuntu.com/community/Installation/MinimalCD">Ubuntu 16.04 64-bit ISO</a></p><p>Start VirtualBox and create a new virtual machine. You can give any name as you wish and choose Linux as the “Type” and Ubuntu (64-bit) as the “version”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*nuT5d36sp7uOtM0UVZ1MoQ.png" /><figcaption>Create new virtual machine</figcaption></figure><p>Next you can define the memory space as you wish. I have defined it as 1024.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*15-9X8KyG4u1xWgYVDNKpw.png" /><figcaption>Defining memory size</figcaption></figure><p>Then leave the next windows as it is. Finally you can see the created virtual machine as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*y0KfhlUqXgZHXOp0gMGxpw.png" /><figcaption>Newly created virtual machine</figcaption></figure><p>Then go to the settings of the virtual machine. In “Storage” section, select the “Empty” as depicted below. In right hand side, you can see that an optical drive can be browsed. Select Optical Drive type as “IDE Secondary Master” and browse for the minimal ISO downloaded before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*3uHV_vcdwPxTTWAVCFVsXQ.png" /><figcaption>Before selecting the Optical Drive</figcaption></figure><p>After selecting the minimal ISO, you can view it as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*pSckCAamJwscuW7cRvjrHg.png" /><figcaption>After selecting the Optical Drive</figcaption></figure><p>Then start the virtual machine and install Ubuntu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*XTSBlOIOAXxRrXAlk8WMZQ.png" /><figcaption>Initial window to install Ubuntu</figcaption></figure><p>You can follow a tutorial to install Ubuntu. Once you have finished the installation process, shut down the virtual machine and remove the ISO file from the “Storage” section before restarting the virtual machine.</p><p>Also, we need to access to the Internet within the VM. Therefore, goto the settings of the VM-&gt; select “Network” section-&gt; select “Bridged Adapter” and select the name of the connection from the list as depicted below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*uT0oBNBJlqBBt10LJT5kZQ.png" /><figcaption>Change the network adapter options</figcaption></figure><p>Then after starting the VM, you can see the login window. Provide the user name and password to login to the machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6g9RuE5livCT1JgfIwWxVQ.png" /><figcaption>Ubuntu login window</figcaption></figure><h3>Installing System Packages</h3><p>The following system packages should be installed into the virtual machine</p><pre>~$ sudo apt-get install git-core python2.7-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev libffi-dev</pre><h4>Install MongoDB</h4><p>You can follow <a href="https://www.howtoforge.com/tutorial/install-mongodb-on-ubuntu-16.04/">this</a> tutorial to install MongoDB, if you haven’t installed yet.</p><h4>[optional] For SVN support</h4><pre>~$ sudo apt-get install subversion python-svn</pre><h3>Setting up Virtual Python Environment</h3><p>Before installing Allura, we need to set up virtual Python environment using “virtualenv”</p><h4>What is “virtualenv”?</h4><p>It is used to create isolated python environments</p><h4>Why we need isolated python environments?</h4><p>When you installing packages to /usr/lib/python2.7/site-packages location, you may require different kind of versions of the same package. If you install all the versions, there is a chance to upgrade an existing lower version to a higher version. To avoid such conflicts, we need to setup isolated python environment, so that we can keep the required packages only</p><h4>Install virtualenv</h4><p>First of all, you need to install Python package manager (python-pip)</p><pre>~$ sudo apt-get install python-pip</pre><p>Then use the following command to install virtualenv</p><pre>~$ sudo pip install virtualenv</pre><h4>Create new virtual environment</h4><p>Now you have successfully installed virtualenv. Let’s create a virtual environment called “env-allura” (You can use any name you wish)</p><pre>~$ virtualenv env-allura</pre><h4>Activate the virtual environment</h4><p>Now you have successfully created the virtual environment and you have to activate it using the following command</p><pre>~$ . env-allura/bin/activate</pre><p>Then you can observe the activated python environment as below</p><pre>(env-allura)~$</pre><h3>Creating the Log Directory</h3><pre>(env-allura)~$ sudo mkdir -p /var/log/allura</pre><p>Give permission to log folder</p><pre>(env-allura)~$ sudo chown $(whoami) /var/log/allura</pre><p>Replace $(whoami) with the user name eg: $(whoami) -&gt; deshani</p><h3>Installing the Allura Code and Dependencies</h3><p>First of all create a directory called “src”</p><pre>(env-allura)~$ mkdir src</pre><p>Clone the Allura code from git repository. Note that we are cloning to /src/allura directory</p><pre>(env-allura)~$ mkdir src</pre><pre>(env-allura)~/src$ git clone https://git-wip-us.apache.org/repos/asf/allura.git allura</pre><h4>Installing dependencies</h4><p>reqirements.txt file is used to install the required dependencies</p><pre>(env-allura)~/src$ cd allura</pre><pre>(env-allura)~/src/allura$ pip install -r requirements.txt</pre><h4>[optional] For SVN support: symlink the system pysvn package into our virtual environment</h4><pre>(env-allura)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/env-allura/lib/python2.7/site-packages/</pre><h4>Setup Allura Tools</h4><p>Run the following command to setup all the Allura tools</p><pre>(env-allura)~/src/allura$ ./rebuild-all.bash</pre><h3>Initializing the Environment</h3><p>Allura requires several components to be started to get full functionality</p><h4>Starting SOLR Search and indexing server</h4><blockquote><em>SOLR</em> is the popular, blazing-fast, open source enterprise <em>search</em> platform built on Apache <em>Lucene</em></blockquote><p>Run following commands to start SOLR service</p><pre>(env-allura)~$ cd tmp</pre><pre>(env-allura)/tmp$ sudo apt-get install default-jre-headless unzip</pre><pre>(env-allura)/tmp$ wget -nv <a href="http://archive.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz">http://archive.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz</a></pre><pre>(env-allura)/tmp$ tar xvf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2</pre><pre>(env-allura)/tmp$ sudo ./install_solr_service.sh solr-5.3.1.tgz</pre><pre><br>(env-allura)/tmp$ cd ~/src/allura</pre><pre>(env-allura)~/src/allura$ sudo -H -u solr bash -c &#39;cp -R solr_config/allura/ /var/solr/data/&#39;</pre><pre>(env-allura)~/src/allura$ sudo service solr start</pre><h4>Creating code repo directories</h4><p>The default configuration (as mentioned in development.ini) uses /srv directory to store repositories. Therefore, we need to create separate directories as git, hg and svn. Then give permission to access these directories</p><pre>~$ sudo mkdir /srv/{git,svn,hg}</pre><pre>~$ sudo chown $USER /srv/{git,svn,hg}</pre><pre>~$ sudo chmod 775 /srv/{git,svn,hg}</pre><h4>Allura task processing</h4><p>Allura uses a background task service called “taskd” to do async tasks like sending emails, and indexing data into solr, etc. Let’s get it running</p><pre>(env-allura)~$ cd ~/src/allura/Allura</pre><pre>(env-allura)~/src/allura/Allura$ nohup paster taskd development.ini &gt; /var/log/allura/taskd.log 2&gt;&amp;1 &amp;</pre><h4>Installing node packages</h4><p>Use the following commands to install NodeJS</p><pre>(env-allura)~$ curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash -</pre><pre>(env-allura)~$ sudo apt-get install nodejs</pre><p>To complete the installation, install and build npm as below</p><pre>(env-allura)~$ npm install</pre><pre>(env-allura)~$ npm run build</pre><h4>Initializing Allura database</h4><p>For development setup, use following command</p><pre>(env-allura)~/src/allura/Allura$ paster setup-app development.ini</pre><p>For production setup, use the following command</p><pre>(env-allura)~/src/allura/Allura$ ALLURA_TEST_DATA=False paster setup-app development.ini</pre><h3>Starting the Application Server</h3><p>Congratz!! now you are ready to go! use the following command to start the application server</p><pre>(env-allura)~/src/allura/Allura$ gunicorn --reload --paste development.ini  # add --daemon to run in the background</pre><p>Now you can access to the server fro <a href="http://0.0.0.0:8080/">http://0.0.0.0:8080</a></p><h3>References</h3><p><a href="https://forge-allura.apache.org/docs/getting_started/install_each_step.html#solr-search-and-indexing-server">Step-by-Step Installation - Allura documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fa166406448" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerizing OWASP Dependency Check Security Tool]]></title>
            <link>https://deshanigeethika.medium.com/containerizing-owasp-dependency-check-security-tool-e282d6d237d4?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e282d6d237d4</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[owasp-dependency-check]]></category>
            <category><![CDATA[maven]]></category>
            <category><![CDATA[owasp]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 06:50:42 GMT</pubDate>
            <atom:updated>2017-12-02T13:31:00.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_QjuQqVy5TeUw_61_wNL1A.jpeg" /></figure><h3>Introduction</h3><p>OWASP Dependency-Check is a utility that identifies project <strong>dependencies</strong> and <strong>checks</strong> if there are any known, publicly disclosed, vulnerabilities. It can be run using Dependency Check CLI, or can be integrated to the pom.xml file as a maven plugin, or else there is a specific Maven command to run Dependency Check (DC). Here, a containerized Dependency Check security scanner is created, so that a user only has to give the zip file or the GitHub URL of a project source code. Then the container scans the source code and provides access to a generated report through an API.</p><p><strong><em>Note:</em></strong><em> This container is designed to be managed by Automation Manager API. Therefore, the “user” of this container will be Automation Manager API</em></p><h3>Docker Image</h3><p>The containerized Dependency Check scanner exposes a micro service API to the outside applications. Scan can be initiated by calling the API providing GitHub URL or zip file of the project source code. Therefore, the dependencies required by the Docker image can be identified as below.</p><ol><li>Base image should be Ubuntu as some Linux commands are required to be executed</li><li>The jar file of the micro service (this jar file is executed to start the micro service) is taken from a GitHub repository. Therefore git clone operation should be done, hence Git should be installed to the image</li><li>In order to execute the jar file, Maven is required. Therefore, JDK and Maven should be installed to the image</li><li>Maven is downloaded as wget, therefore wget is required</li><li>JDK is downloaded as an archive file, therefore unzip is required</li></ol><p>Let’s get into more details</p><p><strong>Dockerfile of Dependency Check Scanner has following specifications</strong></p><ul><li>Base Image: Ubuntu 16.04</li><li>Install wget, git, unzip</li><li>Download and install Apache Maven 3.3.9</li><li>Download Java: jdk 1.8 by accepting license, install and configure symbolic links for java and javac executables</li><li>Clone Micro Service App — Static Scanner — DC jar file from GitHub</li><li>Change work directory to the cloned repository</li><li>Define container startup command as to execute the jar file</li></ul><p><strong>By building the Dockerfile, docker image with following features is created</strong></p><ul><li>Ubuntu 16.04 environment, with wget, git, unzip, Java, Maven installed</li><li>Consist with Micro Service App — Static Scanner — DC jar file, cloned from GitHub</li></ul><p><strong>By running the docker image with port mapping, a docker container with following features can be created</strong></p><ul><li>When container starts up, Micro Service App — Static Scanner — DC jar file is executed and hosted in a predefined port. (Also the port can be manually set at the run time of the container)</li><li>Micro Service App — Static Scanner — DC is a micro service application. Therefore, HTTP requests can be sent to extract a zip file or clone project source from Github and run Dependency Check</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*IV3lm-1n6Z0qnOXy." /></figure><h3>Dependency Check Micro Service</h3><p>When a container starts up, this micro service is also started, providing an API to be called to run Dependency Check scan.</p><h3>Initiating a Scan</h3><p>Automation Manager uploads a zip file of the project source code or gives GitHub URL of the project source code. (If a specific branch or tag to be cloned, user has to give the URL of the specific branch or tag).</p><ol><li>Validate the request.</li><li>If the project source code is given as a zip file, it is uploaded to the container and extract the zip file.</li><li>If the GitHub URL of the project source code is given, it is cloned. If a specific branch or tag to be cloned, the specific URL for the branch or tag needs to be given. Also if a private repository, username and password should be given.</li><li>Build the source code using Maven command -“mvn org.owasp:dependency-check-maven:check” to run Dependency Check.</li><li>So that, after successfully completed the build, scan reports are generated.</li><li>When scanning a project with multiple pom.xml files (projects with separate modules), several reports with the same name are generated inside several target directories. Therefore, all the reports are renamed and moved to a new folder.</li><li>After completing each task, a notification is sent back to Automation Manager. (eg: file uploaded, file extracted, cloned etc.) Therefore after the report is ready, a notification is sent to Automation Manager.</li><li>This micro service provides an API to get the generated report. Hence Automation Manager can call the API and get the report.</li></ol><h3>Activity Diagram of Dependency Check Micro Service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/0*1IkDnlTG_Gl49Cht." /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e282d6d237d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerizing Find Security Bugs Security Tool]]></title>
            <link>https://deshanigeethika.medium.com/containerizing-find-security-bugs-security-tool-74ec93c3ef7a?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/74ec93c3ef7a</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[maven]]></category>
            <category><![CDATA[find-security-bugs]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 06:31:12 GMT</pubDate>
            <atom:updated>2017-12-02T13:19:47.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M63ucQJR8A58yWuE8eF7sw.jpeg" /></figure><h3>Introduction</h3><p>FindSecBugs is used for static code analysis. It can be integrated as an IDE plugin, or its maven plugin can be added to the pom.xml file of a project source code. Here, a containerized FindSecBugs security scanner is created, so that a user only has to give the zip file or the GitHub URL of a project source code. Then the container scans the source code and provides access to a generated report through an API.</p><p><strong><em>Note:</em></strong><em> This container is designed to be managed by Automation Manager API. Therefore, the “user” of this container will be Automation Manager API</em></p><h3>Docker Image</h3><p>The containerized FindSecBugs scanner exposes a micro service API to the outside applications. Scan can be initiated by calling the API providing GitHub URL or zip file of the project source code. Therefore, the dependencies required by the Docker image can be identified as below.</p><ol><li>Base image should be Ubuntu as some Linux commands are required to be executed</li><li>The jar file of the micro service (this jar file is executed to start the micro service) is taken from a GitHub repository. Therefore git clone operation should be done, hence Git should be installed to the image</li><li>In order to execute the jar file, Maven is required. Therefore, JDK and Maven should be installed to the image</li><li>Maven is downloaded as wget, therefore wget is required</li><li>JDK is downloaded as an archive file, therefore unzip is required</li></ol><p>Let’s get into more details</p><p><strong>Dockerfile of Static Scanner has following specifications</strong></p><ul><li>Base Image: Ubuntu 16.04</li><li>Install wget, git, unzip</li><li>Download and install Apache Maven 3.3.9</li><li>Download Java: jdk 1.8 by accepting license, install and configure symbolic links for java and javac executables</li><li>Clone Micro Service App — Static Scanner — FSB jar file from GitHub</li><li>Change work directory to the cloned repository</li><li>Define container startup command as to execute the jar file</li></ul><p><strong>By building the Dockerfile, docker image with following features is created</strong></p><ul><li>Ubuntu 16.04 environment, with wget, git, unzip, Java, Maven installed</li><li>Consist with Micro Service App — Static Scanner — FSB jar file, cloned from GitHub</li></ul><p><strong>By running the docker image with port mapping, a docker container with following features can be created</strong></p><ul><li>When container starts up, Micro Service App — Static Scanner — FSB jar file is executed and hosted in a predefined port. (Also the port can be manually set at the run time of the container)</li><li>Micro Service App — Static Scanner — FSB is a micro service application. Therefore, HTTP requests can be sent to extract a zip file or clone project source from Github and run FindSecBugs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*4R-BUAlunq1CmjQW." /></figure><h3>FindSecBugs Micro Service</h3><p>When a container starts up, this micro service is also started, providing an API to be called to run FindSecBugs scan.</p><h3>Initiating a Scan</h3><p>Automation Manager uploads a zip file of the project source code or gives GitHub URL of the project source code. (If a specific branch or tag to be cloned, user has to give the URL of the specific branch or tag).</p><ol><li>Validates the request</li><li>If the project source code is given as a zip file, it is uploaded to the container and extracted</li><li>If the GitHub URL of the project source code is given, it is cloned. If a specific branch or tag to be cloned, the specific URL for the branch or tag needs to be given. Also if it is a private repository, username and password should be given</li><li>Then modifies the pom.xml file of the source code and adds FindSecBugs plugin.</li><li>Builds the source code using Maven</li><li>Since the FindSecBugs plugin is included in the pom.xml file, the source code is built with FindSecBugs plugin enabled. So that, after successfully completing the build, scan reports are generated</li><li>When scanning a project with multiple pom.xml files (projects with separate modules), several reports with the same name are generated inside several target directories. Therefore, all the reports are renamed and moved to a new folder</li><li>After completing each task, a notification is sent back to AM. (eg: file uploaded, file extracted, cloned etc.) Therefore when the report is ready, a notification is sent to AM</li><li>This micro service provides an API to get the generated report. Hence Automation Manager can call the API and get the report</li></ol><h3>Activity Diagram for FindSecBugs Micro Service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/0*OUX5VPtpOaQRcqRC." /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74ec93c3ef7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run OWASP ZAP Docker Image]]></title>
            <link>https://deshanigeethika.medium.com/how-to-run-owasp-zap-docker-image-b5338f1a4b2a?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5338f1a4b2a</guid>
            <category><![CDATA[zap-api]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[owaspzap]]></category>
            <category><![CDATA[zap-apikey]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Sun, 23 Jul 2017 13:03:25 GMT</pubDate>
            <atom:updated>2017-07-30T13:44:27.481Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*0_d7b2EjBcy_1xVnynNTmQ.png" /></figure><h3>Installation Instructions</h3><p>You can install Docker image with OWASP ZAP pre-installed, using following command. Note that there are 3 versions called stable, weekly and live. Following will install the stable version.</p><pre>docker pull owasp/zap2docker-stable</pre><h4>ZAP GUI in Web Browser</h4><p>Starting from ZAP 2.5.0, you can run the ZAP desktop GUI in a web browser, using following command.</p><pre>docker run -u zap -p 8080:8080 -p 8090:8090 -i owasp/zap2docker-stable zap-webswing.sh</pre><p>Then point the browser at <a href="http://localhost:8080/?anonym=true&amp;app=ZAP">http://localhost:8080/?anonym=true&amp;app=ZAP</a> You can view the usual desktop GUI of ZAP, in your browser.</p><h4>Run ZAP in Headless Mode</h4><p>Use following command to run ZAP in headless mode.</p><pre>docker run -u zap -p 8080:8080 -i owasp/zap2docker-stable zap.sh -daemon -host 0.0.0.0 -port 8080</pre><h4>Accessing the API from outside of the Docker container:</h4><p>By running the following command, the ZAP API is accessible in <a href="http://0.0.0.0:8090/">http://0.0.0.0:8090/</a> But Docker seems to be assigning random IP addresses to the container.</p><p>First run the following command to listen to the port 0.0.0.0:8090</p><pre>docker run -p 8090:8090 -i owasp/zap2docker-stable zap.sh -daemon -port 8090 -host 0.0.0.0</pre><p>Next, run the following command to check the running container id/ name</p><pre>docker ps</pre><p>Then, use the following command to check the IP address of the container</p><pre>docker inspect &lt;CONTAINER ID/ NAME&gt; | grep IPAddress</pre><p>Now you will be able to point the browser at the specified IP address with port 8090 (eg: <a href="https://172.17.0.2:8090/">http://172.17.0.2:8090</a>/ )</p><h3>[IMPORTANT] Required Configurations to run ZAP Docker Image</h3><h4>API Key</h4><p>As a new security feature, new ZAP releases (ex-ZAP 2.6.0) require an API key by default in order to invoke API operations. This is included to prevent malicious sites from invoking ZAP API.</p><p>You can add the API key manually as follows.</p><pre>-config api.key=change-me-9203935709</pre><p>However you can disable the API key. This is not recommended unless you are using ZAP in a completely isolated environment, as it allows malicious sites to access the ZAP API.</p><pre>-config api.disablekey=true</pre><h4>Allowed IP Addresses</h4><p>Moreover, ZAP doesn’t allow IP addresses to connect to the ZAP API, other than the IP address of the local machine. You can allow a specific IP address to connect by using:</p><pre>-config api.addrs.addr.name=172.143.652.123</pre><p>However, if you use ZAP in completely isolated environment, you can allow all the IP addresses to connect to ZAP API.</p><pre>-config api.addrs.addr.name=.* -config api.addrs.addr.regex=true</pre><p>As an example, the final command to run ZAP in headless mode might look like this:</p><pre>docker run -u zap -p 8080:8080 -i owasp/zap2docker-stable zap.sh -daemon -host 0.0.0.0 -port 8080 -config api.disablekey=true -config api.addrs.addr.name=.* -config api.addrs.addr.regex=true</pre><h3>Resources</h3><ul><li><a href="https://github.com/zaproxy/zaproxy/wiki/Docker">zaproxy/zaproxy</a></li><li><a href="https://github.com/zaproxy/zaproxy/wiki/FAQapikey">zaproxy/zaproxy</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5338f1a4b2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Tutorial]]></title>
            <link>https://deshanigeethika.medium.com/docker-tutorial-a6aa5b41e3ff?source=rss-ff4c45548f6a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6aa5b41e3ff</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Deshani Geethika Poddenige]]></dc:creator>
            <pubDate>Tue, 11 Jul 2017 11:47:29 GMT</pubDate>
            <atom:updated>2017-07-11T11:50:39.132Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><h4>Virtual Machine VS Container</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*EaZEiFvTmCzmkSZcMOBYLw.png" /></figure><h4>Virtual Machine</h4><p>A virtual machine is a software computer, which acts as a physical computer with an operating system and applications. In other words a computer within a computer. There is a host operating system and, on top of that a hypervisor. Hypervisor is a software, firmware or hardware that creates and runs virtual machines.</p><p><strong>Advantages of VMs:</strong></p><ul><li>Multiple OS can exist in same machine simultaneously.</li><li>Flexible</li><li>Very mature</li></ul><p><strong>Disadvantages of VMs:</strong></p><ul><li>Not efficient</li><li>Difficult for fast deployment</li></ul><h4>Container</h4><p>Container is a new form of visualization. Unlike VMs, containers share same resources of the host OS. Containers sit on top of a physical server and its host OS. Each container shares the host OS kernel and, usually, the binaries and libraries, too.</p><p><strong>Advantages of containers:</strong></p><ul><li>Lightweight</li><li>Easy to start — only few seconds</li><li>Less OS maintenance</li><li>Efficient</li></ul><p><strong>Disadvantages of containers:</strong></p><ul><li>Cannot run a container with a guest operating system that differs from the host OS because of the shared kernel</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6aa5b41e3ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>