<?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 Arun Kumar on Medium]]></title>
        <description><![CDATA[Stories by Arun Kumar on Medium]]></description>
        <link>https://medium.com/@arunkrsoam?source=rss-510c1adf774d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aQpE7F8VJr-_UmjWL4oxKQ.jpeg</url>
            <title>Stories by Arun Kumar on Medium</title>
            <link>https://medium.com/@arunkrsoam?source=rss-510c1adf774d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 01:58:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arunkrsoam/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[A quick understanding of Azure Cloud, Core Components?]]></title>
            <link>https://arunkrsoam.medium.com/a-quick-understanding-of-azure-cloud-core-components-5d56fc49039d?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d56fc49039d</guid>
            <category><![CDATA[tenants]]></category>
            <category><![CDATA[resource-management]]></category>
            <category><![CDATA[resource-groups]]></category>
            <category><![CDATA[cloud-service-models]]></category>
            <category><![CDATA[azure-cloud-services]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Mon, 12 Apr 2021 00:14:08 GMT</pubDate>
            <atom:updated>2021-09-05T14:28:06.732Z</atom:updated>
            <content:encoded><![CDATA[<h3>A quick understanding of Azure Cloud core components?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*8pTrI_4mPcKIM9JCxkRmjA.png" /></figure><blockquote>The purpose of this story to share a basic understanding of Azure building blocks. You may have knowledge of other cloud services like AWS, Google etc. However, when you start working on Azure Cloud it requires to understand the basic concepts of Azure services which helps to deliver the project with a better understanding to suffice the business’ needs. End of this story you will feel ready to take the first step towards spining up your first customer in Azure.</blockquote><p>Although each cloud service provider has the best practices to use that allow the companies to fulfil the customer’s requirements with standard approaches. This story will help you to get knowledge on the below aspects:</p><ul><li><em>Cloud benefits, Cloud service models</em></li><li><em>Azure Tenant, Azure subscriptions and management groups.</em></li><li><em>Azure resources, resource groups, and Azure Resource Manager.</em></li></ul><h3>Cloud benefits:</h3><p>Cloud provides various benefits than the on-prem environment. For instance, the cloud provides the ease of implementing <strong>high</strong> <strong>availability</strong>, <strong>scalability</strong>, <strong>elasticity</strong>, <strong>agility</strong>, and <strong>disaster</strong> <strong>recovery.</strong></p><p><strong>Geo-distribution</strong>: To give the best performance across the Globe, we can deploy our app in a nearby regional data centre.</p><p><strong>Elasticity</strong>: As per business need, we can configure the Cloud-based applications/resources.</p><p><strong>Agility</strong>: Cloud provides the agility to configure your resource quickly.</p><p><strong>Scalability</strong>: Applications in the cloud can be scaled in two ways while taking advantage of autoscaling:</p><ul><li><strong><em>Vertically</em></strong>: Computing capacity can be increased by adding RAM or CPUs</li><li><strong><em>Horizontally</em></strong>: Computing capacity can be increased by adding more virtual machines (instances) to your configuration.</li></ul><p><strong>Reliability</strong>: Almost no downtime which increases the reliability of the business.</p><p><strong>Disaster</strong> <strong>Elasticity</strong>: Azure backup services, data replication, and geo-distribution give functionality to keep data safe in case of any failures.</p><h3><strong>Service models:</strong></h3><p><strong>IaaS (Infra-as-a-Service)</strong>: This model <strong>manages physical servers and keeps the hardware up to date</strong> but OS and network support will be taken care of by the cloud tenant.</p><p><strong>PaaS (Platform-as-a-Service)</strong>: This model manages the <strong>virtual machines (VMs0 and networking resources</strong>, and the cloud tenant manages their applications.</p><p><strong>SaaS (Software-as-a-Service)</strong>: In this model the cloud provider manages all aspects of the application environment: VMs + networking resources + data storage + <strong>and applications too</strong>. Example- Office 365.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*gLXu_SS75wY_zAycvxrQyA.png" /><figcaption>The difference in models (<a href="https://subscription.packtpub.com/book/virtualization_and_cloud/9781789134964/1/ch01lvl1sec11/cloud-services-models">source</a>)</figcaption></figure><p><strong>What my experience says</strong>, until you understand the basic architecture of cloud services and their usage, you can’t produce a robust cloud solution. There might be many cases where IT individual don&#39;t have expertise in all streams. For instance, you might be good in the apps area but need to learn how infrastructure needs to be set up or works. You might be good in apps and infra but need to learn security aspects and so on and forth many scenarios you can consider here.</p><p>The aim of the Azure platform to help business and meet their organisational goals. It provides a range of cloud services, including compute, Databases, Storage, Analytics and networking. What are the Azure architecture components such as <strong>tenant</strong>, management groups, <strong>subscription</strong> and <strong>resource group?</strong> Think of these core elements that are needed to build a strong foundation in Azure Azure Cloud. It’s the first step in understanding how to build cloud practice.</p><p>As we know the Azure cloud platform provides Infrastructure-as-a-Service (IaaS) and Platform-as-a-Service (PaaS) with 100s of cloud services. IaaS is mainly referred to VMs, Storage, Virtual networks etc. whereas PaaS components are packaged services that get to be consumed in a serverless way.</p><blockquote><strong>Need to understand first, how the Azure could is structured?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*L4PT0mvwnYuqsazqHTx_gQ.png" /><figcaption>Relationship levels/ Azure core components</figcaption></figure><blockquote><strong>Levels from the top to bottom heriarchy :</strong></blockquote><p><strong>A Tenant/directory: </strong>At the top level, we have something known as a <strong>tenant</strong> which is also known as the <strong>directory</strong>. Tenant or directory has its human-readable globally unique identifier ‘<em>tenant id</em>’ such as arunkrsoam@gmail.com &lt;Company production&gt;. We also refer to it as an account too.</p><p><strong>Management groups:</strong> These groups help us to manage organisational level access, policy, and compliance for underneath subscriptions. All underneath subscriptions in a management group automatically inherit the policies assigned to the management group.</p><p><strong>Subscriptions:</strong> An account or tenant may have many subscriptions. A subscription groups together user accounts and the resources that have been created by those user accounts. For instance :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*V1601BsqagTD7ygrtrb1GQ.png" /><figcaption>Separate subscription for all three environments</figcaption></figure><p>Azure service like Azure VMs, Database will not be deployed until we have a subscription. There are various types of subscriptions that Azure offers e.g free Trial, pay-as-you-go, standard support, developer support and professional direct support</p><p><strong>Resource groups</strong>: Bottom levels resources are combined into resource groups, which act as a logical container into which Azure resources like web apps, databases, and storage accounts are deployed and managed.</p><blockquote>For instance, we have a subscription for a company that has multiple applications where for each application we have a separate resource group to deploy the azure services.</blockquote><p><strong>Resources</strong>: Resources are instances of azure services that we create, like virtual machines, Azure function, Analytics services, storage, or SQL databases etc</p><h3>Facts to know more :</h3><ul><li><em>10,000 management groups can be supported in a single directory/a tenant.</em></li><li><em>A management group tree can support up to six levels of depth. This limit doesn’t include the root level or the subscription level.</em></li><li><em>Each management group and subscription can support only one parent.</em></li><li><em>All subscriptions and management groups are within a single hierarchy in each directory.</em></li><li><em>In case we want to implement organisation policies then we can assign them at subscription or at management groups level.</em></li><li><em>Organizations can use subscriptions to manage costs and the resources that are created by users, teams, or projects. A subscription helps to track billing for each subscription.</em></li><li><em>For each subscription, there are limits or quotas on the number of resources that we can create and use.</em></li></ul><p>Here, I shared my experience that I have faced during my first project on Azure Cloud.</p><h3>Summary</h3><p>This article enables you to gain the concept of Azure core services which help to deliver the project with a better understanding to suffice the business’ needs. I had knowledge of AWS cloud services and started working on Azure Cloud without knowing how the Azure Cloud is structured. I would recommend here, first understand that how the Azure cloud is structured and what services it provides rather than start implementing directly with general concepts of other cloud providers.</p><p>Please give your feedback to make a better article/story for future usage.</p><p>Warm regards,</p><p>Arun Kumar</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d56fc49039d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Data Factory (ADF)]]></title>
            <link>https://arunkrsoam.medium.com/azure-data-factory-adf-1e64ef02df8a?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e64ef02df8a</guid>
            <category><![CDATA[adf]]></category>
            <category><![CDATA[data-factory]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Sun, 21 Mar 2021 02:39:51 GMT</pubDate>
            <atom:updated>2021-03-21T14:54:12.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*mok3H1ztzc8lT15n5X5QVQ.jpeg" /></figure><blockquote>The purpose of this story is to give an introduction to Azure Data Factory (ADF), There might be lots of material available on MS portals and other informative websites. Here I would like to share how I started working on ADF and sharing the initial anxiety while creating the flows using ADF especially when you have an existing legacy pipeline and dependencies of source and target systems what you can do differently to improve the process and how ADF’s modeuls help.</blockquote><h3>What is the data factory?</h3><p>Azure data factory launched in mid-2016 and now got matured in the market. In other words, it’s a hybrid data integration service that implies ETL (Extract Transform and Load) at scale.</p><blockquote>MS Defition:<strong> A fully managed, serverless data integration solution for ingesting, wrangling and data transforming at scale.</strong></blockquote><p>What I felt using the Azure data factory is to make data flow or ETL process very quickly and easily with fewer efforts. Infect, at some scale, it’s code-free constructing the ETL process with the intuitive visual environment. My purpose to share my experience with those who especially want to kick off the project using ADF.</p><h4>Data Factory Components:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dlTBBYaxjoaCJRaimbwd2w.jpeg" /></figure><p>A data factory can have one or more pipelines, A pipeline is a logical grouping of activities that perform a task. An activity is something that will do something to your data and its output can be used for other activity too. For instance, you have a simple task to <strong><em>copy data from blob storage to SQL Server</em> </strong>then you can use the ‘C<strong><em>opyData’ </em>activity</strong> to connect with <strong>source </strong>and <strong>target datasets</strong>: Source dataset is connected with <strong>azure storage</strong> using <strong>linked service</strong> and similarly target dataset has connectivity with <strong>Azure SQL server</strong> using <strong>another </strong>linked service. Another example in case we have transformation involved then we can use the ‘<strong>DataFlow’ activity </strong>for<strong> </strong>processing and transformation from one format to another format. An activity <strong><em>consumes </em>zero </strong>or <strong>more input datasets</strong> and <em>produces </em><strong>one </strong>or <strong>more output</strong> <strong>datasets</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*TWMfbS56fbu-iOCrzm2bKQ.jpeg" /></figure><p>To understand it practically we need to understand the end to end relationship/usage of Azure Data Factory components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Ru-p6pPk4fCziPdHEYCzmg.jpeg" /></figure><p>Steps to follow while creating the pipeline: (Assuming we have azure storage and database, other source and target systems in place.</p><ul><li>First, we need to <strong>create linked services</strong> for source and target.</li><li><strong>Create the datasets</strong> for source and target.</li><li><strong>Create a pipeline</strong>.</li><li>Now <strong>create the required activities </strong>within the pipeline</li><li>There might be a chance you can create data flow for transformation which requires in the pipeline.</li><li>There are more to <strong>create </strong>new <strong>Azure components</strong> or <strong>reuse </strong>the existing ones with a dynamic implementation perspective.</li></ul><p><strong>Please note</strong> that the Azure Data Factory provides more customise services to reuse the existing code (services developed in other languages such as c#) and SSIS packages.</p><p>Azure Data Factory has <strong>three </strong>groupings of activities: <a href="https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-overview">data movement activities</a>, <a href="https://docs.microsoft.com/en-us/azure/data-factory/transform-data">data transformation activities</a> and <a href="https://docs.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities#control-flow-activities">control activities</a>.</p><p>ADF supports the following file formats:</p><ul><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-avro">Avro format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-binary">Binary format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-delimited-text">Delimited text format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-excel">Excel format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-json">JSON format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-orc">ORC format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-parquet">Parquet format</a></li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/format-xml">XML format</a></li></ul><h4>Linked Services:</h4><p>For an activity, we need an input and output dataset connectivity and to connect the datasets we need linked services. Having said above, before creating the datasets we need to create first linked services for source and target data stores.</p><blockquote>In layman terms, linked services are connection string that defines the connection information required for Data Factory to connect the internal and external resources.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*Uq3H8cbD8mUJBmjuv7stTQ.jpeg" /></figure><p>To get a better understanding of Linked Service lets take an example:</p><h4><strong>To copy data from Azure Blob storage → Azure SQL Server</strong></h4><ul><li>We need to create <strong>two linked services </strong>one for the <strong>input </strong>dataset (Azure Blob Storage) and another for the output dataset (Azure SQL Server).</li><li>Then, we need to create <strong>two datasets</strong>- 1) Azure Blob Storage, 2) Azure SQL Server.</li><li>Created both linked services contain <strong>connection strings</strong> that Data Factory uses at runtime to connect to <strong>source </strong>Azure Storage and <strong>target </strong>Azure SQL Database.</li></ul><p>Data factory saved everything in JSON format hence you can see what is goin to saved in the repository.</p><p><strong>AzureDataStorage_linkedsvc1</strong> — connection information to connect the Source Azure Storage store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKTwtpW7iFGbti-iw5CDZg.png" /></figure><p><strong>SQLDataBase_linkedsvc2</strong> — connection information to connect the Source Azure Storage store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3A_inJZe--mBPvSOFz_Ig.png" /></figure><h4><strong>Datasets</strong>:</h4><blockquote>Dataset is a named view of data that references the source and target data that we want to use as input and output datasets.</blockquote><p>Here, I used — 1) dataset_BlobStorage 2) dataset_SQLDatabase1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwuzPjF5tEjolU-WcgEpMw.png" /></figure><p>Hope it gives you a detailed in-depth understanding between datasets and linked services.</p><h4>Activity:</h4><blockquote>An activity is a task that we want to perform (given examples above — To copy data from Azure Blob storage → Azure SQL Server)</blockquote><p>ADF provide several activities in the code-free environment such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*86FKA-h0Ayg4foEIAkFQ5A.png" /></figure><p>Now we understood the usage of linked services, dataset and most important the role of activity in a pipeline. Let’s understand the usage of <strong>dataflow </strong>followed by the <strong>Trigger</strong>, <strong>debug features </strong>of ADF for testing the pipeline<strong>.</strong></p><h4>Dataflow:</h4><blockquote><strong>Azure</strong> <strong>Data</strong> <strong>Flow</strong> is a ”drag and drop” solution (don’t hate it yet) which gives the user, with no coding required, a visual representation of the <strong>data</strong> <strong>“flow”</strong> and transformations being done. As usual, when working in <strong>Azure</strong>, you create your “Linked Services” — where the <strong>data</strong> is coming from and where it is going</blockquote><blockquote><strong>(MS Definition)</strong></blockquote><h4>Debug:</h4><blockquote>Azure <strong>Data</strong> <strong>Factory</strong> allows for you to <strong>debug</strong> a <strong>pipeline</strong> until you reach a particular activity on the <strong>pipeline</strong> canvas. Put a breakpoint on the activity until which you want to test, and select <strong>Debug</strong>. <strong>Data</strong> <strong>Factory</strong> ensures that the test runs only until the breakpoint activity on the <strong>pipeline</strong> canvas.</blockquote><blockquote><strong>(MS Definition)</strong></blockquote><h4>Trigger/Schedule/Execution/Monitor:</h4><p>Each pipeline has a unique pipeline run id (GUID). We can run the pipeline either manually or by using a trigger. We need to create a trigger that runs a pipeline on a wall clock schedule: Hourly, Daily, weekly monthly or in a time series manner etc. A pipeline can also execute another pipeline. . We can monitor the execution of the all in the pipeline.</p><h4>Summary</h4><p>This article enables you to use Azure Data Factory easily and a better understanding of Data Factory components. And, Allows us to start using ADF with a basic understanding of required ADF services towards fulfilling the project requirements.</p><p>Please give your feedback to make better content for future usage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e64ef02df8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST API (HTTPS) Client Certificate Authentication (.Net Core, C# )]]></title>
            <link>https://arunkrsoam.medium.com/rest-api-https-client-certificate-authentication-net-core-c-dd87f8a9647f?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd87f8a9647f</guid>
            <category><![CDATA[https]]></category>
            <category><![CDATA[httpscertificate]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Sat, 14 Nov 2020 00:39:07 GMT</pubDate>
            <atom:updated>2021-06-25T08:39:55.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Fl19ACX3jGi0rf2N" /><figcaption>Client certificate authentication (<a href="https://images.unsplash.com/photo-1549927455-67cc16cc490c?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=1050&amp;q=80">Image</a>)</figcaption></figure><blockquote>Every organisation increasing engages with their partners, customers and employees through the web-based applications/REST API and secure the access of your API is most important. Security threats not only disrupt the applications but also impact the organisation’s market value and its revenue too.</blockquote><p>The purpose of this story is to share the knowledge on how to make your web API (.net core) secure at the server level and also implement secure authentication for the clients:</p><ol><li><strong>Implement the security at the server level (HTTPS:\\).</strong></li><li><strong>Implement the Client Certificate Authentication.</strong></li></ol><p>Please note, digital certificates are commonly used for initiating the secure SSL connection with the webserver. The below image shows the standard client authentication — how it works between client and server using the certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ENId6Yv361GTpgkx.jpg" /><figcaption>Client Handshake (<a href="https://images.app.goo.gl/mXp6FA8gTEZGXKFJA">source</a>)</figcaption></figure><h3><strong>1- Implement security at the server level.</strong></h3><p>The server-level SSL authentication is simply covered in below few steps:</p><ol><li>Keep the <strong>server-side certificate </strong>in the<strong> application folder</strong> and then implement the below code in Program.cs .</li><li>Program.cs</li></ol><pre>//Program.cs</pre><pre>var certName = config.GetValue&lt;string&gt;(&quot;CertName&quot;);<br>var certKey = config.GetValue&lt;string&gt;(&quot;CertKey&quot;);</pre><pre>var <strong>Digicertificate</strong> = new X509Certificate2(AppContext.BaseDirectory + certName, certKey);<br>webBuilder.ConfigureKestrel(p =&gt;<br> {p.ConfigureEndpointDefaults(listenopts =&gt;<br>  { <strong>listenopts.UseHttps(Digicertificate);</strong><br>   });<br>webBuilder.UseKestrel().UseUrls(new string[] { &quot;https://localhost:8999&quot; });</pre><p>My main focus was to cover the client authentication as many times we face the problem where to store the client certificate and how to validate/authenticate cert too.</p><h3><strong>2- Implement the Client Certificate Authentication.</strong></h3><ol><li><em>How to create the self-sign certificate for testing purpose? (OR get the CA-signed certificate)</em></li><li><em>Where to store the client certificates at the server for validation?</em></li><li><em>Implementation at the code level in .net Core.</em></li></ol><h4><strong>How to create the self-sign certificate for testing purpose?</strong></h4><p>For testing purpose, we can generate the self-sign certificate based on the below commands or help available in <a href="https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?view=win10-ps">MS documents</a>.</p><p>Execute the below command on Powershell:</p><blockquote>New-SelfSignedCertificate -Type Custom -Subject “CN=TestCert,OU=UserAccounts,DC=test,DC=User,DC=com” -TextExtension @(“2.5.29.37={text}1.3.6.1.5.5.7.3.2”,”2.5.29.17={text}upn=testusername@gmail.com”) -KeyUsage DigitalSignature -FriendlyName “TestCleint1” -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation “Cert:\CurrentUser\My”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*sFaagip3SweJdVmsoGjbzA.png" /></figure><p>A self-sign certificate is created that you can check in Manage User Certificates by typing certificate in windows search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*iuqIF5hE2EI_ajR7PSY2yQ.png" /></figure><p>You have a test certificate with the name of TestCert that you can export as *.pfx file and assign a password too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RW9dVVnHVJUbMsoEKbezFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*O-ampiSK5LHidyDiM4IQIg.png" /></figure><p>Once you have <strong>TestCert.pfx</strong> file that you need to import in the local computer certification store as in my program my code reads the certificates from local computer stores. It depends as few developers can use the drive or application folder to store the certificates.</p><h4>Where to store the client certificates at the server for validation?</h4><p>Press the <strong>Windows</strong> key + R to bring up the Run command, type <strong><em>certmgr</em></strong> and press enter.</p><blockquote>When the <strong>Certificate</strong> Manager console opens, expand any <strong>certificates</strong> folder on the left. In the right pane, you’ll see details about your <strong>certificates</strong>. Right-click on them and you can import the certificate that exported <strong>TestCert.pfx</strong></blockquote><p>Note: The above step is important as in code for authentication it checks the Client certificate <strong>at the Local Computer Certificate store</strong> hence needs to import client’s certificate here otherwise Client authentication will be failed.</p><pre>// MyCertValidation service class in which below statement is used to get the certificates stored from LocalMachine.</pre><pre>var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine);</pre><h4>Implementation at the code level in .net Core:</h4><p>Update the ClientCertificateMode.<strong>RequireCertificate</strong>; that ensure the certificate is required while the client is accessing the API URI.</p><pre>//Program.cs</pre><pre>p.ConfigureHttpsDefaults(q =&gt;<br>                        {<br>                            q.ClientCertificateMode = ClientCertificateMode.<strong>RequireCertificate</strong>;<br>                            q.SslProtocols = System.Security.Authentication.SslProtocols.Tls12;<br>                          <br>                        });<br>                    }); </pre><p>Certification Validation Service that contains the validation method is ingested as a service first then call the method ‘<strong>ValidateCertificate()’ f</strong>or validating the client certificate which came with the request to the stored client certificate.</p><pre>//Worker.cs<br>public void ConfigureServices(IServiceCollection services)<br>        {<br>//Add Certification Validation Service <br><strong>services.AddSingleton&lt;IMyCertValidation, MyCertificateValidationService&gt;();</strong><br>services.AddControllers();</pre><pre>services.AddAuthentication(<br>        CertificateAuthenticationDefaults.AuthenticationScheme)<br>        .AddCertificate(options =&gt;<br>        {<br>            options.AllowedCertificateTypes = CertificateTypes.All;<br>          <strong>  options.Events = new CertificateAuthenticationEvents</strong><br>            {<br>                OnCertificateValidated = context =&gt; <br>                {<br>//Leveraging the DP injected single instance of the CertificateValidation Service<br>var validationService = context.HttpContext.RequestServices.GetService&lt;IMyCertValidation&gt;();</pre><pre>// Here it validate and call the methode ValidateCertificate from MyCertValidation class.</pre><pre><strong>if (validationService.ValidateCertificate(context.ClientCertificate, Appconfig))</strong><br>  {<br>   context.Success();<br>  }<br>else<br> {<br>   context.Fail(&quot;Invalid certificate&quot;);                   <br> }<br>return Task.CompletedTask;<br>                },<br>                OnAuthenticationFailed = context =&gt;<br>                {<br>                    context.Fail(&quot;Invalid certificate&quot;);<br>                    return Task.CompletedTask;<br>                }<br>  }; });</pre><p>MyCertValidation Class has a validation method -public bool <strong>ValidateCertificate ().</strong></p><blockquote><strong>Simple Approach: </strong>This method first search the stored/installed client certificates -&gt; And then checks certificate’s expiry -&gt; Also, notify in case certificate is going to expire in 30 days.</blockquote><p>If no certificate exists in LocalMachine OR the certificate is expired then client authentication will be failed.</p><pre>// Class MyCertValidation : IMyCertValidation</pre><pre>public bool <strong>ValidateCertificate</strong>(X509Certificate2 clientCertificate)<br>        {<br>            try<br>            {<br>// Reads the installed client certificates         <strong>   <br>var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine);</strong><br>                store.Open(OpenFlags.ReadOnly);<br> var certficate = store.Certificates.OfType&lt;X509Certificate2&gt;().FirstOrDefault(x =&gt; x.Thumbprint == clientCertificate.Thumbprint);<br>                store.Close();</pre><pre>// Maching certificate will authenticated with its expiry date too<br>if (certficate == null)<br>                {<br>Logger.LogError(&quot;Install the client certificate first. Certificate- Issuer :{0}, Certificate Thumbprint: {1}&quot;, clientCertificate.Issuer, clientCertificate.Thumbprint);<br>                }</pre><pre>// Check the certificate expry <br>if ((certficate != null) &amp;&amp; (clientCertificate.Thumbprint == certficate.Thumbprint) &amp;&amp; (System.DateTime.Today &lt;= System.Convert.ToDateTime(certficate.GetExpirationDateString())))<br>{<br>if(System.Convert.ToDateTime(certficate.GetExpirationDateString()).AddDays(-30) &lt;= System.DateTime.Today)<br>                    {<br>Logger.LogWarning(&quot;Certificate is about to expire in {0} days. Issuer :{1}&quot;, (System.Convert.ToDateTime(certficate.GetExpirationDateString()) - System.DateTime.Today).Days, certficate.Issuer);</pre><pre>}<br>return true;<br> }<br> return false;<br>  }<br>catch (Exception error)<br>  {<br>Logger.LogError(&quot;Failed to authenticate the cleint certificate {0}&quot;,error.Message);<br>return false;<br>}</pre><p>Performed the tests by using the postman by installing the same client certificate (which was installed in the Local Machine store at the server) and then send the request which authenticated successfully.</p><p>For a negative authentication test, you can uninstall/ remove the certificate from the server using the <strong>Certificate</strong> Manager.</p><h4>NOTE: Install the client certificates at the <strong>local machine store</strong>, not in the user certificate store:</h4><p><strong>Issues Noticed:</strong> During its implementation under a specific service user (E.g- svcSsshUser, we noticed that giving access to other users on the folder C:/Users/svcSsshUser/.ssh/authorized_key will holt the situation and will keep showing <strong>permissions issues </strong>while connecting from ssh client.</p><p>The easiest way to enable login at ssh server by changing the <strong>sshd_config</strong> file in C:/Prgram Data/SSH then came to know which sid is trying to access the authorized_key file and what exact error had with “<em>bad permission …</em>”.</p><p>If you face such issues please contact me.</p><h3>Summary</h3><p>This article enables you to implement the client certificate authentication with the REST API. Also, help how to use a self-signed certificate for testing purpose. The most important aspect if you have a client certificate installed at the local machine certificate store (@Server), will not require many changes in the config file or at the code level in case, certificate get changes.</p><p>Please give your feedback to make better content for future usage.</p><p>Warm regards,</p><p>Arun Kumar</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd87f8a9647f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Rsync on windows using SSH connection?]]></title>
            <link>https://arunkrsoam.medium.com/how-to-use-rsync-on-windows-using-ssh-connection-835190e72ae0?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/835190e72ae0</guid>
            <category><![CDATA[windows-10]]></category>
            <category><![CDATA[sync]]></category>
            <category><![CDATA[rsync]]></category>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[openssh]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Thu, 08 Oct 2020 22:01:36 GMT</pubDate>
            <atom:updated>2021-06-03T12:44:46.415Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to use Rsync on Windows using SSH connection?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/0*w-Tj_KoevIuxZFRP" /><figcaption>Using Ubuntu Linux subsystem with Windows (<a href="https://images.unsplash.com/photo-1530133532239-eda6f53fcf0f?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=967&amp;q=80">source)</a></figcaption></figure><h3>Introduction</h3><p><a href="https://en.wikipedia.org/wiki/Rsync"><strong>R</strong>emote Sync</a> is known as <strong>Rsync</strong> that allows you to transfer and synchronise files/data between systems. Using <strong>SSH</strong> (Secure Shell or Secure Socket Shell) you can copy your data securely from one system to another machine. Rsync is used widely for syncing files for many years.</p><blockquote><strong>The purpose of writing this story is to share the experience and issues faced during its implementation with Windows.</strong></blockquote><p><strong>Rsync</strong> is typically used for synchronizing files and directories between two different systems. You may design a system that has constraints such as intermittent connectivity and limited bandwidth. Rsync could be the best solution to replication your data from one location to another location. The utility only transfers new or updated files saving on bandwidth and bringing faster transfer times.</p><p><strong>Syntax of Rsync :</strong></p><p><strong>PULL</strong><em>: $ rsync [options] &lt;UserName&gt;@&lt;Romote_Host_Server&gt;:&lt;Source_File_Dir&gt; &lt;Target&gt;</em></p><p><strong>PUSH:</strong><em> $ rsync [options] &lt;Source_File_Dir&gt; &lt;UserName&gt;@&lt;Romote_Host_Server&gt;:&lt;Target&gt;</em></p><p><strong>Some of the commonly used options are given below:</strong></p><ul><li>-v | -verbose → Verbose output</li><li>-n | -dry-run → Performing a trial run without synchronization</li><li>-e | –rsh=COMMAND → TO use the SSH</li><li>-a |–archive → Archive files and directory while synchronizing</li><li>–progress → Show the sync progress during file transfer</li><li>-r | –recursive → Sync files and directories recursively</li><li>-b |–backup → Take the backup during synchronization</li><li>-u |–update → Don’t copy the files if destination files are newer</li><li>-l | –links → Copy symlinks as symlinks during the sync</li><li>-z |–compress → Compress file during the transfer</li><li>-h | –human-readable → Display the output in a human-readable format</li></ul><h3>Let’s implement the Rsync with Windows</h3><h3>1. Prerequisite :</h3><p>Assuming you have 64-bit Windows and the latest Windows Operating system. First, we need to enable the <strong>Windows subsystem (WSL) </strong>and then need to install the latest version of <strong>ubuntu</strong> on client and server machines.</p><h4><strong>Enable the Windows subsystem (WSL)</strong></h4><ul><li>Click on the Start menu of Windows and navigate to open the Control Panel → Programs → Turn Windows Features On/Off.</li><li>Enable the “<em>Windows Subsystem for Linux</em>” option in the list, and then click the “OK” button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OUmA1Hg9S2o-ug-HLXbqtA.png" /><figcaption>Perform the action on the client and remote machine (Remote Server).</figcaption></figure><p><strong>Install the Ubuntu from Microsoft Store</strong></p><p><a href="https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab">Get Ubuntu - Microsoft Store</a></p><p>Once you install ubuntu on both client and remote machines, you can start using <strong>$wsl &lt;Linux command&gt;</strong> or type<strong> $bash</strong> on command prompt then you can use Linux commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*ogskP16R9xWJulZmMQqQDg.png" /><figcaption><strong>wsl</strong> stands for Windows subsystem for Linux</figcaption></figure><p><strong><em>To avoid any </em></strong><em>issue</em><strong><em> with OpenSSH set up, we need to set up the ssh server and ssh client on a Window system, not on WSL (As now you have both on your machine). You can also enable ssh setup on WSL and change Rsync command accordingly. I faced many issues hence recommend the following steps with no issue.</em></strong></p><h3>2. Install OpenSSH Server at Server</h3><p>Once you installed ubuntu on the server then we need to install the Open SSH server.</p><p><strong>Installing OpenSSH server with PowerShell as an Administrator</strong></p><p>Step 1 - Check if the OpenSSH Server is already installed</p><pre>Get-WindowsCapability -Online | ? Name -like &#39;OpenSSH*&#39;</pre><p>Step 2- Install the OpenSSH Server</p><pre>Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0</pre><p>Step 3 - Start the SSH Open Server</p><pre>Start-Service sshd</pre><p>Step 4 - This command is optional but recommended to make the Open SSH service automatic</p><pre>Set-Service -Name sshd -StartupType &#39;Automatic&#39;</pre><p>Step 5 - Confirm the Firewall rule is configured ideally it should be created by setup. There should be a firewall rule named “OpenSSH-Server-In-TCP”, which should be enabled</p><pre>Get-NetFirewallRule -Name *ssh*</pre><p>Check if port 22 is listening or not using the below command</p><pre>&gt; netstat -a  </pre><pre>Results:</pre><pre>TCP    [::]:22                &lt;server ip&gt;:0      LISTENING</pre><p>Step 6- Copy public key to the Server-side (Once created or have key pair)</p><p><em>C:\users\&lt;users&gt;\.ssh\authorized_keys</em></p><p><strong>Step 7-</strong> Update the sshd_config file at the server end. We need to understand the exact location of <strong>sshd_config </strong>and where we need to update it. Here my case is Windows Sub System (Linux) or SSH client -&gt; Windows 2019 Server /SSH Server then the path would be <em>C:\ProgramData\ssh\</em></p><p>In some cases, we need WSL rsync command Linux to Linux in that case you need to update <strong>sshd_config</strong> at SSH server-side at this path wsl /etc/ssh/</p><p>Make the below changes to make the passwordless ssh connection.</p><blockquote>PubkeyAuthentication yes<br> PasswordAuthentication no</blockquote><p>Also, comment last two settings</p><p>#Match Group administrators<br># AuthorizedKeysFile __PROGRAMDATA__/ssh/Authorized_keys</p><p>You might face a problem editing this file due to permission hence open notepad as administrator and then open this file in notepad to update it.</p><h3>3. Generate the Key-pair keys to enable the passwordless connection over SSH</h3><p><strong>Or use existing Key-pair keys</strong></p><p><strong>Generate an RSA key by using the command SSH-KEYGEN to create a key</strong></p><blockquote><em>wsl ssh-keygen</em></blockquote><blockquote><em>wsl ssh-keygen -f ~/.ssh/id_rsa -q -P &quot;&quot;</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*Z82p3Gt6IeyEQRmVNA9jng.png" /><figcaption>wsl ssh-keygen</figcaption></figure><p>It would generate the private and public RSA key then follow the above Step 6 for Copying public key to the Server-side by editing ‘.pub’ file and cut and paste the key value into ‘<strong><em>authorized_keys</em></strong>’ file on the SERVER.</p><p><em>C:\users\&lt;users&gt;\.ssh\authorized_keys</em></p><h3>4. SSH Setup on the Client machine</h3><p>Once you installed ubuntu on the server then we need to install the Open SSH client on the client machine.</p><p><strong>Installing OpenSSH client with PowerShell as an Administrator</strong></p><p>Step 1- Check if the OpenSSH Server is already installed</p><pre>Get-WindowsCapability -Online | ? Name -like &#39;OpenSSH*&#39;</pre><p>Step 2- Install the OpenSSH client</p><pre>Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0</pre><p>Step 3- Create a config file in the C:\users\&lt;username&gt;\.ssh\config<br> with the following content.</p><p>Host 20.0.0.1<br> HostName 20.0.0.1<br> User &lt;username&gt;<br> IdentityFile /users/&lt;username&gt;/.ssh/id_rsa</p><p><strong>Please note,</strong> if you want to connect multiple servers then add an entry for each host server in the config file. Also, if you want to use different key-pair then update the identy File /users/&lt;username&gt;/.ssh/<strong>id1</strong>_rsa.</p><h3>5. Test the ssh connection (passwordless)</h3><p>Test the Openssh Server connection using below command</p><pre>Wsl ssh username@servername</pre><p>The first ssh connection to any server will result in a message:</p><pre>The authenticity of host &lt;serverName&gt; can’t be established.ECDSA key fingerprint is SHA256:(&lt;a large string&gt;). Are you sure you want to continue connecting <strong>(yes/no)</strong>?</pre><p>The answer must be either “yes” or “no”. Answering Yes will add that server to the local system’s list of known ssh hosts. K<strong>nown_hosts</strong>’ file will be at the client machine.</p><h3>6. Let’s use the rsync command for transferring files to and from the server.</h3><p>To get detailed information about rsync commands, use the below command for help.</p><blockquote><em>wsl man rsync</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTspC6kg2shiw1Vdcx6BQA.png" /></figure><h3>Files transfer with Rsync over SSH</h3><blockquote><em>wsl rsync [OPTION] SourceDirectory_or_filePath user@Server:Target</em></blockquote><p>wsl rsync -avn — timeout=240 /mnt/c/sourceDir/out /mnt/c/Destdir/in/</p><h3>Worth knowing:</h3><p>Rsync is always been used for Linux to Linus (Apple to Apple). However, now Rsync will be used at Windows(Orange). Windows ( runs Apple command ) → connecting to an orange. It won’t work as Rsync only works with apple hence<strong> </strong>we either need a service running on the remote Orange that will connect inner apple.</p><blockquote>Therefore, while writing your <em>wsl rsync</em> command then make sure you used<strong> — rsync-path=’wsl rsync’ </strong>to make orange (run apple) to orange (with inner apple) conection.</blockquote><p>You can take the reference of the below commands for PULL and PUSH files.</p><h4>PUSH to Remote_Server:</h4><blockquote><em>wsl rsync -e ssh -avvi /mnt/c/rep/out — remove-sent-files testUser@1.0.1.1:/mnt/c/repl/in/ oorsync-path=&#39;wsl rsync&#39;</em></blockquote><h4>PULL from Remote_Server:</h4><blockquote><em>wsl rsync -e ssh -avvi testUser@1.0.1.1:/mnt/c/repl/out/ --rsync-path=&#39;wsl rsync&#39; — remove-sent-files /mnt/c/rep/in/</em></blockquote><blockquote>— remove-sent-files is used to remove sent files form source directoy</blockquote><h3>Delete files from the Remotely:</h3><p><strong>You can remote specific file remotely using the below command.</strong></p><h4>PUSH to Remote_Server:</h4><blockquote><em>wsl ssh testUser@10.0.1.1: &#39;wsl rm -f&#39; /mnt/c/in/file1 /mnt/c/in/file2</em></blockquote><h3>Summary</h3><p>This article enables you to use <strong>Rsync</strong> with Windows and help to sync the files to and from the remote server. Also, help how to install the OpenSSH server and resolve the issues while making ssh connection to the remote server.</p><p>Please give your feedback to make better content for future usage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=835190e72ae0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install Apache PySpark on MacBook pro?]]></title>
            <link>https://medium.com/macoclock/how-to-install-apache-pyspark-on-macbook-pro-4a9249f0d823?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a9249f0d823</guid>
            <category><![CDATA[pyspark]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 19:44:36 GMT</pubDate>
            <atom:updated>2021-02-01T19:16:46.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_d87cZ-VzEYRRofF.png" /></figure><p>Follow the step by step guide to install the Scala and Apache Spark on Mac OS.</p><ul><li>First, install the prerequisites</li><li>Install the Scala</li><li>Install the PySpark</li><li>Check PySpark with few basic commands</li></ul><h3>Step 1: First install the prerequisites</h3><p>Easy way to install the required software for spark/Pyspak, Homebrew package manager to be installed first.</p><p>To install homebrew, use below command</p><blockquote>/usr/bin/ruby -e “$(curl -fsSL <a href="https://raw.githubusercontent.com/Homebrew/install/master/install">https://raw.githubusercontent.com/Homebrew/install/master/install</a></blockquote><p>Sometimes, it shows below warning and you need to rerun the command as suggested.</p><p><strong>Warning</strong>: The Ruby Homebrew installer is now deprecated and has been rewritten in Bash. Please migrate to the following command:</p><blockquote>/bin/bash -c $(curl -fsSL <a href="https://raw.githubusercontent.com/Homebrew/install/master/install.sh)">https://raw.githubusercontent.com/Homebrew/install/master/install.sh)</a></blockquote><blockquote>To validate brew is installed, check with below command: $ brew help</blockquote><h3>Step 2: Next we need to install Java</h3><p>Apache Spark is written in scala which is again a JVM language hence need to install the Java.</p><p>Install the latest version of Java using below command:</p><blockquote>$ brew cask install java</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*-vh6ZPDQqHO7XPLES8_EKw.png" /></figure><h3>Step 3: Install Scala now</h3><p>You can use below few commands to check information about spark dependencies and info about java</p><blockquote>$ brew info apache-spark</blockquote><blockquote>$ brew cask info java</blockquote><p>The first command will show the dependency of scala with Apache Spark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*c720YdzutgtgPpSNnq3Vvg.png" /></figure><p>To install the scala, use the below command on terminal :</p><blockquote>$ brew install scala</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mKUug2Smy0NtIOHz1AcYMg.png" /></figure><h3>Step 4: Now, install the Apache Spark</h3><p>Use below command to install the spark:</p><blockquote>$ brew install apache-spark</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5uGvmox7ZE4Blx5j0dbzg.png" /></figure><h3>Step 5: Installing Pyspark</h3><p>Hope, you must have the latest version of python on your laptop. If not then please install it using below command.</p><blockquote>$ brew install python3</blockquote><p>You can declare the variable path if you want using export …</p><p>Now, let’s check pySpark is working or not? Run the below command:</p><blockquote>$ pyspark</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*-382Y3vne4TslCQG2PXvzw.png" /></figure><p>Now all set to start working with pySpark.</p><p>Spark user interface will be accessed through the below link:</p><p><a href="http://localhost:4040/jobs/">http://localhost:4040/jobs/</a></p><p>It will display as.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LsSm8TuawTOc81Bsoqknnw.png" /></figure><h3>Step 6: Test Pyspark</h3><p>On the Spark command prompt (&gt;&gt;&gt;), you can import the pyspark library and then perform a basic task as following:</p><blockquote>import pyspark</blockquote><blockquote>from pyspark import SparkContext</blockquote><blockquote>arr = sc.parallelize([1,2,3,4,5,6,7,8]);</blockquote><blockquote>arr.take(6);</blockquote><p>We can see the performed tasks on Spark UI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwWxnKvIIUldSTs2lRK1Sg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iIb_WmTxcC3sW0KLj9nprw.png" /></figure><p>Hope this will help you to quickly understanding of how to install pySpark and test it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a9249f0d823" width="1" height="1" alt=""><hr><p><a href="https://medium.com/macoclock/how-to-install-apache-pyspark-on-macbook-pro-4a9249f0d823">How to install Apache PySpark on MacBook pro?</a> was originally published in <a href="https://medium.com/macoclock">Mac O’Clock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install React JS on Mac!]]></title>
            <link>https://medium.com/macoclock/install-react-js-on-mac-7cffe8bda2ac?source=rss-510c1adf774d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cffe8bda2ac</guid>
            <category><![CDATA[node-package-manager]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Arun Kumar]]></dc:creator>
            <pubDate>Wed, 26 Feb 2020 02:28:40 GMT</pubDate>
            <atom:updated>2021-02-17T11:59:45.416Z</atom:updated>
            <content:encoded><![CDATA[<p>Setup a first React application on Macbook Pro.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*UzbK1nIUmzI3EqdbITmeRQ.png" /><figcaption>Install React on Mac and setup first react application. <a href="https://www.tabtag.com/products/glowing-macbook-sticker-react">source</a></figcaption></figure><blockquote>React is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies.</blockquote><p>Here, let’s go step by step installation of React on mac.</p><p><strong>Mac</strong>: User must have proper access and privilege for installation of software.</p><p>1) Sufficient Memory — 4 GB</p><p>2) Sufficient Storage — 10 GB</p><p>3) Latest OS → 10.10 and above</p><p><strong>Prerequisite:</strong></p><p>First, we need to install <strong>node js</strong> and <strong>npm.</strong></p><p><strong>What is Nodejs and its usage in the development?</strong></p><p>Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser. Node.js lets developers use JavaScript to develop a wide variety of applications web API, web applications.</p><p><strong>What is Node package manage?</strong></p><p><strong>The node package manager (NPM) </strong>is a dependency management tool for javascript applications. This tool will help to install and the libraries and other tools to support react development</p><p><strong>1.Download nodejs</strong></p><ul><li>Visit nodejs download page <a href="https://nodejs.org/en/download/">here</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*-Y7ulLZnRbO0TlJL-uF3YQ.png" /></figure><p>Click on macOS Installer to download the latest version of node installable package.</p><p><strong>2.Install nodejs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*ZcIG_25D-hRJtnYl_567Vg.png" /></figure><ul><li>Click on the download node-12.xx.xx.pkg ( for example node-v12.14.1.pkg). And then please<strong> click continue</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*pJQyHjI4UeLwwa-Ilee_ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*yCnwudqN5UXSZAdXZxzH7A.png" /></figure><ul><li>By clicking continue in the previous step you will be asked to accept the license, please click<strong> continue</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*z5NpFnw-pLv38wFKlrK-fw.png" /></figure><ul><li>Please accept the agreement by clicking <strong>Agree</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*O12GNkYpI5A-w2zptHokuw.png" /></figure><ul><li>Click<strong> continue and then c</strong>lick<strong> install</strong>,<strong> </strong>which would ask you for the user credentials</li><li>Provide UID and PWD and click <strong>Install</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*KiPvaqF6a-MxBhwOx_gkhg.png" /></figure><ul><li>Post the installation we will see the below screen which shows the summary of the<strong> installation.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*E2Pbp5y0W12PabctdDa97g.png" /></figure><p>To access the node and npm executable from terminal make sure</p><pre>/usr/local/bin is in your $PATH. You can verify that by running echo $PATH command in terminal</pre><p><strong>Now Validate nodejs installation by checking the installed virsions</strong></p><pre>$node -v</pre><p>v12.14.1</p><p>Now check the installation of NPM with below command.</p><pre>$ npm -v</pre><p>6.13.6</p><p>Now, install the create-react-app. That generally create a react app with required files.</p><pre>$ sudo npm install -g create-react-app</pre><p>Verify that create-react-app has installed or not?</p><pre>$ npm -v$create-react-app — version</pre><p>3.3.0</p><pre>$ create-react-app REACT_App</pre><p>Once the project is created then cd to the project directory and run application by <strong>$ npm</strong> start command as given below:</p><pre>$ npm start</pre><p><strong>Showed below error</strong></p><p>· npm start error events.js:200 throw er; // Unhandled ‘error’ event</p><pre>$npm install react-scripts@2.1.8</pre><pre>$ $npm start</pre><p><strong>Then it showed below error</strong></p><p>· errno: ‘ENOTFOUND’, code: ‘ENOTFOUND’, syscall: ‘getaddrinfo’, hostname: ‘x86_64-apple-darwin13.4.0’</p><pre>#unset HOST</pre><p>Finally, it resolved the error by unseating the HOST and server started,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ku_awRbSW5h6e197I7E9g.png" /></figure><p>You can navigate to <a href="http://localhost:3000/">http://<strong>localhost</strong>:<strong>3000</strong></a><strong> </strong>to access the webpage of react application.</p><p>Sometimes it’s irritating such minor issued that must be in knowledge to fix to initiate the react application.</p><p>For more troubleshooting, you can refer to stackflow and other websites.</p><p>Thanks, Arun</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cffe8bda2ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/macoclock/install-react-js-on-mac-7cffe8bda2ac">Install React JS on Mac!</a> was originally published in <a href="https://medium.com/macoclock">Mac O’Clock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>