<?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 Arjun PT on Medium]]></title>
        <description><![CDATA[Stories by Arjun PT on Medium]]></description>
        <link>https://medium.com/@arjunpt2006?source=rss-6ad2da0a6687------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FtrrXTCDQhPZD02C</url>
            <title>Stories by Arjun PT on Medium</title>
            <link>https://medium.com/@arjunpt2006?source=rss-6ad2da0a6687------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:56:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arjunpt2006/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[Azure Migrate]]></title>
            <link>https://medium.com/@arjunpt2006/azure-migrate-7233093d528d?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/7233093d528d</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Tue, 20 Jun 2023 09:53:43 GMT</pubDate>
            <atom:updated>2023-06-20T09:53:43.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCJIXVf-c2MZh60cSqVmxg.png" /></figure><ul><li>we have a company smart hotel and smart hotel host their application on hyper-v on prem machine.</li><li>they have couple of webserver, sql backend database and ubuntu server which using as a WAF</li><li>we are going to lift and shift approach for migrating it to the cloud</li></ul><p><strong>Stage 1:</strong><br>we are going to replicate this env in azure<br>we will deploy a template which will deploy on a hyperv on prem env</p><p><strong>stage2:</strong></p><p>we will do on prem env discovery and assesment<br>we will use the tool azure migrate which help in discorvey<br>discovery is like it will find out what are the dependencies on server, what compute we need to use<br>in this stage we will move the linux and ubuntu machine using azure migrate tool</p><p><strong>stage3:</strong></p><p>In this stage we will migrate the databases to azure<br>DMS and DMA are the tool we will be using in this stage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8FnRJXC4tVmh50PpR8yzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnMWoAhwwNm17k_8yhpqYQ.png" /></figure><p>we need to create the project with an resource group and details mentioned below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cuKBNuP1laLOtNwxqz1P1Q.png" /></figure><p>Inside the migration goals we have the server database and web app there we have a quick start option for discover.</p><ul><li>we have to choose the virtualization platform like hyperv, xen , vmware</li><li>we have to generate a project key after giving the appliance name</li><li>Download the azure migrate appliance as a vhd file</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhRnf9OfiBffKIKkO9WBvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b0Njl07Vhz0VVjoLuqz8A.png" /></figure><ul><li>RDP into the on premise server</li><li>open the hyperv manager from the tool section</li><li>click on action and import the vhd file</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*H_Ecb0t91KfWQQE4AypgLA.png" /></figure><ul><li>Choose the first option</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b_HWB2QdCOXXBxvgseWiw.png" /></figure><ul><li>This error is expected so choose the switch whicha are inernally avaialble</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTqdz6SfyfMX-J3Vbgv4bQ.png" /></figure><ul><li>once done click on thr azure migrate and start the server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5Ym2lX_vpFrHnIuxcUMrA.png" /></figure><ul><li>why we doing this is that azure migrate appliance need access to internet to upload data to azure and also it need access to hypervhost</li><li>it will automatically isntall and configure the pre requisite steps</li><li>In the register with azure migrate section we have to give the key that we generated from azure portal</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vawdzRssHGdSbed2DeSqLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vUK_GUKM_oeQTRHf4gBTIg.png" /></figure><ul><li>update the discovery source with fQDN in order to find the services that are running inside this server</li><li>once done the valdiate will got successful</li><li>Then start the discovery</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsCm-bFwQALfx4BOfl2trw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*069Xzg8OVpqKPAa7_BTFoQ.png" /></figure><ul><li>once discovered we will get those details on the azure portal</li><li>see in the screenshot we can see the number of servers</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9L7ZDkDLFLjuQqyNHS3_zg.png" /></figure><ul><li>click on the asses option if we want to asses the vm</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FydNzQbbVahx4cc7-mefEw.png" /></figure><ul><li>once the assesment is done we will get an report like this</li><li>where we can know the server is ready or do we have any warning</li><li>we can avoid warning. sometimes we can see error like unkown OS and all</li><li>if we get the unknown OS warning then click on that to get more about it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EtpxMkTSA9wrCiNJh1kqUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*6p3Ry_0Uq7TBMQybQ-kfmw.png" /></figure><ul><li>we have done with assesment part</li></ul><p><strong>Next we have to do the dependency visualization</strong></p><ul><li>click on the groups</li><li>for the dependencies to work we have to install those agents</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsACJ74LyWyRIX1OkOawEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMq3XQMGTRX1SKUGIbe13w.png" /></figure><ul><li>we have to create the workspace then we can install th agents</li><li>copy the link and install it on the on prem server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uUTdpEI-uWArpmyyzh58pA.png" /></figure><ul><li>inside the agent managment we can find the workspace id and the key</li><li>while configuring the microsot agent we have to give those credentials</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHLNTeF8IHc5NiWhAqwrUA.png" /></figure><ul><li>All the agent installation is completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*caaO-vgDFD7ogaVseV5XNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sM84gG9V6l57qbczcabNXQ.png" /></figure><ul><li>we need to create a azure storage account. This is for storing the reosirces<br>click create reosurce -&gt; storage account -&gt; go with default configuration</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7at8v5XckczLSJa6_HjZ-Q.png" /></figure><ul><li>create a private endpoint on the provider virtual netwrok that is used by the sql resource</li><li>got to the resource group where all the resources are listed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70V6uBCT3M1horNia70ODQ.png" /></figure><ul><li>create a new private endpoint for the db instance.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsEJR8xzCAJszotbERELkg.png" /></figure><ul><li>once done we have to go to the migration tab</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dUCAtT7LziWC8upnag7uHg.png" /></figure><ul><li>we need to download and install it on our onpremise host. This is a azure site recovery agent</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e45dq44R3smfu0vDkv2gZQ.png" /></figure><ul><li>just upload the key for completing the registration process. key are provided in the same page itself we need to download it from the portal and upload. select connect to azure site recovery without a proxy server</li><li>registration is completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0ZGkXMBCdQ0UnyRueO4ag.png" /></figure><ul><li>once done we can go to the azure migrate tool and strat the replciation process</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWiZWIQNTOXl1CmpCh4L_w.png" /></figure><ul><li>choose the group and assesment name and tick all the vms</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*qqJWTo5smZHXbddLX7BV6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*6H20Db6I0DXb4vXbWe3blQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UrQ9v95fD0k65TqIZPGb5A.png" /></figure><ul><li>we are not making changes on the disk part right now and also in the tags section</li><li>we can get the status from overview section and click on the replicating machine to get the status of vm. it will take 30 to 45 min to replicate</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SL4ascdrSzRBMoyx7bbHWA.png" /></figure><ul><li>change the ip from dynamic to static on all the vms</li><li>go to compute and network for updating those setting</li><li>inside the internal NAT seich chnage the IP address to static</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ab8oPqVttsWV8gcvXHEsgA.png" /></figure><p>once replication is completed do the migration that on the step3. we can choose the migration of vm one by one or can perfomr bulk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehR7ukTxJrnIRrpXfV6aVg.png" /></figure><ul><li>on job we can see the progress</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ODQGiAMCE-FxdOFJI2VVBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THZCA4Yp7lgSJm7IsaGuCA.png" /></figure><p>Start from the 50.0 minute to see the database migration</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhiIWd3upOEE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhiIWd3upOEE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhiIWd3upOEE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d9b47d3d81cded5658e150e35628aae/href">https://medium.com/media/7d9b47d3d81cded5658e150e35628aae/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7233093d528d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure App Service]]></title>
            <link>https://medium.com/@arjunpt2006/azure-app-service-9bb804ceba10?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bb804ceba10</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 19:16:45 GMT</pubDate>
            <atom:updated>2023-06-19T20:20:51.962Z</atom:updated>
            <content:encoded><![CDATA[<p>How to Build and deploy app service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*NyPI-iYpEEOoaV4hsLgaLg.png" /></figure><ul><li>Azure app service is the only cloud service which help to quickly and easily build web and mobile app for any platform and device</li><li>Fully managed platform so called a PAAS</li><li>it have powerful capabilities such as built in devops, continuous integration with visual studio team service and github, staging and production support, automatic patching</li></ul><p><strong>App type:</strong><br>App service allow you to create the following app type from a single development experience</p><ol><li>web Apps: quickly create and deploy critical web app that scale with your business</li><li>Mobile Apps: engage employees, partners and customers on any device at any time</li><li>API Apps: easily build and consume cloud API’s</li><li>Logic Apps: Automate the access and use of data across cloud without writing code</li><li>serverless functions: function written by developer and executed without any dedicated hardware</li></ol><p><strong>Why web Apps:</strong></p><ol><li>multiple language and framework</li><li>Application template in azure marketplace: if we want to host wordpress</li><li>Devops optimization. continuous delivery and continuous deployment</li><li>test in production using deployment slots: testing can performed before moving to production</li><li>Global scale with high availability</li><li>Visual studio integration</li></ol><p>How to create ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzIjR6-G_kuqalpBDoXv0A.png" /></figure><ul><li>Domain will end with azurewebsite.net later we can change that to custom domain</li><li>Do we want to publish the code or we want to create a docker container image</li><li>code run time stack: we have nodeks ruby pho tomact .net with different version</li><li>we can go with any OS</li><li>Based on app service plan the cost will decide: dev/test, production, isolated, and we have many plan in each section with ssl, backup features and all</li><li>application insight: responsible for providing the insight like speed performance, from where the traffic coming from for monitoring purpose</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*DZIdfgJwi4LAiCvbQ8Ggng.png" /></figure><p><strong>How to Deploy wordpress on Azure app service:</strong></p><ul><li>We will deploy the wordpress as a container</li><li>container is mostly based on alpine based with the webserver and php running on it</li><li>backend have azure mysql flexible server where we have access to database as it a fully managed database server</li><li>In the deployment it will create a azure front door</li><li>it have the integration with blob storage to store the media file and text contents</li><li>database is secured as it is deployed in private endpoint so not exposed outside</li><li>we can perform the database operation through phpmyadmin</li><li>Currently customer cannot create new wpsite on windows apps service as they have taken back the service so migrate to linux machine</li></ul><p><strong>Steps:</strong></p><ol><li>create resource -&gt; got to market place -&gt; wordpress -&gt; create</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*WnLHfmA4k1hy8eLPAzqDaQ.png" /></figure><p>2. We have to give the admin username and password while creating the wordrpress app service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*CuPQv0kC_7FyDQuQBgduBg.png" /></figure><p>3. we have a different plans available for the wordpress deployment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pe26rSS1cuUhczkKAyGCQw.png" /></figure><p>4. Once deployed we can access them using the appservice url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bDpA9Nms8f7tKtHAP5gTpQ.png" /></figure><p>5. we will get the the database name,password,cdn endpoint and everything from the configuration. we can update the domain name in the custom domain section and applicaiton insight can be used for monitoring purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-jzBG4PRfypxKofGxqWrvA.png" /></figure><p>6. we have the scale up and out function as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wS_amo7YAlqPD1NiujQk3Q.png" /></figure><p><strong>How to migrate wordpress to Azure VM:</strong></p><ol><li>Install all-in-one-wp-migration plugin on onpremise server and activate it on wordpress</li><li>export the media and database and file to system</li><li>got to azure market place and search for wordpress and then create the vm</li><li>loginto wordpress admin page</li><li>we will get the usernam and password of admin from boot diagnostic logs</li><li>install the all-in-one wp migration plugin and activate</li><li>click on import and import the file after updating the maximum file upload size</li><li>search for DNS zone and create the zone there</li><li>update the NS in the domain registrar</li></ol><p><strong>Database creation:</strong></p><p>1. create reosurce group inside the subscription<br>2. got to market place and choose azure databse for mysql as it is the pass version <br>3. we have so many mysql options available choose appropraiate<br>4. we have flexible and single server option for the database. flexible is low cost and have maximum control with simolified developer experience<br>5. while creating the deployment of the flexible mysql server we have to give workload type such as (dev , prod ) , availablity zone , high avaialability, compute storage<br>6. click review nad deployed<br>9. create azure wordpress webapp service<br>10. got to configuration and click on the new application settings <br>11. add wordpess_DB_host and add the db host url then add the wordpress_db_user ,wordpress_db_password followed by thier value<br>12. we need to create the user and password by connecting to the database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BItmP_HqvAE5Kkq93VwbIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bb804ceba10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure CDN]]></title>
            <link>https://medium.com/@arjunpt2006/azure-cdn-47cf181a0f95?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/47cf181a0f95</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 07:29:17 GMT</pubDate>
            <atom:updated>2023-06-19T07:29:17.818Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*bINnjfhkFtS9RHXmrzEZ6A.png" /></figure><p>What is azure CDN?</p><ul><li>Its a tool which help us to reduce the response time of a particular transaction on web.</li><li>it will help to cache the data to the nearest server which are there for the user</li><li>We can cache content in azure blob storage by using the closest point of presence( POP ) server</li></ul><h3>Prerequisites</h3><p>If you want to follow along with this example, there are a few things you will need.</p><ol><li>An Azure Subscription</li><li>A Storage Account configured to host a static website</li><li>Some kind of content hosted in the static website. This example is based on a Blazor Web Assembly application, but it could just as easily be a single HTML page.</li></ol><h3>Step 1: Provision an Azure CDN Endpoint for your Static Website</h3><p>An Endpoint is a separate Azure resource that lives under a CDN Profile resource, but you can create one for your static website directly from the Storage Account blade.</p><ol><li>Go to your Storage Account in the Azure Portal</li><li>Scroll down the menu until you see Azure CDN (it is under Blob service) and click on it to reveal the Azure Content Delivery Network settings</li><li>Under New endpoint, we’ll enter details to setup a new CDN profile and endpoint.</li><li>Leave Create new selected and enter a name for your CDN profile</li><li>Choose Standard Microsoft for the Pricing tier (it is the cheapest and good enough for this example).</li><li>Enter a CDN endpoint name (this needs to be unique on azureedge.net)</li><li>Select your Static Website in the Origin hostname dropdown</li><li>Click on Create. Grab a cup of coffee whilst the CDN endpoint is provisioned.</li></ol><p>Once the provisioning is complete, click on the endpoint. In the Overview of the endpoint that is displayed, you will find the Endpoint hostname (it will be something like <a href="https://yourendpointname.azureedge.net)./">https://yourendpointname.azureedge.net).</a> If you browse to this address you should see your static site.</p><h3>Step 2: Configure a Global Rule to Append an HTTP Header to All Response</h3><p>Now that our CDN endpoint is provisioned, let’s use the Rules Engine to add a custom HTTP Header to every response.</p><ol><li>Go to your newly create Endpoint in the Azure Portal</li><li>Click on Rules engine in the menu (under Settings)</li><li>We want to append a custom header to every response, so we want to use the Global rule rather than adding a new rule. Click on Add Action in the Global Rule and select Modify Response Header.</li><li>Enter values for the Modify response header fields. The examples below are for specifying a blazor-environment header with value CI:</li><li>Action: Append</li><li>HTTP Header Name: blazor-environment</li><li>HTTP Header Value: CI</li><li>Click on Save in the top menu bar. The portal will inform you that it is saving your endpoint changes. It can take up to 10 minutes for the changes to propagate, so grab some more coffee or read a book for a bit.</li></ol><h3>Azure front door</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7pXLHUe2OK17oCbQ25YLhg.png" /></figure><p>Microsoft Azure provides a wide suite of services to make your sites and services highly available across geographic regions. Since Azure Front Door became Generally Available, there is often a question around what would be the right choice between Azure Front Door and Azure CDN delivery of your highly availability sites and content.</p><p>Why azure front door ?</p><p>But when you are working with larger documents, Front Door uses object chunking method to request the document in smaller parts.Front Door caches any chunks as they’re received so the entire file doesn’t need to be cached on the Front Door cache. Subsequent requests for the file or byte ranges are served from the cache.</p><p>Azure offers delivery of your sites and services through a CDN of Microsoft WAN Edges and in the process enhances the performance of your services in addition to providing high availability.</p><p>Azure Front Door routes incoming requests to a primary region. If the application running that region becomes unavailable, Front Door can fail over to the secondary region.</p><p>When you are requesting a large document, Azure Front Door uses object chunking method to request the document in smaller chunks and caches it. This process continues until the entire file is downloaded (if requested), all byte ranges are available (if requested), or the client terminates the connection.</p><p><strong>Scenario:</strong></p><p>have a Azure static website that will displaying the data (mainly office files and videos) from Azure blob storage. The files in blob storage will rarely change. I am looking for the best way and cheapest way to cache these files, so that files can be fetched quickly.</p><p><strong>Azure CDN</strong>:</p><ul><li>Azure CDN is globally distributed network of servers that can deliver content to the customers in a very large scale.</li><li>It is a <strong>video streaming platform</strong> where videos are delivered based on the customer’s nearest edge location.</li><li>Azure CDNs stores cached content on the edge servers which results in minimizing network latency.</li></ul><p><strong>Azure Front door</strong>:</p><ul><li>It provides <strong><em>Scalable, secure and fast delivery of your global applications</em></strong> .</li><li>It enables you to define, manage, and monitor the global routing for your web traffic.</li><li>It provides best performance and instant global failover for <strong>high availability.</strong></li></ul><p><strong>Based on your scenario, that best caching you can use is Azure CDN due to the following:</strong></p><ul><li>Azure CDN is best for delivering <strong>static content</strong> like Videos, Images and PDFs whereas Azure Front Door is for delivering sites, services and APIs.</li><li>Azure CDN is <strong>cost-effective</strong> whereas Azure Front Door charges per ruleset.</li><li>Azure CDN does all the functionality similar to Azure Front Door.</li><li>Azure CDN performs a good job at content delivery at a <strong>cheaper price!</strong>.</li></ul><h4><strong>Hand-On:</strong></h4><ol><li>lets create a blob storage account in central us and then create a container inside it where we can upload the file and change the access level to container level</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MUVjh7huQ1T1d1EsvraCw.png" /></figure><p>2. Inside the storage account we can see a CDN</p><p>here the origin hostname will be the blob and pricing tier we can go with the standard one</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVRNFmRa8HeUiYDYIs9GKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*v2ph33anCTMCjAn11KvxMg.png" /></figure><p>we can access the website now using the CDNendpoint</p><p>CDN Hand-on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lq0h5490puA7ehuvupi6OQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*yzMCCHzQZKJqPEtZy6cvkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*nGtPM4VyAngIsDD4_SpnKw.png" /></figure><p>Once the CDN profile is created follow the below steps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FiKIiiKrKLTXe7mP7jAilg.png" /></figure><p>once everything is ready make sure that in container we enable from all networks on the storage section.</p><p>In order to render the application through cdn use the cdn endpoint/filename.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*oz0t3Lnv1bATDLU8Iov1LQ.png" /></figure><ul><li>we have a rule engine to set the cache expiration time and all</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgFiYATEmQrnJjOnbLVFYw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47cf181a0f95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Load Balancer]]></title>
            <link>https://medium.com/@arjunpt2006/azure-load-balancer-bf846e2e674c?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf846e2e674c</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 03:41:16 GMT</pubDate>
            <atom:updated>2023-06-19T04:14:25.929Z</atom:updated>
            <content:encoded><![CDATA[<p>A load balancer accepts incoming traffic from clients and routes requests to its registered targets (such as EC2 instances) in one or more Availability Zones. The load balancer also monitors the health of its registered targets and ensures that it routes traffic only to healthy targets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*O3BmtQLCjjlMXNvd5PMicw.png" /></figure><p><strong>Types:</strong></p><ol><li>Azure load balancer</li><li>Application Gateway</li><li>Traffic Manager</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NyU2tWbITl6DkWNXcDCSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEcfiTOMLpmDZCzv1Eeihg.png" /></figure><h3><strong>Application Gateway :</strong></h3><p><strong>Application gateway</strong> is a layer 7 <strong>load balancer</strong>. It can route traffic based on URL paths and can perform SSL termination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddCf69GsO81D80EfsF5kow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1UYMooMUsON-qTieLbsSkQ.png" /></figure><p><strong>Basic:<br></strong>subscription<br>Resource group<br>region<br>enable autoscaling<br>minimum instance count<br>application gateway name</p><p><strong>Frontend:<br></strong>frontend IP address type: public, private, both<br>public IP address: Add new (just give the name)</p><p><strong>Backend :<br></strong>add backend pool: add the VM we created for assigning loadbalancer and backend pool name</p><p><strong>Configuration</strong>:<br>we have the frontend and backen pool<br>add routing rule: rule name , frontend IP, backend target — backend target name<br>create the backend setting: where we have backend settings name, timeout limit, cookie based affinity enabling</p><h3><strong>2. Traffic Manager</strong></h3><ul><li>works by using DNS to direct the end user request the most appropriate endpoint</li><li>select endpoint based on the configured traffic routing method</li><li>provide endpoint health check and automatic failover</li></ul><h4>Routing methods:</h4><ul><li>when traffic manager configure for priority routing. it contain prioritized list of endpoints</li><li>traffic will route to primary which has the highest priority if it is not available then traffic manager will sent to second endpoint and so on</li><li>it support failover as well. if we have LB in east us and west us</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8CeT3_dIzSWu5fuy9B9fog.png" /></figure><p><strong>Perfomaence Routing:</strong></p><ul><li>Designed to improve the responsiveness By distributing traffic to the closest endpoint</li><li>Determine the closeness by measuring the network latency. like lookup IP range and the datacenter range</li></ul><p><strong>Geographic Routing:</strong></p><ul><li>Routing based geographic endpoint</li><li>there will be nested profile ie, endpoint 1 with specified location have more priority and in nested profile we can configure two regions</li></ul><p><strong>Weighted traffic:</strong></p><ul><li>we can configure weight from 1 to 1000</li><li>Higher the weight then higher is the priority</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tMsErtryyqVeE6xD8Us7tQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bVXxg1oJWkAbB2Ng44TDxw.png" /></figure><h3>3. Azure load balancer:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iZ0A5WLgO9sZfQPQe5q_iA.png" /></figure><p><strong>Public load balancer:</strong><br>You can use external load balancer to provide high availablity for vms accessed from public internet. For the VMs the request will be coming from the internet throug pulbic IP so it should be public load balancer<br><strong>Internal load balancer:<br></strong>You can use internal load balancer to provide high availablity for VM accessed from other servies in your Vnet. this loadbalancer communicate through a private IP. if we want to have database load divided then go with internal load balancer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*1cUJSU2fiPX3oRxI-V1lEQ.png" /></figure><ul><li><strong>Parameters:<br></strong>subscription<br>resource group<br>name<br>region<br>type: internal or public<br>publicIPaddress name:<br>assignment: dynamic or static (static for loadbalancer)<br>add IPv4 or IPv6: no/yes</li><li>Once the load balancer is created we need to add the Vms to the backend pool<br>loadbalancer -&gt; backendpool -&gt;add backend pool<br><strong>name: </strong><br><strong>Associated to</strong>: avaialblity set, single vitual machine, virtual machine scaleset. we have choose availablity set at the creation of VM<br><strong>availability set</strong>: choose the availablity set and add the VM</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*dEjnwTIt3R3QRHMNFLTs1Q.png" /></figure><h4><strong>Health probe:</strong></h4><p>load balancer will freuquently check to find whether the VM are up and running fine. if it didnt get success response it will stop forwarding traffic to VM<br><strong>Name:</strong><br><strong>protocol:</strong> TCP or HTTP (HTTP will have a path field)<br><strong>interval:</strong> 5<br><strong>Unhealthy Threshold</strong>: 2 ( In 5 sec if find 2 consecutive repsonse as fail then it will not consider that VM)</p><h4><strong>Load balancing rules:</strong></h4><p><strong>frontend IP address:</strong> where the request come on the particular IP<br><strong>port</strong>: on this particular port<br><strong>backendport</strong>: request will forward to backend VM on port 80<br><strong>Healthprobe:</strong> rule to check with consecutive interval<br><strong>session persistance</strong>: Client IP , client and protocol(request will be always same on that port and IP) ( client IP — wich VM used for serving the 1st time it should be used for the subsequent request there should be no change)</p><p>Using a Standard <strong>SKU</strong> load <strong>balancer</strong>, it offers more features and functionality, such as a larger backend pool <strong>size</strong> and Availability Zones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*fXkC0VF5wMz9NTiziYktbA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf846e2e674c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Storage]]></title>
            <link>https://medium.com/@arjunpt2006/azure-storage-7e7188797e64?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e7188797e64</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 17:33:50 GMT</pubDate>
            <atom:updated>2023-06-18T17:33:50.419Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuq7vnJIfjZNwLKk1gBKfg.png" /></figure><p><strong>Why storage ?</strong><br>image and video doesn’t have structure so cant stored on database<br>so we need a storage</p><ul><li>storage is used to store object which are random in nature such as picture, videos, music etc.</li><li>databases are used to data or record, which are more related to each other, which may change with time and can be updated</li></ul><p><strong>Azure storage:</strong></p><ul><li>its a service from azure</li><li>azure storage is a cloud storage solution for modern application that rely on durability, availability and scalability to need need of customers</li><li>storage -&gt; add -&gt; name (storage name)-&gt; account type(general purpose/ blob)-&gt; location-&gt; storage encryption -&gt; susbscription (pay as you go, free tier )-&gt; resource group-&gt;replication (ZRS, LRS,GRS)</li><li>once created we can see overview, IAM, access keys, tags, services(blob, files, table, queues)</li></ul><p><strong>components of azure storage:<br>BLOB:</strong></p><ul><li>Azure blob stotage is a service that store unstructured data</li><li>blob storage can store any type of text or data such as document, media files or applcaition installer.</li><li>blob storage is referred to as object storage</li><li>This is like s3 service in aws</li><li>container are the folders that we have inside the blob</li><li>storage account -&gt;services -&gt;block-&gt; create container (name and give the access type as blob ( we have private , blob and container)</li></ul><p><strong>Multiple access tiers based on usage pattern:</strong></p><ul><li><strong>Hot</strong> — optimized for frequently accessed object</li><li><strong>cool</strong> — optimized for storing larege amount of data that is infrequently accessed and stored for atlesast 30 days</li><li><strong>archive</strong> — optimized for data that can tolerate server hours of retrival latency and will remain in archive tied for at least 180 days</li></ul><p><strong>Queues:</strong></p><ul><li>it is a service for storing large number of messages that can be accessed from anywhere in world via http or https</li><li>A queue can contain million of messages up to the total capacity limit of a storage account</li><li>As soon as the message is processed it will be deleted from the queue</li><li>storage queue are separated into queues and queue consist of multiple messages</li><li>storage account -&gt;services -&gt;queue-&gt; create queue</li></ul><p><strong>Table storage:</strong></p><ul><li>A NoSQL store for schemaless storage of structed data</li><li>storage table separated into tables each contain rows of data</li></ul><p><strong>Filesystem:</strong></p><ul><li>we can actually mount it as a drive on computer or we can use its a s extended drive</li><li>a file storage share in an SMB file share in azure.</li><li>All directories and files must be created in parent share. an account can contain an unlimited number of shares and a share can store an unlimited number of files up to 5TB total of the file share</li><li>managed files shares for cloud or on-premises deployment</li><li>except of container we have shares and shares have files and folders</li></ul><p><strong>What is the difference between blob and file storage?</strong><br>Azure Blob Storage is an object store used for storing vast amounts unstructured data, while Azure File Storage is a fully managed distributed file system based on the SMB protocol and looks like a typical hard drive once mounted.</p><p><strong>storage perfomance tier:<br></strong>General purpose storage account configured either of the following perfomence tiers</p><ul><li>A standard performance tier for storing blob, files , tables queues and azure virtual machine disk</li><li>A premium performance tier for storing unmanaged virtual machine disk only</li></ul><p><strong>Data redundancy:</strong></p><p>Replicate mltiple copies of data</p><ul><li><strong>LRS :</strong>simple, low cost replication stratergy, data replicated within single storage unit</li><li><strong>ZRS: </strong>Replication for high availablity and durability, data is replicated synchronously across three availablity zones</li><li><strong>GRS :</strong>cross regional replication protect against region wide unavailability</li><li><strong>RA-GRS </strong>— cross regional replication with read access to the replicaiton</li></ul><h3><strong>storage portal features:</strong></h3><p><strong>overview:</strong> name, replication ,subscription, accountkind<br>activity log<br><strong>access control (IAM):</strong><br><strong>tags</strong><br><strong>data transfer</strong> : transfer frequency, estimated data size<br><strong>events:</strong><br><strong>storage explorer: </strong>we can manage all the data in blob, fileshare, queue, table like add edit and delete<br><strong>settings</strong>: Access keys (to authenticate your applciation while maeing request to strage account)<br><strong>configuration</strong> (cost on storage account depends upon the usage and option we choose — replciation strartergy, perfomance(standard or premium)<br><strong> shared access signature</strong>- similar to access keybut we can give perimssion like read , write, delete, list , create update for a period of time<br><strong> firewall and network</strong> — from where and when someone can access the storage account by giving the address range<br><strong>static website</strong> — for hosting static website like a signle page applciation<br> <br> <br><strong>Portal features BLOB:</strong><br><br><strong>blob : </strong>where we create container and mange files<br><strong>custom domain</strong> : if we need to connect the blob to custom domain<br><strong>soft delete</strong> : it enable your to save and recover blob data in many cases where bob or blob snapshot are deleted. versioning snapshot data will keep the copies<br><strong>azure CDN:</strong><br><strong>add azure search:</strong><br><strong>lifecycle management:</strong> blob are automatically move from hot to cool and from cool to archive then deleted after based on the modification date.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e7188797e64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Key Vault]]></title>
            <link>https://medium.com/@arjunpt2006/azure-key-vault-f6f5addd435d?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6f5addd435d</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 16:01:52 GMT</pubDate>
            <atom:updated>2023-06-18T16:01:52.323Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*-u_6XzAzTP983Mzyg_REhQ.png" /></figure><ul><li>Storage of key in config is not safe as it can see by others</li><li>In key vault we can store authentication, data encryption key, certificate key, storage account key and password</li><li>security administrator can grant and revoke permission to key vault</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWg5DdHGEkSREiIE1jlRzA.png" /></figure><p><strong>Benefits:</strong></p><ul><li>Increase security</li><li>reduce latency as we can congiure it any location</li><li>create and import encryption key in minute</li><li>application have no direct access to keys</li><li>simplify and automate the task for SSL/TLS certificate</li></ul><p><strong>How it works :</strong></p><ol><li>Application that need access to key vault are registered with azure active directory as service prinicpal<br> service principal means — it can contain serveral group and user to who permission need to be grnated</li><li>administrator will then create a key vault and set access control list on the vault so that the application can access it</li><li>application then authenticate with azure active directory and get the token</li><li>application then present this token to azure key vault</li><li>azure key vault the grant access based on the access control list</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OUroEATbP40_MYJBfitz4g.png" /></figure><p><strong>How to access key and secret:</strong></p><ul><li>To access key and secret users and application must have valid azure active directory token with sufficient permission to the target vault</li><li>we can use rest based api or azure power shell to retrieve the secrets and public key in json format from key vault</li></ul><p><strong>Demonstration of the key vault creation :</strong></p><ol><li>First we have to register the application then only we can see the application in autorized application while creating the key vault</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mhyCUSUjaOuHGcLEwEVbXw.png" /></figure><p>2. we can set the permission for the api access add the key there with duration for the keys</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*OsUkKBzNrG0CTAsZd72Npg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*OK_4bEywXrEjPwPDSNCLgw.png" /></figure><p>3. Now we have to create the key vault</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNFBkOesPkWk4QjWP4ZF1A.png" /></figure><ul><li>we will add the users from the select principal section</li><li>we can configure the permission from the template section or by manual process</li><li>We can add the application in the authorized application section</li><li><strong>Template include</strong>: azure storage permission, secret management permission, key secret and certificate management permission<br>share point permission etc.</li><li><strong>manual key permission:</strong> include create, import, delete, recover, backup , restore, get , list , update</li></ul><p>4. Once the vault is created we can add and update the keys</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*M8RuLa6012hPDyuwItoHqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*sYU0ThtliRJELFeTwwlpQA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6f5addd435d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Azure Active Directory:]]></title>
            <link>https://medium.com/@arjunpt2006/managing-azure-active-directory-9e45a7b314da?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e45a7b314da</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 09:11:05 GMT</pubDate>
            <atom:updated>2023-06-17T09:11:05.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*ThE3n0Cj7dhIPJZgLSz8vg.png" /></figure><p>The Azure Active Directory (Azure AD) enterprise identity service provides single sign-on and multi-factor authentication to help protect your users from 99.9 percent of cybersecurity attacks.</p><p>Some important points for the Azure Active directory.</p><p>1. Azure Active Directory is Microsoft’s multi-tenant cloud-based directory.<br>2. It Provides single sign-on for all applications.<br>3. Its a simple to use the IDM solution.<br>4. It provides MFA, device registration. self-service password management, Role-Based access control, and alerting.<br>5. It helps in streamlining your IT processes.<br>6. And the best part is, you can integrate Azure AD with Windows server AD.</p><h3>Scenario:</h3><p><strong>myk8s</strong> Corporation wants to take advantage of Azure AD Premium features like custom domain and provisioning self password reset.</p><p>Domain name: <strong>myk8s.space</strong></p><p>Service to be used: <strong>Azure active directory.</strong></p><h3>Solution:</h3><p>1. Create a new Azure AD tenant &amp; add a custom domain.<br>2. Activate Azure AD Premium v2 trial<br>3. Create and configure Azure AD users<br>4. Assign Azure AD Premium v2 licenses to Azure AD users<br>5. Manage Azure AD group membership<br>6. Configure self-service password reset functionality</p><p><strong>Video 1: Configure Azure Active Directory tenant and add a custom domain.</strong></p><ul><li>Domain should own by us.</li><li>we need to add the entry on DNS zone to prove ownership.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAbJ27PTSAA0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAbJ27PTSAA0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAbJ27PTSAA0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4f2b7f57e5f25d2af03e478afa27db7/href">https://medium.com/media/f4f2b7f57e5f25d2af03e478afa27db7/href</a></iframe><p><strong>Video2: Add active directory license and update license assignments</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FC39_pYjOXN8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DC39_pYjOXN8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FC39_pYjOXN8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/afe3b12244d2cce15e04e65429c9a745/href">https://medium.com/media/afe3b12244d2cce15e04e65429c9a745/href</a></iframe><p><strong>Video3: Enable Self service password reset for users in Active directory</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuDTPgQObFcc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuDTPgQObFcc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuDTPgQObFcc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/98b46ba6909e19fc282f50617bfd21c9/href">https://medium.com/media/98b46ba6909e19fc282f50617bfd21c9/href</a></iframe><p><strong>Some more important facts.</strong></p><ol><li>Azure Active Directory completely different from what we can do with windows AD.</li></ol><p>2. As soon as you sign up for a subscription, tenant created and you are using Azure Active Directory.</p><p>3. Azure Active Directory designed for internet-based apps using http and https protocol.</p><p>4. It can not be queried through LDAP.<br>5. It can be used with REST API, Instead https and https protocol XAML, Ws federation, OpenID for authentication.</p><p>6. It does not use Kerberos based authentication.</p><p>7. No OU or group policy objects are available in Azure Active Directory.</p><p>8. It comes in four editions:-</p><ul><li>Free</li><li>Basic</li><li>Premium P1</li><li>Premium P2</li></ul><p>ADD USER ACCOUNT FOR EMPLOYEES:</p><ul><li>Choose domain suffix from custom domains</li><li>set properties as desired like password first name and all</li><li>Home -&gt; default directory -&gt; users -&gt; add user</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*fvV_v8s4hs_Cl_hocGzwbA.png" /></figure><ul><li>Once the user is created we can assign the role, groups and permissions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*rvn3dsdQFwh2y4hW6o9gdg.png" /></figure><ul><li>This is how we create a bulk user using the csv file. we can do the bulk import to a specific group as well</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pv8lRygj_3fE1le6-64KXA.png" /></figure><p>ADD GUEST ACCOUNT FOR NON EMPLOYEES:</p><ul><li>They are sent an email invitation</li><li>guest can belong to any security role</li><li>Home -&gt; default directory -&gt; new guest users -&gt; add user</li><li>Same UI of the user creation</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e45a7b314da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy a highly scalable, reliable and secure Website on AWS using Elastic File System]]></title>
            <link>https://medium.com/@arjunpt2006/deploy-a-highly-scalable-reliable-and-secure-website-on-aws-using-elastic-file-system-ca332f158cd5?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca332f158cd5</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Thu, 15 Jun 2023 19:49:40 GMT</pubDate>
            <atom:updated>2023-06-15T19:49:40.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWNDNmGDPEQS2rwlQ7S9RA.png" /></figure><h3><strong>Services:</strong></h3><ul><li>Route53</li><li>cloudfront</li><li>S3 bucket</li><li>Internet gateway</li><li>NAT instance</li><li>Application load balancer</li><li>Auto Scaling</li><li>Redis</li><li>EFS</li><li>Custom VPC</li><li>MariaDB database</li></ul><ol><li><strong>VPC creation :</strong></li></ol><pre>tag name: wpvpc<br>IPV4 CIDR block: 10.0.0.0/20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RVCREZB_mAFqR-LRSgrFag.png" /></figure><p>2. <strong>Subnet creation :</strong></p><pre>tag: public-us-east-1a<br>vpc: wpvpc<br>zone: us-east-1a<br>IPv4 CIDR block: 10.0.0.0/24<br><br><br>tag: public-us-east-1b<br>vpc: wpvpc<br>zone: us-east-1b<br>IPv4 CIDR block: 10.0.1.0/24<br><br><br>tag: public-us-east-1c<br>vpc: wpvpc<br>zone: us-east-1c<br>IPv4 CIDR block: 10.0.2.0/24<br><br><br>tag: private-us-east-1d<br>vpc: wpvpc<br>zone: us-east-1d<br>IPv4 CIDR block: 10.0.10.0/24<br><br>tag: private-us-east-1e<br>vpc: wpvpc<br>zone: us-east-1e<br>IPv4 CIDR block: 10.0.9.0/24<br><br><br>tag: private-us-east-1f<br>vpc: wpvpc<br>zone: us-east-1f<br>IPv4 CIDR block: 10.0.8.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afV3oBidCroUQI3iulDuKA.png" /></figure><p>3. <strong>Route Table</strong></p><pre>tag: public-RT<br>vpc: wpvpc<br><br>tag: private-RT<br>vpc: wpvpc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*LwG1y5TSeYl-2e4wyOfLhg.png" /></figure><p>4. <strong>Subnet Association</strong></p><pre>Routetable-&gt;public-RT-&gt;subnetassocaition-&gt;edit subnet association -&gt; add the public subnet<br><br>Routetable-&gt;private-RT-&gt;subnetassocaition-&gt;edit subnet association -&gt; add the private subnet</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3xXHiD3nYn3lC87nJ0ANg.png" /></figure><p>5. <strong>Create gateway</strong></p><pre>name tag: wpIGW<br>attach to VPC: wpvpc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Saax20Q7N7wqz1BgbTbyw.png" /></figure><p>6. <strong>NAT instance:</strong></p><pre>AMI : community ami -&gt;amzn-ami-vpc-nat-hvm-2018<br>instance type: t2.mciro<br>configuration instance: <br>network-&gt; wpVPC<br>instance-&gt; public-us-east-1c<br>auto assingIP -&gt; enable<br>storage: default<br>tag: default<br>securitygroup:          <br>name: NAT-SG<br>type: all traffic<br>port range: 0 - 65535<br>soruce: anywhere</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcJdAv9TOKDoM73FXKGjcw.png" /></figure><p>7.<strong> Elastic IP</strong></p><pre>Allocate elastic IP<br>EC2-&gt;Elastic IP addresses-&gt;Allocate Elastic IP address<br>assicate elastic IP -&gt; choose NAT  instance</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fxwRx4LmAmwobIzuKzfww.png" /></figure><p>8. Route Table</p><pre>private-RT -&gt; edit route -&gt;add route -&gt; 0.0.0.0/0 and add target as instance ie NAT<br>public-RT -&gt; edit route -&gt; add route -&gt; 0.0.0./0 and add targe to internet gateway ie wpIGW</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3XBD2xLuxCs_cONEStXVQ.png" /></figure><p>9. <strong>VPC setting update</strong></p><pre>edit DNS hostname and enable edns hostname<br>edit DNS resoution and enable dns resolution</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*VhZMZ4xsNa7wR524fWiFjQ.png" /></figure><p>10. <strong>Create Security Group</strong></p><pre>name: web-public-sg <br>description: web-public-sg:<br>vpc: wpvpc<br>inbound: http: anywhere<br>   https: anywhere<br>   ssh  : aywhere<br><br>outbound: alltraffic<br><br><br>name: web-private-sg <br>description: web-private-sg<br>vpc: wpvpc<br>inbound: http: anywhere<br>   https: anywhere<br>   ssh  : aywhere<br>outbound: alltraffic<br><br><br>name: loadbalancer-SG<br>description: loadbalancer-SG<br>vpc: wpvpc<br>inbound: http: anywhere<br>   https: anywhere<br><br>outbound: alltraffic<br><br><br>name: EFS-SG<br>description: Elastic-filesystem-SG<br>vpc: wpvpc<br>inbound: NFS: web-public-sg and web-private-sg<br><br>outbound: alltraffic<br><br><br><br>name: RDS-SG<br>description: RDS-SG<br>vpc: wpvpc<br>inbound: MYSQL: web-private-sg and web-public-sg<br>  <br>outbound: alltraffic<br><br><br>name: Redis-SG<br>description: Redis-SG<br>vpc: wpvpc<br>inbound: TCP: 6379 web-public-sg and web-private-sg<br>  <br>outbound: alltraffic</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDwkrhpPsragMUkv4L8P4Q.png" /></figure><p>RESOURCE MAP:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6NW8JEQ5D2-wmXrtzWRSg.png" /></figure><p>11. <strong>Create RDS Database</strong></p><pre>engine: mariadb 10.3.8<br>template: free tier<br>name: worpdress-database-server<br>masterusername: wordpress<br>passowrd: wordpress<br>VPC: wpVPC<br>SG: RDS-SG<br>initialdatabasename: wordpress<br>backup: untick<br> </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OciyBXPtx8lBOSry7fqbUg.png" /></figure><p>12. <strong>EFS</strong></p><pre>choose VPC: wpVPC<br>create mount target: update with EFS-SG for all AZ</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCBnKBCO6dbVonvAeyRXdQ.png" /></figure><p>13.<strong> Elastic cache</strong></p><pre>engine: redis<br>name: wp-redis<br>descirption: wp-redis<br>nodetype: t2<br>replica:1 (by default)<br>untick multi-AZ failover (by default)<br>subnet: create-&gt; redissubnetforwp -&gt; wpvpc -&gt; choose all subnet<br>SG: redis-SG</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EubTGz6snjK4QjX2GVDx6w.png" /></figure><p>12. <strong>create master instance for installation of webserver</strong></p><pre>ubuntu/image/hvm-ssd-20.04<br>network: wpvpc<br>subnet: public us-east-1c<br>autassingIp: enable<br>SG: web-public-SG<br>name as master server<br>allocate elastic IP -&gt; associate IP -&gt; instance(master sever)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rez3nCCpZ_IzbriExWj57A.png" /></figure><p>13. <strong>SSH into the master server</strong></p><pre>apt-get update<br>mkdir /var/www/html</pre><p>14. <strong>Mount EFS and Add permanent mount of EFS</strong></p><pre>amazon ec2 mount instrcutions from console:<br><br>apt-get install nfs-common<br>df -h<br>sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 10.0.0.144:/ /var/www/html<br><br>vi /etc/fstab<br>fs-adad.efs.us-eas-1.camzon.com:/ /var/www/html nfs4 fnservs=4.1 ( we will get this from the efs isntrcution page od aws console)<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*4ZZAPUJwjYBhPxFNhAOxPg.png" /></figure><p>16. <strong>Configure Apache on master server</strong></p><pre>apt-get install apache2 libapache2-mod-php<br>systemctl status apache2<br>systemctl enable apache2<br>vi /etc/apache2/sites-available/wordpress.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LepCqupRNOj0vhrN9qC2AA.png" /></figure><p>17. Configure the configuration file</p><pre><br> &lt;VirtualHost *:80&gt;<br>  ServerAdmin webmaster@arjunawstraining.online<br>  ServerName  wordpress.arjunawstraining.online<br>  DocumentRoot /var/www/html/wordpress<br><br><br>&lt;Directory /var/www/html/wordpress&gt;<br>Options -Indexes -FollowSymLinks MultiViews<br>AllowOverride None<br>Order Allow,Deny<br>Allow from all<br>Require all granted<br>&lt;/Directory&gt;<br><br>&lt;/VirtualHost&gt;</pre><p>19. <strong>update the DNS in hostinger:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vzdje2Q-QtKcoQxpxm55Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJc-ICdiECVnNUrXXbGdmw.png" /></figure><p>20. Update the php.ini file</p><pre>Increase upload_max_filesize to 500M in php.ini<br>max_Execition time to 300<br>post_max_sie to 80 <br>restart apache</pre><p>21. Install the wordpress</p><pre>sudo apt-get install php libapache2-mod-php php-mysql php-cli php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-curl php-imagick -y<br><br>cd /var/www/html<br>rm index.html<br>apt install unzip<br>download wordpress &quot;wget https://wordpress.org/wordpress-5.4.12.zip&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XYDftWPlcErlUbymbFo89Q.png" /></figure><p>22. Configure the redis cache plugin on wordpress</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KG2p-N61Ku34J33P22O07A.png" /></figure><pre>chown -R www-data:www-data of wordpress direcotry<br><br>add below conde in wp-config.php if prompting you to configure ftp credentials<br>define(&#39;FS_METHOD&#39;,&#39;direct&#39;);<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbLnxOu2jgPdIKo37dxVmQ.png" /></figure><p>23. C<strong>reate s3 bucket for media</strong></p><pre>create -&gt; arjunmedia<br>untick all public access<br>create<br>click on the created bucket<br>permission -&gt;bucket policy<br>have an S3 bucket that is being used to host a static website. This example shows a policy that grants everyone access to the objects in the specified bucket (i.e. making the website public):</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gbhm4rfFO6TEcwQGc7BPlw.png" /></figure><p>add the below policy to the bucket</p><pre>{<br>  &quot;Version&quot;:&quot;2012-10-17&quot;,<br>  &quot;Statement&quot;:[{<br>     &quot;Sid&quot;:&quot;PublicReadGetObject&quot;,<br>     &quot;Effect&quot;:&quot;Allow&quot;,<br>     &quot;Principal&quot;: &quot;*&quot;,<br>     &quot;Action&quot;:[&quot;s3:GetObject&quot;],<br>     &quot;Resource&quot;:[&quot;arn:aws:s3:::arjunmedia/*&quot;]<br>  }]<br>}</pre><p>24. Attach the S3 to cloudfront distribution</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*IZXmbxeWb5WczgV6mLQKcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHuwcibZLPzHSNKUZhsjuw.png" /></figure><p>25. Create IAM Role for master server to access S3 and attach it to the instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjPsM0mqoukB6QZFJWIkig.png" /></figure><p>26. SSH to Server and configure the aws cli and set cronjob</p><pre>aws s3 ls<br>apt install awscli<br>aws s3 sync --delete /var/www/html/wordpress/wp-content/uploads s3://arjunmedia<br>crontab -e -&gt; which runs each minute<br>*/1 * * * * aws s3 sync --delete /var/www/html/wp-content/uploads s3://arjunmedia</pre><p>27 <strong>.htaccess for rewriting url to clodufront</strong></p><pre>Options +FollowSymlinks<br>RewriteEngine On<br>RewriteRule ^wp-content/uploads/(.*)$ https://d3uu43pytiov1b.cloudfront.net/$1 [R=301,nc]<br></pre><p>24 <strong>create AMI from master server if all good</strong></p><pre>action -&gt; image name: clonemasterAMI<br>go to AMI and check create or not</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h35bpq40Jn0CVyalFc_bKA.png" /></figure><p>25)<strong> Creat loadbalancer and target group</strong></p><pre>create application loadbalancer<br>name: wploadbalancer<br>az: check all<br>vpc: choose our vpc<br>SG: choose loadbancer SG<br>targetgroupname: wptagetgroup<br>interval: 15 sec<br><br>path: /health.html</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2lASOxeiMll-HBO1z2hWA.png" /></figure><p>26)launch configuration:</p><pre>create launch config<br>myami -&gt; choose our ami<br>name: wplaunchconfig<br>iam role: s3admin<br>ipadresstype: donot assing public ip to any instance<br>SG: web-private-sg - update the http and grrps to loadbalncer sg<br>create launch config<br>create ASG with this launch confg<br>groupname: wpautoscalinggrp<br>grpsize : 2 insance<br>subnet: choose 3 provate subnet</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxcXEu_jvx-WLUJ9XdtLzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PvhqjoNel2w7RCr-nn3tQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca332f158cd5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EBS provides block-level storage volumes to use with EC2 & Containers.]]></title>
            <link>https://medium.com/@arjunpt2006/ebs-provides-block-level-storage-volumes-to-use-with-ec2-containers-665abb372a01?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/665abb372a01</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 10:16:23 GMT</pubDate>
            <atom:updated>2023-06-12T10:19:01.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*kQxqIiUFD8RCDQkImZZUXA.png" /></figure><p>INTEGRATING EBS AND DATABASES FOR AN UPCOMING MICROSERVICE APPLICATION</p><ul><li>EBS provides block-level storage volumes to use with EC2 &amp; Containers.</li><li>These are the portable volumes, that we can directly mount volumes as devices in our EC2 or container instance .</li><li>These volumes are independent of EC2 or Containers life cycles. i.e if EC2 or container crashes. we have stored data available in volume .</li></ul><blockquote>Steps:</blockquote><ul><li>Create IAM Policy for EBS</li><li>Associate IAM Policy to Worker Node IAM Role</li><li>Install EBS CSI Driver</li></ul><blockquote>Create IAM Policy for EBS</blockquote><p>CSI Driver provides a way for the Kubernetes cluster to access the EBS volume. For that, We have to install the CSI driver to our cluster.</p><ul><li>Firstly, we have to create IAM policy for EBS.</li><li>Go to IAM dashboard, Click on create policy and select JSON tab.</li></ul><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ec2:AttachVolume&quot;,<br>        &quot;ec2:CreateSnapshot&quot;,<br>        &quot;ec2:CreateTags&quot;,<br>        &quot;ec2:CreateVolume&quot;,<br>        &quot;ec2:DeleteSnapshot&quot;,<br>        &quot;ec2:DeleteTags&quot;,<br>        &quot;ec2:DeleteVolume&quot;,<br>        &quot;ec2:DescribeInstances&quot;,<br>        &quot;ec2:DescribeSnapshots&quot;,<br>        &quot;ec2:DescribeTags&quot;,<br>        &quot;ec2:DescribeVolumes&quot;,<br>        &quot;ec2:DetachVolume&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;<br>    }<br>  ]<br>}<br><br>&amp; Click on Review Policy<br>* Name: Amazon_EBS_CSI_Driver<br>* Description: Policy for EC2 Instances to access Elastic Block Store<br>* Click on Create Policy</pre><blockquote>(2) Associate created the policy for Worker Node’s IAM Role.</blockquote><ul><li>You can find associated IAM role either from EKS Dashboard or using the command line</li></ul><pre>kubectl -n kube-system describe configmap aws-auth<br><br>* Go to Services -&gt; IAM -&gt; Roles<br>* Search for role with name eksctl-eksdemo1-nodegroup and open it<br>* Click on Permissions tab<br>* Click on Attach Policies<br>* Search for Amazon_EBS_CSI_Driver and click on Attach Policy</pre><blockquote>Deploy EBS CSI Driver.</blockquote><pre># Deploy EBS CSI Driver<br>kubectl apply -k &quot;github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=master&quot;<br><br># Verify ebs-csi pods running<br>kubectl get pods -n kube-system</pre><h3>EKS Storage — Storage Classes, Persistent Volume Claims</h3><blockquote>Storage:</blockquote><ul><li>Note: WaitForFirstConsumer mode will delay the volume binding and provisioning of a PersistentVolume until a Pod using the PersistentVolumeClaim is created.</li></ul><pre>apiVersion: storage.k8s.io/v1<br>kind: StorageClass<br>metadata:<br>  name: ebs-sc<br>provisioner: ebs.csi.aws.com<br>volumeBindingMode: WaitForFirstConsumer<br><br><br><br>#wait for consumer - it ng to dynamically provision the volume. in which az we dont know it can be us-east-1a or us-eas-1b. if volume in 1a nd pod in 1b then we have the issue so we havenew option waitforfirst consumer which mean whenver we provision the pod then only it will provsion the volume for that</pre><blockquote>PersistantVolumeClaim</blockquote><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: ebs-mysql-pv-claim<br>spec:<br>  accessModes:<br>    - ReadWriteOnce<br>  storageClassName: ebs-sc #strageclass name <br>  resources:<br>    requests:<br>      storage: 4Gi<br><br><br><br></pre><blockquote>ConfigMap</blockquote><ul><li>We are going to create a usermgmt database schema during the mysql pod creation time which we will leverage when we deploy User Management Microservice.</li></ul><pre>#which will be mounted in mysql deployment so that whenver mysql pod created automatically it need to create a small schema name user mgm schema. so whenver user mangment microserivce is deployed it is expected there will be schema in msql databse<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: usermanagment-dbcreation-script<br>data:<br>  mysql_usermgm.sql: |-<br>    DROP DATABASE IF EXISTS usermgmt;<br>    CREATE DATABASE usermgmt;</pre><blockquote>Create MySQL ClusterIP Service manifest</blockquote><ul><li>At any point of time we are going to have only one mysql pod in this design so ClusterIP: None will use the Pod IP Address instead of creating or allocating a separate IP for MySQL Cluster IP service.</li></ul><pre>apiVersion: v1<br>kind: Service<br>metadata: <br>  name: mysql<br>spec:<br>  selector:<br>    app: mysql<br>  ports:<br>    - port: 3306<br>  clusterIP: None #This means we are going to use pod Ip directly</pre><blockquote>Create MySQL Deployment manifest</blockquote><ul><li>Environment Variables</li><li>Volumes</li><li>Volume Mounts</li></ul><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: mysql<br>spec:<br>  replicase: 1<br>  selector:<br>    matchLabels:<br>      app: mysql #the same we have to define for the container related labels also<br>  template: <br>    metadata: <br>      labels: #doctionary<br>        app: myapp <br>    spec: #dicitionary<br>      containers: <br>      - name: mysql<br>        image: mysql:5.6<br>        env:<br>          - name: MYSQL_ROOT_PASSWORD<br>            value: dbpassword11<br>        ports:<br>          - containerPort: 3306<br>            name: mysql<br>        volumeMounts:<br>          - name: mysql-persistant-storage<br>            mountPath: /var/lib/mysql<br>          - name: usermanagment-dbcreation-script<br>            mountPath: /docker-entrypoint-initdb.d<br>      volumes:<br>        - name: mysql-persistant-storage<br>          PersistentVolumeClaim:<br>            claimName: ebs-mysql-pv-claim<br>        - name: usermanagment-dbcreation-script #mapping the user managment db creatoion script<br>          configMap:<br>            name: usermanagment-dbcreation-script<br><br></pre><blockquote>Connect to MySQL Database</blockquote><pre># Connect to MYSQL Database<br>kubectl run -it --rm --image=mysql:5.6 --restart=Never mysql-client -- mysql -h mysql -pdbpassword11<br><br># Verify usermgmt schema got created which we provided in ConfigMap<br>mysql&gt; show schemas;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=665abb372a01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CREATE CLUSTER USING eksctl and ClUSTER PRICING]]></title>
            <link>https://medium.com/@arjunpt2006/create-cluster-using-eksctl-and-cluster-pricing-b0a9836c48a3?source=rss-6ad2da0a6687------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0a9836c48a3</guid>
            <dc:creator><![CDATA[Arjun PT]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 03:49:34 GMT</pubDate>
            <atom:updated>2023-06-12T04:54:29.258Z</atom:updated>
            <content:encoded><![CDATA[<h3>CREATE CLUSTER USING eksctl and CLUSTER PRICING</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXGtnz-3XxS9V_IaZuW9rw.png" /></figure><h3><strong>Install aws CLI, Kubectl and eksctl :</strong></h3><ul><li><strong>install aws cli:</strong></li><li><strong>install kubectl cli:</strong></li><li><strong>install eksctl cli</strong></li></ul><p>Managing the workloads in EKS we need three type of CLI<br>1. <strong>AWS CLI: </strong><br> we can control multiple AWS service from the command line<br>2. <strong>Kubectl:</strong><br> we can control kueberntes cluster and objects using kubectl<br>3. <strong>eksctl:</strong><br> used for creating and deeting cluster on aws eks and alos we can create and delete the node groups. best tool for managing eks cluster on AWS</p><h3><strong>Step-01: Install aws cli:</strong></h3><h4>Download the binary and install via command line using below two commands.</h4><pre>curl &quot;https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&quot; -o &quot;awscliv2.zip&quot;<br>unzip awscliv2.zip<br>sudo ./aws/install<br><br>https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html</pre><h4>Verify the installation</h4><pre>aws --version<br>aws-cli/2.0.7 Python/3.7.4 Darwin/19.4.0 botocore/2.0.0dev11<br><br>which aws</pre><h4>Configure AWS Command Line using Security Credentials</h4><ul><li>Go to AWS Management Console → Services → IAM</li><li>Select the IAM User: Arjun</li><li>Important Note: Use only IAM user to generate Security Credentials. Never ever use Root User. (Highly not recommended)</li><li>Click on Security credentials tab</li><li>Click on Create access key</li><li>Copy Access ID and Secret access key</li><li>Go to command line and provide the required details</li></ul><pre>aws configure<br>AWS Access Key ID [None]: ABCDEFGHIAZBERTUCNGG  (Replace your creds when prompted)<br>AWS Secret Access Key [None]: uMe7fumK1IdDB094q2sGFhM5Bqt3HQRw3IHZzBDTm  (Replace your creds when prompted)<br>Default region name [None]: us-east-1<br>Default output format [None]: json</pre><ul><li>Test if AWS CLI is working after configuring the above</li></ul><pre>aws ec2 describe-vpcs</pre><h3>Step-02: Install kubectl CLI:</h3><ul><li>You can use the below documentation link to download the binary. This will help us to get the exact Kubectl client version based on our EKS Cluster version</li><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html">https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html</a></li></ul><pre># Download the Package<br>curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.1/2023-04-19/bin/darwin/amd64/kubectl<br><br># Provide execute permissions<br>chmod +x ./kubectl<br><br># Set the Path by copying to user Home Directory<br>mkdir -p $HOME/bin &amp;&amp; cp ./kubectl $HOME/bin/kubectl &amp;&amp; export PATH=$HOME/bin:$PATH<br><br># $HOME/bin path to your shell initialization file so that it is configured when you open a shell.<br>echo &#39;export PATH=$HOME/bin:$PATH&#39; &gt;&gt; ~/.bash_profile<br><br># Verify the kubectl version<br>kubectl version --short --client<br></pre><h3>Step-03: Install eksctl CLI:</h3><ul><li>For windows and linux OS, you can refer below documentation link. <a href="https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html#installing-eksctl">https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html#installing-eksctl</a></li></ul><pre># Download and extract the latest release of eksctl with the following command.<br>curl -sLO &quot;https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz&quot;<br><br>#Move the extracted binary to /usr/local/bin<br><br> mv /tmp/eksctl /usr/local/bin<br><br>#Test that your installation was successful with the following command.<br><br>eksctl version</pre><h3><strong>CLUSTER PRICING:</strong></h3><blockquote>Important EKS Pricing Note</blockquote><ul><li>EKS is not free (Unlike other AWS Services)</li><li>In short, no free-tier for EKS.</li></ul><pre>- We pay $0.10 per hour for each Amazon EKS cluster<br>- Per Day: $2.4<br>- For 30 days: $72</pre><blockquote>EKS Worker Nodes Pricing — EC2</blockquote><pre>- You pay for AWS resources (e.g. EC2 instances or EBS volumes) <br>- T3 Medium Server in N.Virginia<br>    - $0.0416 per Hour<br>    - Per Day: $0.9984 - Approximately $1<br>    - Per Month: $30 per 1 t3.medium server<br>- Reference: https://aws.amazon.com/ec2/pricing/on-demand/<br>- In short, if we run 1 EKS Cluster and 1 t3.medium worker node **continuously** for 1 month, our bill is going to be around $102 to $110<br></pre><blockquote>Important Notes</blockquote><ul><li>If you are using your personal AWS Account, then ensure you delete and recreate cluster and worker nodes as and when needed</li><li>We cant stop our EC2 Instances which are in Kubernetes cluster unlike regular EC2 Instances. So we need to delete the worker nodes (Node Group) if we are not using it during our learning process.</li></ul><h3>Create EKS Cluster &amp; Node Groups:</h3><blockquote>Step-01: Create EKS Cluster using eksctl</blockquote><ul><li>It will take 15 to 20 minutes to create the Cluster Control Plane</li></ul><pre># Create Cluster<br>eksctl create cluster --name=eksarjun1 \<br>                      --region=us-east-1 \<br>                      --zones=us-east-1a,us-east-1b \<br>                      --without-nodegroup <br><br># Get List of clusters<br>eksctl get cluster      </pre><blockquote>Step-02: Create &amp; Associate IAM OIDC Provider for our EKS Cluster</blockquote><ul><li>To enable and use AWS IAM roles for Kubernetes service accounts on our EKS cluster, we must create &amp; associate OIDC identity provider.</li><li>To do so using eksctl we can use the below command.</li></ul><pre># Template<br>eksctl utils associate-iam-oidc-provider \<br>    --region region-code \<br>    --cluster &lt;cluter-name&gt; \<br>    --approve<br><br># Replace with region &amp; cluster name<br>eksctl utils associate-iam-oidc-provider \<br>    --region us-east-1 \<br>    --cluster eksarjun1 \<br>    --approve</pre><blockquote>Step-03: Create EC2 Keypair</blockquote><ul><li>Create a new EC2 Keypair with name as kube-arjun</li><li>This keypair we will use it when creating the EKS NodeGroup.</li><li>This will help us to login to the EKS Worker Nodes using Terminal.</li></ul><blockquote>Step-04: Create Node Group with additional Add-Ons in Public Subnets</blockquote><pre># Create Public Node Group   <br>eksctl create nodegroup --cluster=eksarjun1 \<br>                       --region=us-east-1 \<br>                       --name=eksarjun1-ng-public1 \<br>                       --node-type=t3.medium \<br>                       --nodes=2 \<br>                       --nodes-min=2 \<br>                       --nodes-max=4 \<br>                       --node-volume-size=20 \<br>                       --ssh-access \<br>                       --ssh-public-key=kube-arjun \<br>                       --managed \<br>                       --asg-access \<br>                       --external-dns-access \<br>                       --full-ecr-access \<br>                       --appmesh-access \<br>                       --alb-ingress-access </pre><blockquote>Step-05: Verify Cluster &amp; Nodes</blockquote><ul><li>Verify the node group subnet to ensure it created in public subnets</li><li>Go to Services -&gt; EKS -&gt; eksdemo -&gt; eksdemo1-ng1-public</li><li>Click on Associated subnet in Details tab</li><li>Click on Route Table Tab.</li><li>We should see that internet route via Internet Gateway (0.0.0.0/0 -&gt; igw-xxxxxxxx)</li><li>List worker nodes</li></ul><pre># List EKS clusters<br>eksctl get cluster<br><br># List NodeGroups in a cluster<br>eksctl get nodegroup --cluster=&lt;clusterName&gt;<br><br># List Nodes in current kubernetes cluster<br>kubectl get nodes -o wide<br><br># Our kubectl context should be automatically changed to new cluster<br>kubectl config view --minify</pre><ul><li>Verify Worker Node IAM Role and list of Policies</li></ul><pre>Go to Services -&gt; EC2 -&gt; Worker Nodes<br>Click on IAM Role associated to EC2 Worker Nodes</pre><ul><li>Verify Security Group Associated to Worker Nodes</li></ul><pre>Go to Services -&gt; EC2 -&gt; Worker Nodes<br>Click on Security Group associated to EC2 Instance which contains remote in the name.</pre><ul><li>Login to Worker Node using Keypai kube-demo</li></ul><pre>ssh -i kube-demo.pem ec2-user@&lt;Public-IP-of-Worker-Node&gt;</pre><ul><li>Update Worker Nodes Security Group to allow all traffic</li></ul><pre>We need to allow All Traffic on worker node security group</pre><p>Reference:</p><ul><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html">https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html</a></li><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html">https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html</a></li></ul><h3>Delete EKS Cluster &amp; Node Groups</h3><blockquote>Step-01: Delete Node Group:</blockquote><ul><li>We can delete a nodegroup separately using below eksctl delete nodegroup</li></ul><pre># List EKS Clusters<br>eksctl get clusters<br><br># Capture Node Group name<br>eksctl get nodegroup --cluster=&lt;clusterName&gt;<br>eksctl get nodegroup --cluster=eksarjun1<br><br># Delete Node Group<br>eksctl delete nodegroup --cluster=&lt;clusterName&gt; --name=&lt;nodegroupName&gt;<br>eksctl delete nodegroup --cluster=eksdemo1 --name=eksarjun1-ng-public1</pre><blockquote>Step-02: Delete Cluster</blockquote><ul><li>We can delete cluster using eksctl delete cluster</li></ul><pre># Delete Cluster<br>eksctl delete cluster &lt;clusterName&gt;<br>eksctl delete cluster eksdemo1<br></pre><blockquote>Note-1: Rollback any Security Group Changes</blockquote><ul><li>When we create a EKS cluster using eksctl it creates the worker node security group with only port 22 access.</li><li>When we progress through the course, we will be creating many NodePort Services to access and test our applications via browser.</li><li>During this process, we need to add an additional rule to this automatically created security group, allowing access to our applications we have deployed.</li><li>So the point we need to understand here is when we are deleting the cluster using eksctl, its core components should be in same state which means roll back the change we have done to security group before deleting the cluster.</li><li>In this way, cluster will get deleted without any issues, else we might have issues and we need to refer cloudformation events and manually delete few things. In short, we need to go to many places for deletions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0a9836c48a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>