<?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 Leon B. on Medium]]></title>
        <description><![CDATA[Stories by Leon B. on Medium]]></description>
        <link>https://medium.com/@leon_b.?source=rss-c780fe27f09f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZppdQx9qwUorkMMP</url>
            <title>Stories by Leon B. on Medium</title>
            <link>https://medium.com/@leon_b.?source=rss-c780fe27f09f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 03:50:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leon_b./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[Active Directory Setup with Azure]]></title>
            <link>https://medium.com/@leon_b./active-directory-7ffb4955eaff?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ffb4955eaff</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[virtualization]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 00:14:10 GMT</pubDate>
            <atom:updated>2025-04-26T20:11:59.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aabelCzOd3NOtHGrxt6IhQ.jpeg" /></figure><p>Projects Overview: In this project we will be using Microsoft Azure to host our Virtual Machines in order to complete this project. We will be connecting to our VM’s by RDP, and install and Setup Active Directory. We will create Organizational Units, users, Administrators, and a domain controller. Next we will create a domain and allow a computer to join that domain. We will install a script that will create 10,000 users and implement a password for all users and have each user join the Employee OU. Lastly we will implement password policies for all users and purposefully enter wrong passwords to lock a user account and reset it due to the custom configured password policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jKt7RQ5Sx1TlY8ILDTwLfA.png" /></figure><p>● Lets start our lab by creating a resource group in Azure to host all our our resources we are going to create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*cfIH0NoA4ReuRNWwJ43kBQ.png" /></figure><p>● We will need to create our virtual network to allow communication for our resources to communicate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcVX2-IRmF59gkpEb_Sk7w.png" /></figure><p>● A virtual machine will be needed to create our user account computer that will basically be the ADMIN account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*Uj274IuvqTsRFAtdrRLb1Q.png" /></figure><p>●When configuring our VM we need to allow port 3389 which is RDP. RDP is allowing us to connect and control another computer remotely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*W4mYu5czbldqvXeI2SExYA.png" /></figure><p>●Use an existing License.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1IXSZdgmzO0nQQ6So7Nurg.png" /></figure><p>● Create the VM!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kENI0ueg1FPotv6RrbeJ4A.png" /></figure><p>● Now we can create another VM and this will be our test or user account.(Think of this as a user in the Finance or health department employee)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*jldCfduQYSaZqs7R2cDQZw.png" /></figure><p>●For this instance we will choose the image type Windows 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*UNj5pdH5Bj2foLE_ncnE6g.png" /></figure><p>●Don’t forget to allow RDP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_oNxdlb9CSZ8AVJkcDX6g.png" /></figure><p>● For our first VM created we edit the IP Configuration and will allow static IP address so this way we can enable RDP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8PNxD7T1RGExwZlaswlpDg.png" /></figure><p>IF YOU ARE USING A WINDOWS COMPUTER TO DO THIS LAB WINDOWS 11, THEN YOU NEED TO INSTALL REMOTE DESKTOP. After you install Remote Desktop then you will add both VM’s you created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TIKsKWgD20HO-ZER" /></figure><p>●On the first VM we click on add roles and features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*PM8c8b-xio8-DoMU" /></figure><p>●Next we want to configure and add roles and features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/0*HM25zF2AJbdFP-sS" /></figure><p>●Begin installing roles and features and keep hitting next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*mrhy5p-y5WJ6Uapz" /></figure><p>●Add active directory domain services and hit next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9cFKMaYg3mJ52BP4" /></figure><p>●Restart if required enabled and finish the install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eTihVtPu1qnfnIr0" /></figure><p>● Create a domain controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*esBeAnTGGovEXMbg" /></figure><p>●Active directory isn’t a domain controller yet so we will have to add a new forest and create a domain name.com, HIT next once you created a name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/0*bJjfl5JaF16wRagx" /></figure><p>●Now install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*ks8A3ECLKhNOd-b7" /></figure><p>●We have successfully installed our domain name to our controller, so now we can sign in with the domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/0*WiTDqTT2M_uLW9ST" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*FvUCFnqd3YMI_dkr" /></figure><p>●Next we can create a new organizational unit for our Employees under the new domain we have created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/0*pNBconkTYdGrpDUS" /></figure><p>●We need another organizational unit for Administrators under the same domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*LcE-Y3rhrwWtOVxV" /></figure><p>● In that Admin Organizational Unit you can right click and click on new user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/0*SQ3XdpnidMsDK_sR" /></figure><p>●So now we can create a new Admin user that will follow the domain login name, we will also add a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*DaJITSq1EaugWAeT" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*63N-litSK-qIvXn6" /></figure><p>●We can right click the user Mike in Admin and head over to the MEMBER OF and add the object called domain admins we will also check names and the group will be found. Click Ok</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/0*K4XEq0og7z_6qb38" /></figure><p>●Next we will sign in into our other VM and add the Client computer to join the domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/0*iPVo7khfxZhfoxNd" /></figure><p>●When I come back to the Active Directory controller VM I see that we have successfully added out Client1 computer to the domain because it has shown up present.</p><p>●Now we will sign back into our VM with Mike apple the administrator account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/0*NC7zd-FS9c8W2vIB" /></figure><p>●Now we will add domain users to the domain name we already created earlier. This will allow users to access this group by logging in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cn5pXIpspmAMNMqp" /></figure><p>Now lets open up powershell as an administrator, we will create a new file and paste the script and run it. This is a script that will create 10,000 users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*TJK3aOAAei_tu_W9rZwexg.jpeg" /></figure><p>●In our organizational unit of Employees, we can see the 10,000 users have been added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*SZb3A7fbKr_RA2fR" /></figure><p>●Now we are going to set a password policy and account lockout using Group Policy Management for our users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6YYnNq7uod0YMAKb" /></figure><p>●So now we will set the lockout policy. Now we can navigate by going to Computer configuration&gt; Policies&gt; Window Settings&gt; Security Settings&gt; Account Policies&gt; Account Lockout Policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JZH80h3dPDKy8cqX" /></figure><p>●We will configure our settings to lockout the account after 5 failed attempts/ lockout duration will be an 18 minute wait.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L8mCCPgd-CbetFzB" /></figure><p>●In our Admin account we will run the command to forcefully update the configuration changes we made. The Computer policy and User policy has both been successfully updated. The force update will update all policies old and new.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GTlxPaNVbP7XDX57HroFwg.jpeg" /></figure><p>●Now we can sign into a user and enter incorrect passwords purposefully and… after 5 attempts the account has successfully been locked out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*MP6gfwk6Aj55n87d" /></figure><p>●Now we will log back in as the Admin which is Mike, we will unlock our user “her.robe” account and allow the user to be able to use the account back again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9wEQq5ZDUSPHjgNP0z0LBw.jpeg" /></figure><p>●Now we can successfully log back in with the user “her.robe”……..IT WORKED!!!!!</p><p>Conclusion: Thank you for taking the time to view my lab on active directory using Azure Virtual machines. I hope you find this documentation informational and I hope it helps you. Any questions/comments/concerns you can message me on <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ffb4955eaff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lifecycle of a Ticketing System-osTicket]]></title>
            <link>https://medium.com/@leon_b./lifecycle-of-a-ticketing-system-osticket-87654f54980c?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/87654f54980c</guid>
            <category><![CDATA[ticketing-system]]></category>
            <category><![CDATA[helpdesk]]></category>
            <category><![CDATA[it-support]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[it]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sun, 16 Mar 2025 16:48:26 GMT</pubDate>
            <atom:updated>2025-04-26T20:12:35.951Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*tNIK2hPq1q7JaabgSNCYKA.png" /></figure><p>Project Outline: Here is a detailed tutorial of a ticket system lifecycle that is presented in a business big or small. The basic foundation skills of a ticketing system can allow you to branch out into much bigger operations of a larger business.</p><p>Prerequisites: Please refer to my previous documentation, which is a detailed setup of installing certain softwares and configurations to allow this project to happen.(<a href="https://medium.com/@leon_b./implementing-osticket-on-azure-virtual-machines-prerequisites-b69968f057b9">Click Here</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z6gu0Z-FeNsBfYgy" /></figure><p>● Now that we have osTicket up and running, we are able to create a ticket life cycle by creating users and tickets and how the issue of tickets are able to be resolved. This is the agent panel and our different access levels</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IptFw22LBARxWlW0" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*nox6HaBwkS3y3-E9MqPMtw.png" /></figure><p>●We will create a supreme admin with super user access to all permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1x0GT1C7hD4ZvNrK" /></figure><p>●Now lets build our departments by adding new ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b_gkOXFbtAe0KIUO" /></figure><p>● Create a system administrator department to handle and certain tickets that network, helpdesk, IT support technicians can’t touch or just have the general access in a business environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ecCwZwHf2RPGl5Uu" /></figure><p>●Next lets create the teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wYKvV2o-jBL35bu7" /></figure><p>●Healthcare team has been created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lPUzHnSA-wkEKg1Q" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*93i_86upAu2bLU_6" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QXpLzyTETvW5JTSg" /></figure><p>●We will create the user and we will give Joe the system admin department and super admin permissions and access. Joe will be assigned to the healthcare team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qEb4JZN2YzpCWGjP" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L8xB2EB4Q5k8b3WE" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/0*naFGqZgjm0qBH2Oz" /></figure><p>●We’ll create a second user and put Mary in the support department to view only the tickets and redistribute them as needed, and we are also going to setup her password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1_epcutOguelsAXL" /></figure><p>●Our agents</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/0*n9JGUGczV_HKG6_n" /></figure><p>●Here is a contact info setup for the users to email to for the ticketing system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L-qF2VylDA0zBie4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tbNwRgqjuUml-EWV" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*bAoIy9cm8zq8gs-T8iv4Ow.png" /></figure><p>●Creating an SLA agreement we are configuring with severity levels ranging from least to most severe with a certain amount of grace period time that this tickets have to be resolved. Severe A being the most important and severe c being least important. This will help classify the importance of issues that needs more attention or resolving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0JMKBlvTAxrbnUjK" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RTTFEW_1n2Ai00X-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/0*ihiZwTOmP2AEKXYV" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1fSAz_03GBmOf3dR" /></figure><p>● Now we have created 4 types of topic issues that can be used for a business to submit their Tickets. We created a personal computer issue, equipment needed, password reset, and business critical outage issue topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dOZsnzNNrupoeeWP" /></figure><p>●Now lets generate the tickets and see whats its like in real world application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*m9IXYtJ4snAqhJ9H" /></figure><p>●We will create a ticket and Roy will be our point of contact. Our topic will be report a problem. Include a summary of what is going on such as the issue. Create the ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Emlbt-2AOPQmlIcU" /></figure><p>●Lets login as our support technician which is Mary and view the ticket that came through. The ticket did come through from the end user and we are able to view the ticket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eMdGvsp-EN7-ajWf" /></figure><p>●Here is a detailed break down info of the Ticket that was put through and this is where the IT team and support specialist can contact the end user who puts through the tickets and give them constant updates of the issue being resolved.</p><p>Conclusion: And this is it. This is a simple setup of an Environment of a small business with the same concepts that can be applied to a much larger scale. The use of creating tickets and assigning roles is the resolution to a success in the IT department when it comes to resolving business issues and crisis. Thanks for sticking around in this tutorial and I hope this helps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87654f54980c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing osTicket on Azure Virtual Machines(prerequisites)]]></title>
            <link>https://medium.com/@leon_b./implementing-osticket-on-azure-virtual-machines-prerequisites-b69968f057b9?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b69968f057b9</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[it-support]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[ticketing-system]]></category>
            <category><![CDATA[helpdesk]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sat, 15 Mar 2025 04:08:12 GMT</pubDate>
            <atom:updated>2025-03-15T04:08:12.466Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Project Outline: </strong>In this documentation we will be going over the steps it takes to build and configure certain software applications in order to run a successful ticketing system called osTicket. This post will just be the prerequisites and installations needed complete an open-source ticketing system lab.</p><p><strong>Things You’ll need:</strong></p><p>●Azure Account | Virtual Machines | Windows 10 Operating System</p><p>●Remote Desktop | Internet Information Services(IIS) | PHP Manager</p><p>●IIS URL Rewrite Module 2 | Install Microsoft Visual C++ 2015–2022 Redistributable | MYSQL Server 5.5 | HeidiSQL | osTicket v1.15.8</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zxO9Lf9fNmHkiHRDuJXMvA.png" /></figure><p>●We will start out with an Azure Virtual Machine using a small compute size of 4 Gigabytes. We will keep the configurations basic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZJt2Z6vlE_LD3dlOtHgRg.png" /><figcaption>next</figcaption></figure><p>●Next we will copy public IP address to Remote Desktop the software so we can RDP into the VM machine to make a connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*jeCUtNjXLXyWOkDXY0m0QQ.png" /></figure><p>●Next we can open up control panel and click on programs to install the CGI program and IIS (Internet Information Services) on. Hit ok</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*uQAj_IPT2lKgVpuPfy9S1w.png" /></figure><p>●We can load the default webpage for IIS issues so type in 127.0.0.1 address in search bar, and IIS has been properly installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*uU05Fp50jMWAzCThYDFRLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*bJ6T01x0W877F3DrRXUoKA.png" /></figure><p>●Install and setup PHP manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Sduyvf3KjYTu4lsUOKdqvg.png" /></figure><p>●Install IIS URL Rewrite Module 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*z3mEGWyeY1iVcZYKbjj59w.png" /></figure><p>●Create a new PHP file and extract the php-7.3.8 file into the new PHP file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*2qJuh65vY0QjXzRm-90b5A.png" /></figure><p>● Install Microsoft Visual C++ 2015–2022 Redistributable (x86).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*J1JQJ8iGBezcT2mt-6V1Zg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*O7OC2_SbHsCdC6At0UGM6w.png" /><figcaption>Select Standard!!!!!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*8IM7-gmBBh0GvPDJTjf4Rw.png" /><figcaption>Use ROOT as the password for now.</figcaption></figure><p>●Next we will install MYSQL Server 5.5 for the storage database on the back end this will store all the data and the users accounts and even ticketing information. We need this to store the info. Hit next and Install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Zzk4hZMGzn9lIlhClIFUpA.png" /></figure><p>●Open up IIS and click on PHP manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*aeY6twlLTMYbP3DBKGRSXA.png" /></figure><p>●We are going to register PHP so we can have our web server aware of PHP. You will have to restart/start the IIS manager server so that the web server can be refreshed to make that awareness of PHP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWkgRrG0B4Dk2PNFCQusKg.png" /></figure><p>●Rename upload folder to osTicket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*WeGlKeOWW_UK3VmdAboS0g.png" /></figure><p>●Next open IIS and click on the http browser link on the right hand side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zzl0tyhe-ofvqLjf2Q8yGw.png" /></figure><p>●Our OTicket website works!! and it is running. We will need to enable more extensions because at the bottom there is a bunch of X’s. We will also add more extensions for more features and capabilities we can perform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5NO3p7gB3B4l1GIIq8YcGQ.png" /></figure><p>●Head over to PHP manager and we will enable extensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*Rl2UJMsAlsnUw_sMXvwv2g.png" /></figure><p>●Here are the extensions we will add on and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*yomCora8iU6Dg5izItbtnA.png" /></figure><p>●Head back to the browser and refresh the page and our extensions have been successfully added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*NzvLoZC4BgtO4YvLXoIS2A.png" /></figure><p>●We have to change our ost-sampleconfig.php file to rename to ost-config.php.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*gtZD63TcKMYx3h2Lf9rQlA.png" /></figure><p>●Remove all permissions in the same ost-config.php file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*pL4UegvUTHG8k05p7KpCSw.png" /></figure><p>●We will add new permissions and it will be for everyone (this is lab based, don’t do this in production).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*LZ7oNkGZ0WHsjrsUQ0wtmQ.png" /></figure><p>●Also we will check off all these boxes and hit ok for the same file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*2RN3FJ9nUY8VQa3scnVb9g.png" /></figure><p>●Login and put in your credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Pb_5ZH_tachVtMPWyZ_l7w.png" /></figure><p>●Install Heidisql application, this will make our connection to our database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*pgOHQ5dusEHq0Pmw3eC6Gg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*CzNpb8FLwptnRcWw_-H2TA.png" /></figure><p>●Click new and fill out the information to make the connection for the database and name our databse “osTicket” and hit ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*lAIsyqkx0m2GlP4D4fk2uQ.png" /></figure><p>●Now we can install osTicket application after filling out the Database settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*UVUgWp6jhgPo_fCyMzTy5Q.png" /></figure><p>●Installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*WC7o5-AKslUK6TQ0AJHOGw.png" /></figure><p>●Lets sign in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*c4Pdf8Olcv7j3JT1BJCIZA.png" /></figure><p>●Now we are finally in.</p><p>●<strong>Conclusions:</strong> Thank you all for joining in and following along. I hope you find these steps useful and able to follow the steps. This was just part 1 of the Ticketing Systems lab.You can reach me at my <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn</a> and view my <a href="https://github.com/Leonthelion22">Github.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b69968f057b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[-   ]]></title>
            <link>https://medium.com/@leon_b./-df9a91b728b0?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/df9a91b728b0</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sat, 15 Feb 2025 03:40:50 GMT</pubDate>
            <atom:updated>2025-02-15T03:40:50.845Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*63PEU5XxAxgYGY0Z7ZDZcA.jpeg" /></figure><h4><strong>Benefits of 2-Tier Architecture:</strong>A 2-tier architecture is like a simple way to build an application. Think of it as having two main parts: the front part that you interact with (like a website) and the back part where all the data is stored (like a database). This setup is easy to create and manage, making it great for smaller projects all the way to big enterprise businesses. It’s cost-effective, faster to deploy, and can perform many applications.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhHnnX6truNIb8lvK5A63Q.png" /></figure><pre># Provider and version and the region<br>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br># Define the VPC with a CIDR Block<br>resource &quot;aws_vpc&quot; &quot;leonvpc&quot; {<br>  cidr_block           = &quot;10.0.0.0/16&quot;<br>  enable_dns_support   = true<br>  enable_dns_hostnames = true<br>}<br><br># Public Subnets (for the EC2 instance)<br>resource &quot;aws_subnet&quot; &quot;publicsub1&quot; {<br>  vpc_id                  = aws_vpc.leonvpc.id<br>  cidr_block              = &quot;10.0.1.0/24&quot;<br>  availability_zone       = &quot;us-east-1a&quot;<br>  map_public_ip_on_launch = true<br>  tags = {<br>    Name = &quot;Publicsub1&quot;<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;publicsub2&quot; {<br>  vpc_id                  = aws_vpc.leonvpc.id<br>  cidr_block              = &quot;10.0.2.0/24&quot;<br>  availability_zone       = &quot;us-east-1b&quot;<br>  map_public_ip_on_launch = true<br>  tags = {<br>    Name = &quot;Publicsub2&quot;<br>  }<br>}<br><br># Private Subnets (For the Relational DataBase)<br>resource &quot;aws_subnet&quot; &quot;privatesub1&quot; {<br>  vpc_id            = aws_vpc.leonvpc.id<br>  cidr_block        = &quot;10.0.3.0/24&quot;<br>  availability_zone = &quot;us-east-1a&quot;<br>  tags = {<br>    Name = &quot;Privatesub1&quot;<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;privatesub2&quot; {<br>  vpc_id            = aws_vpc.leonvpc.id<br>  cidr_block        = &quot;10.0.4.0/24&quot;<br>  availability_zone = &quot;us-east-1b&quot;<br>  tags = {<br>    Name = &quot;Privatesub2&quot;<br>  }<br>}<br><br># Creating the Internet Gateway (for public subnet access)<br>resource &quot;aws_internet_gateway&quot; &quot;gw&quot; {<br>  vpc_id = aws_vpc.leonvpc.id<br>}<br><br># Creating a Route Table for the public subnets<br>resource &quot;aws_route_table&quot; &quot;public&quot; {<br>  vpc_id = aws_vpc.leonvpc.id<br>}<br><br>resource &quot;aws_route&quot; &quot;internet_access&quot; {<br>  route_table_id         = aws_route_table.public.id<br>  destination_cidr_block = &quot;0.0.0.0/0&quot;<br>  gateway_id             = aws_internet_gateway.gw.id<br>}<br><br># Associate  the route table with public subnets<br>resource &quot;aws_route_table_association&quot; &quot;publicassociation1&quot; {<br>  subnet_id      = aws_subnet.publicsub1.id<br>  route_table_id = aws_route_table.public.id<br>}<br><br>resource &quot;aws_route_table_association&quot; &quot;publicassociation2&quot; {<br>  subnet_id      = aws_subnet.publicsub2.id<br>  route_table_id = aws_route_table.public.id<br>}<br><br># Security Group for EC2 instances<br>resource &quot;aws_security_group&quot; &quot;webserver_secg&quot; {<br>  name        = &quot;webserver_secg&quot;<br>  description = &quot;Allow inbound traffic HTTP and SSH&quot;<br>  vpc_id      = aws_vpc.leonvpc.id<br><br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  ingress {<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br><br># Security Group for Relational Data Base MySQL<br>resource &quot;aws_security_group&quot; &quot;relationaldatabase_secg&quot; {<br>  name        = &quot;relationaldatabase_secg&quot;<br>  description = &quot;Allow inbound traffic MySQL&quot;<br>  vpc_id      = aws_vpc.leonvpc.id<br><br>  ingress {<br>    from_port   = 3306<br>    to_port     = 3306<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [aws_subnet.publicsub1.cidr_block, aws_subnet.publicsub2.cidr_block]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br><br># EC2 Instance 1 (EC2 instance in Public Subnet 1)<br>resource &quot;aws_instance&quot; &quot;leonEC21&quot; {<br>  ami                    = &quot;ami-085ad6ae776d8f09c&quot; # Update with a proper Amazon Linux AMI<br>  instance_type          = &quot;t2.micro&quot;<br>  subnet_id              = aws_subnet.publicsub1.id<br>  vpc_security_group_ids = [aws_security_group.webserver_secg.id]<br><br>  tags = {<br>    Name = &quot;leonEC21&quot;<br>  }<br><br>  user_data = &lt;&lt;-EOT<br>              #!/bin/bash<br>              yum install -y httpd<br>              service httpd start<br>              chkconfig httpd on<br>              EOT<br>}<br><br># EC2 Instance 2 (EC2 instance in Public Subnet 2)<br>resource &quot;aws_instance&quot; &quot;leonEC22nd&quot; {<br>  ami                    = &quot;ami-085ad6ae776d8f09c&quot; # Update with a proper Amazon Linux AMI<br>  instance_type          = &quot;t2.micro&quot;<br>  subnet_id              = aws_subnet.publicsub2.id<br>  vpc_security_group_ids = [aws_security_group.webserver_secg.id]<br><br>  tags = {<br>    Name = &quot;leonEC22nd&quot;<br>  }<br><br>  user_data = &lt;&lt;-EOT<br>              #!/bin/bash<br>              yum install -y httpd<br>              service httpd start<br>              chkconfig httpd on<br>              EOT<br>}<br><br># Create RelationalDatabase MySQL Instance <br>resource &quot;aws_db_instance&quot; &quot;mydb&quot; {<br>  identifier             = &quot;mydb&quot;<br>  engine                 = &quot;mysql&quot;<br>  engine_version         = &quot;5.7&quot;<br>  instance_class         = &quot;db.t3.micro&quot;<br>  allocated_storage      = 20<br>  db_name                = &quot;mydatabase&quot;<br>  username               = &quot;admin&quot;<br>  password               = &quot;password9999&quot;<br>  db_subnet_group_name   = aws_db_subnet_group.main.name<br>  vpc_security_group_ids = [aws_security_group.relationaldatabase_secg.id]<br>  multi_az               = false<br>  storage_type           = &quot;gp2&quot;<br>  skip_final_snapshot    = true<br>}<br><br># Data Base Subnet Group<br>resource &quot;aws_db_subnet_group&quot; &quot;main&quot; {<br>  name       = &quot;main-subnet-group&quot;<br>  subnet_ids = [aws_subnet.privatesub1.id, aws_subnet.privatesub2.id]<br><br>  tags = {<br>    Name = &quot;Main DataBase Subnet Group&quot;<br>  }<br>}</pre><h4>_____________________Code Breakdown______________________</h4><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}</pre><p>►This first set of code shows the AWS provider and sets the region to us-east-1. Make sure every resource created has to same location of us-east-1</p><pre>resource &quot;aws_vpc&quot; &quot;leonvpc&quot; {<br>  cidr_block           = &quot;10.0.0.0/16&quot;<br>  enable_dns_support   = true<br>  enable_dns_hostnames = true<br>}</pre><p>►The next block creates a VPC with a CIDR block 10.0.0.0/16, we will be enabling DNS support and DNS hostnames because instances in the VPC can be accessible using hostnames rather than IP addresses.</p><pre>resource &quot;aws_subnet&quot; &quot;publicsub1&quot; {<br>  vpc_id                  = aws_vpc.leonvpc.id<br>  cidr_block              = &quot;10.0.1.0/24&quot;<br>  availability_zone       = &quot;us-east-1a&quot;<br>  map_public_ip_on_launch = true<br>  tags = {<br>    Name = &quot;Publicsub1&quot;<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;publicsub2&quot; {<br>  vpc_id                  = aws_vpc.leonvpc.id<br>  cidr_block              = &quot;10.0.2.0/24&quot;<br>  availability_zone       = &quot;us-east-1b&quot;<br>  map_public_ip_on_launch = true<br>  tags = {<br>    Name = &quot;Publicsub2&quot;<br>  }<br>}</pre><p>►The next set of code resources is showing two public subnets within the VPC, each with a CIDR block and availability zone specified, you have to use the same location for availability zones and the only the only change was 1a and 1b. It cant be both 1a because the second subnet wont show up.</p><pre>resource &quot;aws_subnet&quot; &quot;privatesub1&quot; {<br>  vpc_id            = aws_vpc.leonvpc.id<br>  cidr_block        = &quot;10.0.3.0/24&quot;<br>  availability_zone = &quot;us-east-1a&quot;<br>  tags = {<br>    Name = &quot;Privatesub1&quot;<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;privatesub2&quot; {<br>  vpc_id            = aws_vpc.leonvpc.id<br>  cidr_block        = &quot;10.0.4.0/24&quot;<br>  availability_zone = &quot;us-east-1b&quot;<br>  tags = {<br>    Name = &quot;Privatesub2&quot;<br>  }<br>}</pre><p>►We will do the same thing again but for the private subnets, but these subnets will be for the relational database.</p><pre>resource &quot;aws_internet_gateway&quot; &quot;gw&quot; {<br>  vpc_id = aws_vpc.leonvpc.id<br>}</pre><p>►Creating the Internet Gateway for the VPC, allowing public subnets to access the internet.</p><pre>resource &quot;aws_route_table&quot; &quot;public&quot; {<br>  vpc_id = aws_vpc.leonvpc.id<br>}<br><br>resource &quot;aws_route&quot; &quot;internet_access&quot; {<br>  route_table_id         = aws_route_table.public.id<br>  destination_cidr_block = &quot;0.0.0.0/0&quot;<br>  gateway_id             = aws_internet_gateway.gw.id<br>}</pre><p>►This route table is created and a route that directs internet traffic (0.0.0.0/0) to the internet gateway.</p><pre>resource &quot;aws_route_table_association&quot; &quot;publicassociation1&quot; {<br>  subnet_id      = aws_subnet.publicsub1.id<br>  route_table_id = aws_route_table.public.id<br>}<br><br>resource &quot;aws_route_table_association&quot; &quot;publicassociation2&quot; {<br>  subnet_id      = aws_subnet.publicsub2.id<br>  route_table_id = aws_route_table.public.id<br>}</pre><p>►Associating the route table with the public subnets, enabling internet access for those subnets.</p><pre>resource &quot;aws_security_group&quot; &quot;webserver_secg&quot; {<br>  name        = &quot;webserver_secg&quot;<br>  description = &quot;Allow inbound traffic HTTP and SSH&quot;<br>  vpc_id      = aws_vpc.leonvpc.id<br><br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  ingress {<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><p>►This set of security group rules allows inbound HTTP (port 80) and SSH (port 22) traffic from any IP address and allows all outbound traffic.</p><pre>resource &quot;aws_security_group&quot; &quot;relationaldatabase_secg&quot; {<br>  name        = &quot;relationaldatabase_secg&quot;<br>  description = &quot;Allow inbound traffic MySQL&quot;<br>  vpc_id      = aws_vpc.leonvpc.id<br><br>  ingress {<br>    from_port   = 3306<br>    to_port     = 3306<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [aws_subnet.publicsub1.cidr_block, aws_subnet.publicsub2.cidr_block]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><p>►Next security group allows inbound MySQL (port 3306) traffic from the public subnets and allows all outbound traffic.</p><pre>resource &quot;aws_instance&quot; &quot;leonEC21&quot; {<br>  ami                    = &quot;ami-085ad6ae776d8f09c&quot; # Update with a proper Amazon Linux AMI<br>  instance_type          = &quot;t2.micro&quot;<br>  subnet_id              = aws_subnet.publicsub1.id<br>  vpc_security_group_ids = [aws_security_group.webserver_secg.id]<br><br>  tags = {<br>    Name = &quot;leonEC21&quot;<br>  }<br><br>  user_data = &lt;&lt;-EOT<br>              #!/bin/bash<br>              yum install -y httpd<br>              service httpd start<br>              chkconfig httpd on<br>              EOT<br>}</pre><p>►We are creating an EC2 instance in Public Subnet 1 with an Amazon Linux AMI and installs an Apache web server using the provided user data script.</p><pre>resource &quot;aws_instance&quot; &quot;leonEC22nd&quot; {<br>  ami                    = &quot;ami-085ad6ae776d8f09c&quot; # Update with a proper Amazon Linux AMI<br>  instance_type          = &quot;t2.micro&quot;<br>  subnet_id              = aws_subnet.publicsub2.id<br>  vpc_security_group_ids = [aws_security_group.webserver_secg.id]<br><br>  tags = {<br>    Name = &quot;leonEC22nd&quot;<br>  }<br><br>  user_data = &lt;&lt;-EOT<br>              #!/bin/bash<br>              yum install -y httpd<br>              service httpd start<br>              chkconfig httpd on<br>              EOT<br>}</pre><p>►Second resource creates an EC2 instance in Public Subnet 2 with an Amazon Linux AMI and installs an Apache web server using the provided user data script.</p><pre>resource &quot;aws_db_instance&quot; &quot;mydb&quot; {<br>  identifier             = &quot;mydb&quot;<br>  engine                 = &quot;mysql&quot;<br>  engine_version         = &quot;5.7&quot;<br>  instance_class         = &quot;db.t3.micro&quot;<br>  allocated_storage      = 20<br>  db_name                = &quot;mydatabase&quot;<br>  username               = &quot;admin&quot;<br>  password               = &quot;password9999&quot;<br>  db_subnet_group_name   = aws_db_subnet_group.main.name<br>  vpc_security_group_ids = [aws_security_group.relationaldatabase_secg.id]<br>  multi_az               = false<br>  storage_type           = &quot;gp2&quot;<br>  skip_final_snapshot    = true<br>}</pre><p>►Next resource creation will be a MySQL Relational Database instance with the specified settings, including the Database name, username, sizing,password, and subnet group.</p><pre>resource &quot;aws_db_subnet_group&quot; &quot;main&quot; {<br>  name       = &quot;main-subnet-group&quot;<br>  subnet_ids = [aws_subnet.privatesub1.id, aws_subnet.privatesub2.id]<br><br>  tags = {<br>    Name = &quot;Main DataBase Subnet Group&quot;<br>  }<br>}</pre><p>►This resource creates a Data base subnet group for the Relational data base instance, using the private subnets.</p><pre>terraform init<br>terraform validate<br>terraform fmt<br>terraform plan<br>terraform apply<br>terraform state list<br>terraform destroy</pre><p><strong>_________Once You are satisfied with the code we can begin________</strong></p><p>⦿<strong> init:</strong> this command initializes a Terraform configuration</p><p>⦿ <strong>validate:</strong> this command validates and checks the syntax errors and verifies the configuration files is acceptable arguments.</p><p>⦿ <strong>fmt: </strong>the format command will actually fix the files spacing and reformat as necessary</p><p>⦿ <strong>plan:</strong> this command will create an execution plan and show you what Terraform will do for you or what your desire was</p><p>⦿ <strong>apply:</strong>this command will apply all the configurations listed in the script and execute it</p><p>⦿ <strong>state list:</strong> this command will list all the resources created from the code you inputted</p><p>⦿ <strong>destroy:</strong> THIS IS THE LAST COMMAND WHEN YOU ARE FULLY FINISHED WITH YOUR PROJECT !! !! !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*C4sBMTm7ZN6WOsq12fwdEQ.png" /></figure><p>►I ran “terraform apply” and all my resources created with no BACKFIRE!! now I ran the “terraform state” list which will list all the resources I created in my IAC code block.</p><h4><strong>___________________Lets See What We Cooked Up_____________</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-6TqHfZMnv5Ml0fdoIIDw.png" /></figure><p>► Here is both the EC2 instances created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJb405Mpt-KS4N9BROLBgA.png" /></figure><p>► These are the Security group rules associated with the EC2 instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCPwk4Dbt7-X7_WwzR7E_A.png" /></figure><p>► All three security groups have been made for the VPC, EC2 instance, and Relational DataBase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQdlPou_4CsWmjabSCxBfQ.png" /></figure><p>►VPC has been created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*eFh8jE0DIImW_MqfI6M0mQ.png" /></figure><p>► Subnets have been created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrP15-090M6QAsVy51oAlA.png" /></figure><p>► DataBase created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0khr88Ihdt9oqrGBHFSbdQ.png" /></figure><p>► Route table also created with the subnet associations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66_lQMhWEI8dgq57sNan-w.png" /></figure><p>► Here is the resource map showing the VPC, subnets rout table, and the network connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*m3yi7k4VQx1R0Fg65rQbTg.png" /></figure><p>► I copied the public IP address from one of the EC2 instance and pasted into web browser… Apache Web server is up and running.</p><p>Thanks you all for looking at my post and I hope you learned from it. You can reach me on my <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn</a> and <a href="https://github.com/Leonthelion22">Github.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df9a91b728b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Auto Scaling Businesses With Terraform]]></title>
            <link>https://medium.com/@leon_b./auto-scaling-businesses-with-terraform-82e2becaa548?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/82e2becaa548</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 04:54:19 GMT</pubDate>
            <atom:updated>2025-02-09T04:54:19.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YBnxSVrZVqdblfVKpLsJfQ.jpeg" /></figure><p>Business Problem and Solution:An e-commerce company needs to handle a surge in traffic during the holiday season. The company wants to ensure that their website remains available and responsive to customers even during high traffic periods. In This project we are going to launch an Auto Scaling group that spans two subnets in the default VPC, ensuring high availability and fault tolerance. The Auto Scaling group will automatically scale up or down based on traffic, ensuring that the website remains responsive to customers at all times.</p><p><strong>main.tf (Terraform IAC)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdtuGygQN_dcP1HLp9BoMA.png" /><figcaption>Here is my main Terraform file with everything resource I needed for this project</figcaption></figure><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 5.0&quot;<br>    }<br>  }<br>}<br><br># Configure AWS Provider<br>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}<br><br>#Creating Subnets with  your Default VPC<br>resource &quot;aws_launch_template&quot; &quot;terraec2&quot; {<br>  name          = &quot;terraec2&quot;<br>  image_id      = &quot;ami-04681163a08179f28&quot;<br>  instance_type = &quot;t2.micro&quot;<br>  user_data     = base64encode(file(&quot;terrauserdata.sh&quot;))<br><br>}<br># Auto Scaling Group creation<br>resource &quot;aws_autoscaling_group&quot; &quot;terra_asg&quot; {<br>  availability_zones = [&quot;us-east-1a&quot;]<br>  desired_capacity   = 2<br>  max_size           = 5<br>  min_size           = 2<br>#launch template<br>  launch_template {<br>    id      = aws_launch_template.terraec2.id<br>    version = &quot;$Latest&quot;<br>  }<br>}<br><br>#Creating Subnets<br>data &quot;aws_subnets&quot; &quot;terrasubnet&quot; {<br>  filter {<br>    name   = &quot;vpc-id&quot;<br>    values = [var.vpc_id]<br>  }<br>  filter {<br>    name   = &quot;tag:Name&quot;<br>    values = [var.subnet_one, var.subnet_two]<br>  }<br>}<br>#Create Security Group For Server<br>resource &quot;aws_security_group&quot; &quot;terrasecg&quot; {<br>  name        = &quot;terrasecg&quot;<br>  description = &quot;Allow traffic on necessary ports&quot;<br>  vpc_id      = var.vpc_id<br><br>  tags = {<br>    Name = &quot;terrasecg&quot;<br>  }<br><br>  #Allow port 8080<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    from_port   = 8080<br>    to_port     = 8080<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  # Allow port 443<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    from_port   = 443<br>    to_port     = 443<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  #Allow port 22<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    self        = true<br>    from_port   = 22<br>    to_port     = 22<br>    cidr_blocks = [&quot;***************&quot;] #Grab your own IP address<br>  }  #allow port 80<br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br><br># Creating S3 Bucket backend<br>terraform {<br>  backend &quot;s3&quot; {<br>    bucket = &quot;terrabucket2211&quot;<br>    key    = &quot;terraform.tfstate&quot;<br>    region = &quot;us-east-1&quot;<br>  }<br>}</pre><p>⦿ I have pasted my whole (IAC) onto here to take a closer look or use as needed.</p><p>⦿ For this Terraform configuration we need to start off with the required provider. This project I am using AWS which will be the actual provider with the version ~&gt;5.0 meaning any versions starting with 5 will be used.</p><p>⦿The region location will be needed “us-east-1”</p><p>⦿ Our next section we are creating the EC2 launch template called “terraec2&quot;. An AMI will be needed to build our EC2 instance so grab one from the AWS Console, I chose Linux2 version. The sizing of this instance will only be t2.micro. I have attached my user data that will contain the configuration instructions to run Apache Webserver. I found out base64-encoded helps any data transmission from breaking during transport.</p><p>⦿ Next, our resource we are pulling is an Auto Scaling Group. This will automatically scale EC2 instances based on the configs you want. I set my desired to 2 EC2 instances with a minimum of 2 instances always running and the max scaled to 5 instances. After I put a launch template to launch the EC2 instance that I want.</p><p>⦿ The next code block is for our subnets. I will be using subnets I already have from our Default VPC, so I wont be creating new ones. I am retrieving subnets from the VPC ID but I shorten the script to a var.(variable). Both of my subnets are being pulled from my variable file and I named it subnet_one and subnet_two.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yt7GDzDpvP-PNFBXx6E-tA.png" /></figure><p>⦿ The AWS Console VPC resource map can pinpoint you to what subnets you can use to run this project. I grabbed two subnets from here.</p><p>⦿ Our next section is creating the security group.</p><p>— Allow Inbound Traffic</p><ul><li><strong>Port 8080</strong> (used for HTTP application)</li><li><strong>Port 443</strong> (for HTTPS traffic)</li><li><strong>Port 22</strong> (SSH access)</li><li><strong>Port 80</strong> (HTTP traffic)</li></ul><p>— Outbound traffic-egress</p><ul><li>Allow all outbound traffic</li></ul><p>⦿ Last but not least, we are telling Terraform to store the state file in the S3 Bucket. This will allow team collaboration by storing information backend.</p><p><strong>terrauserdata.sh (user data script)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*FdGIv-s5Qzy1wStrQ8qfug.png" /></figure><pre>#!/bin/bash<br>yum update -y<br>yum install -y httpd<br>systemctl start httpd<br>systemctl enable httpd</pre><p>⦿ Here is the user data script that I will use to be ran inside my EC2 instances to install Apache webserver.</p><p><strong>variables.tf (variables for my main Terraform Code)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*KzXBXBK82IbO4OgVANicGw.png" /></figure><pre>variable &quot;subnet_one&quot; {<br>  description = &quot;Subnetnumber1&quot;<br>  type        = string<br>  default     = &quot;subnet-0f9705888866fbd289&quot;<br>}<br>variable &quot;subnet_two&quot; {<br>  description = &quot;Subnetnumber2&quot;<br>  type        = string<br>  default     = &quot;subnet-03ab000006014e87&quot;<br>}<br><br>variable &quot;vpc_id&quot; {<br>  description = &quot;myvpc&quot;<br>  type        = string<br>  default     = &quot;vpc-0000000000000&quot;     # grab your default VPC ID<br><br>}</pre><p>⦿This is my list of variables that I will use to shorten my main Terraform block. The reasoning for variables is to not only shorten my code infrastructure, its to also store values that can be changed later, or reusable information that’s in constant need and most importantly its beneficial for coworkers to use as needed.</p><p>!!FOR BEST PRACTICE BUILD ONE RESOURCE AT A TIME TO SEE IF EVERYTHING IS WORKING, DOING EVERYTHING AT ONCE MAKES IT HARDER TO PINPOINT ISSUE!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*G5qnmBsh6NZwQ24AYIndVw.png" /></figure><p>⦿ We are going to create our bucket manually and store the state files in our bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBctYWafMnSvoI260yphcA.png" /></figure><p>⦿We’ll block all public access for this bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDhKH6hCkjmIT75Mj5TCDw.png" /></figure><p>⦿ Leave all the configurations the same and create the bucket.</p><pre>terraform init<br>terraform validate<br>terraform fmt<br>terraform plan<br>terraform apply<br>terraform state list<br>terraform destroy</pre><p>⦿<strong> init:</strong> this command initializes a Terraform configuration</p><p>⦿ <strong>validate:</strong> this command validates and checks the syntax errors and verifies the configuration files is acceptable arguments.</p><p>⦿ <strong>fmt: </strong>the format command will actually fix the files spacing and reformat as necessary</p><p>⦿ <strong>plan:</strong> this command will create an execution plan and show you what Terraform will do for you or what your desire was</p><p>⦿ <strong>apply:</strong>this command will apply all the configurations listed in the script and execute it</p><p>⦿ <strong>destroy:</strong> THIS IS THE LAST COMMAND WHEN YOU ARE FULLY FINISHED WITH YOUR PROJECT !! !! !!</p><pre>terraform apply</pre><p>Once we created our Terraform script to satisfaction and build our S3 bucket, we can now run the “terraform apply” command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZzelWciSZARNFSbaa4QX_A.png" /></figure><p>⦿ Heading back to our Amazon Console we can see if our resources was created. Our Auto Scaling Group was created!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYfbUF8KwA5wVY8f2df3-g.png" /></figure><p>⦿ Our two EC2 instances was created because our Auto Scaling Group was configured to always have two instances running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*FxkOkFaQvrTa0X21kk5UFA.png" /></figure><p>⦿ The security group was created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqk2sD4BmoFvxIuLDWbngQ.png" /></figure><p>⦿ Our launch template was created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*v3nWLVLw-6gqvBb5pCvblA.png" /></figure><p>⦿ We are going to choose one EC2 instance that we want to terminate. The reason for termination is to see if the Auto Scaling Group was properly configured to spin back up another instance to always have two instances running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u8Z_iKctx0grpivZN2FoSw.png" /></figure><p>⦿ We can see that we terminated one instance and another is beginning to initialize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*5_nfYQTlsPAK9XAnNqy90Q.png" /></figure><p>⦿ Lets go into one of our EC2 instances public IP address and see if the Apache webserver running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0HWN16gGaygTe1OjRBUHg.png" /></figure><p>⦿ Our Test page works!!</p><pre>terraform destroy</pre><p>Now that we have finished the project you can run the “terraform destroy” command so this way we don’t have any resources constantly running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOK-sZoCmJ0vsWvaGD7M9Q.png" /></figure><p>⦿ We have successfully teared down everything.</p><p>Thanks for following along. Feel free to connect with me on➡️ <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn</a></p><p>Here is my <a href="https://github.com/Leonthelion22">Github.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82e2becaa548" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ ()   (/) !]]></title>
            <link>https://medium.com/@leon_b./-69d3ff2c8361?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/69d3ff2c8361</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Tue, 04 Feb 2025 01:43:56 GMT</pubDate>
            <atom:updated>2025-02-04T05:49:00.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*JKBhO214lHe9JqjiNST92w.png" /><figcaption>photo credits: <a href="https://www.geeksforgeeks.org/what-is-terraform/">https://www.geeksforgeeks.org/what-is-terraform/</a></figcaption></figure><p>Business Idea💡:A company would like to start using Jenkins as their CI/CD tool to create pipelines for DevOps projects. They need you to create the Jenkins server using Terraform so that it can be used in other environments and so that changes to the environment are better tracked and updated.</p><p>Why Terraform?: Terraform allows engineers to manage, create, and deploy infrastructure as code which can give the users the ability to share and review the code. Terraform is compatible with multiple cloud provides which allows ease of management in all cloud platforms. Using Terraform has so much more benefits to improve your infrastructure which will lead to more efficient and reliable work flows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9gZyfZ77IoQkE6D_qgTUA.png" /><figcaption>Here is a picture of My whole Terraform Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yq8kGffgl6U7G7qBb0TPTg.png" /><figcaption>Here is the User Data Script to install Jenkins on my EC2 Instance</figcaption></figure><pre>HERE IS MY TERRAFORM SCRIPT!!!!!!!!<br>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 5.0&quot;<br>    }<br>  }<br>}<br><br># Configure the AWS Provider<br>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;  #Choose a region near you<br>}<br><br>#Creating  an EC2 Instance<br><br>resource &quot;aws_instance&quot; &quot;JenkinsEC2&quot; {<br>  ami                    = &quot;ami-04b4f1a9cf54c11d0&quot;   # Choose the AMI you want for the creation of your instance<br>  instance_type          = &quot;t2.micro&quot;                # Choose a size for the instance<br>  vpc_security_group_ids = [aws_security_group.JenkinsSecG.id]<br>    key_name               = &quot;Ec2Keypair&quot;<br>  subnet_id              = &quot;subnet-0f9705a8a66fbd289&quot;<br><br>  #User Data To Install Jenkins<br>  user_data = file(&quot;user_jenkins.sh&quot;)   #This will be the script to grab your user data file for the EC2 instance when it creates<br>  tags = {<br>    Name = &quot;JenkinsEC2&quot;<br>  }<br>}<br>#Create a Security Group For the Server<br>resource &quot;aws_security_group&quot; &quot;JenkinsSecG&quot; {<br>  name        = &quot;JenkinsSecG&quot;<br>  description = &quot;Allow inbound traffic and all outbound traffic&quot;<br>  vpc_id      = &quot;Your VPC ID&quot;   #Grab your default VPC ID<br><br>  tags = {<br>    Name = &quot;JenkinsSecG&quot;<br>  }<br><br>  #Allow Acces on port 8080<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    from_port   = 8080<br>    to_port     = 8080<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  # Allow Traffic on port 443<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    from_port   = 443<br>    to_port     = 443<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  #Allow access on port 22<br>  ingress {<br>    protocol    = &quot;tcp&quot;<br>    from_port   = 22<br>    to_port     = 22<br>    cidr_blocks = [&quot;YOUR OWN IP ADDRESS&quot;]<br>  }<br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}<br>#S3 Bucket<br>resource &quot;aws_s3_bucket&quot; &quot;jenkins5157&quot; {<br>  bucket = &quot;jenkins-5157&quot;<br>}<br><br>resource &quot;aws_s3_bucket_public_access_block&quot; &quot;jenkins_acl&quot; {<br>  bucket = aws_s3_bucket.jenkins5157.id<br><br>  block_public_acls       = true<br>  block_public_policy     = true<br>  ignore_public_acls      = true<br>  restrict_public_buckets = true<br>}</pre><p>⦿ For this Terraform configuration we need to start off with the required provider. This project I am using AWS which will be the actual provider with the version ~&gt;5.0 meaning any versions starting with 5 will be used.</p><p>⦿The region location will be needed “us-east-1”</p><p>⦿ Creating the EC2 Instance: <strong>ami:</strong> Machine image instance ID➡️ <strong>instance_type:</strong> instance size ➡️ <strong>vpc_security_group_ids:</strong> security group you will attach with the EC2 instance ➡️<strong> key_name: </strong>this will be the keypair for SSH access to the instance ➡️ <strong>subnet_id: </strong>launching my instance from the default subnet ➡️ <strong>user_data:</strong> this is the variable, we will be attaching the script to be executed when the EC2 instance create //</p><p>⦿ Ingress rules for ports 8080 (Jenkins), 443 (HTTPS), and 22 (SSH).</p><p>⦿Egress rule allowing all outbound traffic.</p><p>⦿ <strong>vpc_id:</strong> The VPC ID is needed for the security group to be created.</p><p>⦿ To create the S3 Bucket for our storage. The bucket name is jenkins-5157</p><p>⦿ Our next block is showing us the configurations of the public access settings for our S3 bucket. We are blocking all public access.</p><p>__________________!!Lets Build Our user data script!!__________________</p><pre>HERE IS MY USERDATA SCRIPT!!<br>#!/bin/bash<br># Update and upgrade the system<br>sudo apt-get update -y<br>sudo apt-get upgrade -y<br><br># Install Java (Jenkins requirement)<br>sudo apt-get install openjdk-11-jdk -y<br><br># Add Jenkins repository and import GPG key<br>wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -<br>sudo sh -c &#39;echo deb http://pkg.jenkins.io/debian-stable binary/ &gt; /etc/apt/sources.list.d/jenkins.list&#39;<br><br># Update package list and install Jenkins<br>sudo apt-get update -y<br>sudo apt-get install jenkins -y<br><br># Start and enable Jenkins service<br>sudo systemctl start jenkins<br>sudo systemctl enable jenkins</pre><p>⦿ Start out with the SHEBANG!!</p><p>⦿sudo apt-get update -y &amp;&amp; sudo apt-get upgrade -y: this will update all packages and upgrade all installed packages.</p><p>⦿ sudo apt-get install openjdk-11-jdk -y: install jenkins package</p><p>⦿ wget -q -O — <a href="https://pkg.jenkins.io/debian/jenkins.io.key">https://pkg.jenkins.io/debian/jenkins.io.key</a> | sudo apt-key add -<br> &amp;&amp; sudo sh -c ‘echo deb <a href="http://pkg.jenkins.io/debian-stable">http://pkg.jenkins.io/debian-stable</a> binary/ &gt; /etc/apt/sources.list.d/jenkins.list’ : download jenkins key and add it to your system so we can make sure the packages are trusted and add jenkins repo to our system package list.</p><p>⦿ update and install jenkins</p><p>⦿sudo systemctl start jenkins &amp;&amp; sudo systemctl enable jenkins: start jenkins and start on boot.</p><p>________ONCE YOU ARE FINISHED WITH THE TERRAFORM SCRIPT AND USER DATA SCRIPT PLEASE SAVE THE FILES ON VSCODE__________</p><pre>terraform init<br>terraform validate<br>terraform fmt<br>terraform plan<br>terraform apply<br>terraform destroy</pre><p>⦿ init: this command initializes a Terraform configuration</p><p>⦿ validate: this command validates and checks the syntax errors and verifies the configuration files is acceptable arguments.</p><p>⦿ fmt: the format command will actually fix the files spacing and reformat as necessary</p><p>⦿ plan: this command will create an execution plan and show you what Terraform will do for you or what your desire was</p><p>⦿ apply:this command will apply all the configurations listed in the script and execute it</p><p>⦿ destroy: THIS IS THE LAST COMMAND WHEN YOU ARE FULLY FINISHED WITH YOUR PROJECT !! !! !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVG5hxDm6b1e1rpGyVZWbA.png" /></figure><p>⦿ After waiting about 5 minutes after the Terraform apply command, I head back to AWS console and see and EC2 running!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0O2RBfu70pSUGs8QAGRm3w.png" /></figure><p>⦿ I will grab the public IP and paste into browser to see if Jenkins is working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXgNzftMSskYiS4kNqfAXA.png" /></figure><p>⦿ I can see my security group was created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XI9XPn25e2YqFAI8CdrdVA.png" /></figure><p>⦿ The rules and ports I scripted has come to life!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*p_qb_LO1snTUisb5rhfqeA.png" /></figure><p>⦿ The key pair I created is showing!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1-eB1ICujmUg_9q75xywA.png" /></figure><p>⦿ I grab my public IP address and paste into the browser, attaching :8080 has gotten me Jenkins!!</p><p>Conclusion: This was a challenging project that took me many trials and tribulations. This was an amazing project that had opened me up to the use of how powerful Terraform is and its benefits. I would like to learn more and dive deeper into Terraform. Any questions, comments, and/or concerns you can reach me at my <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69d3ff2c8361" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[     …]]></title>
            <link>https://medium.com/@leon_b./-5279aa730d6f?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5279aa730d6f</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sun, 19 Jan 2025 09:06:07 GMT</pubDate>
            <atom:updated>2025-01-19T09:06:07.956Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝗨𝘀𝗶𝗻𝗴 𝗗𝗼𝗰𝗸𝗲𝗿 𝗦𝘄𝗮𝗿𝗺 𝗳𝗼𝗿 𝗥𝗲𝗹𝗶𝗮𝗯𝗹𝗲 𝗖𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿𝗶𝘇𝗲𝗱 𝗪𝗼𝗿𝗸𝗹𝗼𝗮𝗱𝘀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JRZNmqYqbrgQeXBFiWC6w.jpeg" /></figure><p><strong>Business Problem:</strong> A company is new to using containers and has been having issues with containerized workloads failing for their global shipping application. The company is worried about additional potential data loss as they have no way to reschedule containers that are failing. The company has to update their infrastructure and leverage the use of Docker Swarm so that data can be restored for the containers that are no longer in a healthy state.</p><p><strong>Business Solution:</strong> A docker Swarm should be able to launch the containers using a global service. A service is simply a group of containers of the same image that facilitates the scaling of applications. The global shipping application will require the use of at least three networked hosts, which will be AWS EC2 Ubuntu instances.</p><p>Prerequisites:</p><p>➽VSCODE</p><p>➽3 EC2 instances, if you need help or it’s your first time deploying instances follow along my other documentation post <a href="https://medium.com/@leon_b./-2477b6fc91b0">(HERE)</a></p><p>➽Each EC2 INSTANCES BUILD :</p><p>🞉Name tag(Anything you want)</p><p>🞉AMI Image Type(Ubuntu Server 22.04LTS)</p><p>🞉Instance Size:(t2.micro)</p><p>🞉Keypair(USE THE SAME KEYPAIR FOR ALL THREE)</p><p>🞉Security Group: (Keep all three the same)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H296O3NMOPKXm-wvM1_F7A.png" /></figure><p>🞉 Lets connect to our EC2 instance Via VSCODE. Click on the icon located at bottom left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*gI_ylCjWxnJETT50fb40wA.png" /></figure><p>🞉 We want to connect to our host which is the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*k6ZC0wl8DXOAAJc5U4gcWQ.png" /></figure><p>🞉 Configure SSH host will get us to the configuration file we need to store our Host EC2 login info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*IAJIb-Ht3qKD9UxULLgW3Q.png" /></figure><p>🞉 This is the common directory path to that config file. You will name it Config</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*pgWCqMcHsLySJQ8zCSyJ5w.png" /></figure><p>🞉In order to set this up, you will have to go back to the AWS console and retrieve the <strong>PUBLIC IP</strong> addresses for each 3 instances. Every time you start/stop the instances the IP address will change so always come back to this file and change it!! Our user is ubuntu because that is the EC2 instance AMI. For our Identity file this will be the file path location of the downloaded keypair on your computer used for your EC2 instances. Once done Hit <strong>Save</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTrKasy-T4A1I-xTbh030Q.png" /></figure><p>🞉 Open up the terminal and split into three screens instead of having to open three VSCODE windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlQCqlnbEaW6s-Ep5CUiqg.png" /></figure><p>🞉 Head back over to the AWS console because will need some info to allow us to ssh into the three Nodes/Instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BxtLH3CKL1kNlt0pLKpHCg.png" /></figure><p>🞉Click on Connect to instance and you will have 4 options to choose. We are using ssh client. We will use the provided AWS command to paste into the terminal. You will need to retrieve these commands for your other two nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*WqUU7T8LLW-KBa2gpzFv3Q.png" /></figure><p>🞉We are still in our first node so lets paste the command from AWS ssh client. Type “Y” or “Yes” to complete the ssh connection…We are In… Please repeat this process two more times by going back to the console and copying the AWS provided ssh client command and pasting to the terminal.</p><pre>sudo hostnamectl set-hostname node1<br>sudo hostnamectl set-hostname node2<br>sudo hostnamectl set-hostname node3<br>bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkLhYFw-d0xWJmx54cq65A.png" /></figure><p>🞉 Now that I ssh into all 3 Nodes, I will change the hostnames of all three nodes which was IP addresses, to the name Node1, Node2, and Node3. This will relieve the headache of knowing which Node is which and also prevent any accidental assigning of power or misconfiguration.Run the bash command to refresh the terminal without having to exit the terminal so you can see the updated change.</p><pre>curl -fsSL https://get.docker.com -o get-docker.sh<br>sh get-docker.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*083vWy7ACcPgfmqoDa8p-g.jpeg" /></figure><p>🞉 We will need to install Docker on all three Nodes.</p><pre>docker version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGCLwApoZKCwnI5xpD_30A.png" /></figure><p>🞉The docker version command will tell us that docker was successfully installed and give us the latest version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwIY6yvjr4px-OrQZVP1KA.png" /></figure><p>🞉 Come back to your AWS console and for the first instance we’ll need to grab the <strong>Private IP</strong> address.</p><pre>docker swarm init --advertise-addr</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ybLNpAxLoGor01_Ed5XfAw.png" /></figure><p>🞉We are going to initialize a docker swarm cluster which will involve the manager node. We will paste the private IP address along with this command, and the result will be that this node1 will be the manager for the swarm and you will be given a join token to give the other nodes to be the worker nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfIN38tOM-F39VHuU4cZIA.png" /></figure><p>🞉 Lets paste the Docker provided join token into the other two nodes and hit enter.</p><pre>docker node ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*AO6pD89vS_c5h6RqPWfVnA.png" /></figure><p>🞉 Listing the nodes to see the name, its status, availability, and even seeing who has power of authority.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IlCuwZmGTv1byq75h4FwA.png" /></figure><p>🞉 Important ports to use when furthering yourself in Docker projects or testing. Edit your inbound rules for these ports to be both on your IP address and your VPC IP address</p><p>🞉7946- Allows nodes in the swarm to communicate with each other.</p><p>🞉4789- Handles the data path for the use of container communication with the swarm.</p><p>🞉2377- Allows communication for manager nodes.</p><p>🞉2376- Encrypted and secure communication with docker client and docker daemon.</p><h3>SSH into the master node host and run the command to create your service using an official image</h3><pre>docker service create --name nginx -p 80:80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*aBgiVZpEOUbTM1dmIVe4cg.png" /></figure><p>🞉 We are going to create a new service in the docker swarm which will be mapped to port 80 for the host and 80 again for the container itself. Nginx will be the web server we are choosing.</p><pre>docker service ps nginx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyzBDwZY19tMVmdko0ENKA.png" /></figure><p>🞉We are listing the running tasks.</p><pre>sudo docker service update ld3tkhhky87r--replicas 3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*y2rr8qKhcIJgABw7CjLQzA.png" /></figure><p>🞉In this command we are updating our service task to run 3 replicas using the service ID. This is making sure there is three running instances and the workload can be distributed to increase the availability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*F5z7IAm2vdnX38kQryQ08Q.png" /></figure><p>🞉I can see that 3/3 replicas is shown.</p><pre>docker service ps nginx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PcZ_G-z_h2GnYGQ8os_eUA.png" /></figure><p>🞉 Running containers for the nginx web server in the docker swarm is shown above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCz0ddGHvww0_tA4lHtYkg.png" /></figure><p>🞉If I copy the public IP address from the AWS console and paste into web browser. We have nginx running!!</p><p>Conclusion: Thanks for looking at my documentation. If you have any questions, command or concerns. You can reach me on,</p><p>LinkedIn:<a href="https://www.linkedin.com/in/leonboodram/">https://www.linkedin.com/in/leonboodram/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5279aa730d6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ /     ]]></title>
            <link>https://medium.com/@leon_b./-a8af081a2e7e?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8af081a2e7e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 00:15:53 GMT</pubDate>
            <atom:updated>2025-01-14T00:15:53.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvPWc6qYFjydycO6Vq-17g.jpeg" /><figcaption>Photo <a href="https://medium.com/@laurahyejungcollins">Credits</a></figcaption></figure><p><strong>Objective:</strong>The objective of this project is to use Docker to create and manage Jenkins containers, emphasizing persistent volumes. This strategy aims to build a robust, scalable Continuous Integration and Continuous Deployment pipeline, showing frequent and reliable deployment of software updates.</p><p>Business Problem:A tech company is keen to adopt tools and methodologies that can streamline their operations, improve productivity, and enhance the quality of their applications.</p><p>Prerequisites: Have an EC2 instance running and SSH into it(I’m using VSCODE terminal)</p><p>🟍Documentation on how to build and EC2 instance if needed.Click ➡️H<a href="https://medium.com/@leon_b./-2477b6fc91b0">ere</a></p><pre>sudo chmod 666 /var/run/docker.sock</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*hetgkAboEPh4g2R5UTyyeQ.png" /></figure><p>🟍Lets start of with this command in the terminal because this will allow us to modify our permission to read and write to the Docker socket. This is good for testing and building environments so you don’t have to sudo EVERYTHING!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*C3EkURVODMCFp_GyqPkJ5w.png" /></figure><p>🟍 We’ll pull a Docker image from the registry that’s much newer and updated.</p><pre>docker volume create</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*Y_-Lpkh0qQ8j3MF3kZS7pQ.png" /></figure><p>🟍 Next, we can create a new volume that will be used by the Docker Containers so it can store persistent data.</p><pre>docker run -d -v leonvolume201:/var/jenkins_home -p 8080:8080 jenkins/jenkins:lts-jdk17</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aSIBNjdDRg7u6OTQRUbVcQ.png" /></figure><p>🟍This command is running a Jenkins container in the background detached with a data persisting volume. It will be mapped to port 8080 for web access.</p><pre>docker logs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCKjKL73rlOM2TwekmNskQ.png" /></figure><p>🟍 You can run the docker logs command to find the admin password. This will be the password we need in order to access into Jenkins web application.</p><pre>localhost:8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S4FrBBMGvS482bL7XRKP8g.png" /></figure><p>🟍 You can run the localhost command to test the running Jenkins web application and VSCODE will provide a pop-up to open the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJLgo06rvZLhQ_wbmSKnsQ.png" /></figure><p>🟍 Paste the password from your terminal onto Jenkins to Unlock and get ready to configure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cu030UlYYRrL115ap7UXEA.png" /><figcaption>Install Suggested Plugins</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_rkzmvboXBw8XEQEK02Tpg.png" /></figure><p>🟍Create your Admin user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzpkeYIWPym0imnNabM_XQ.png" /><figcaption>Save and Finish</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kb738V3G3ZKqKdbqEHcbIw.png" /></figure><p>🟍 Lets head over to users in order to create another user so we can test if our data will persist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkbbCMMLpdmSDdt1sXrQug.png" /><figcaption>Create User</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*x723C4WVUaU2mOHrw1YclA.png" /></figure><p>🟍 Create the User</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vv3prkgFOKRQk-285SrSEQ.png" /></figure><p>🟍 I created a second container with the same volume. Head back to Jenkins and sign in with the User.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EAFAivbA6bTqR8V9ewwnGg.png" /><figcaption>Log In</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxrRvKfRpsXueP7tf6IPow.png" /></figure><p>🟍 We are back in, this shows use that the data persisted by keeping the data that’s inside. All we did was keep change the Container and use back the same volume.</p><p>🟍LinkedIn: <a href="https://www.linkedin.com/in/leonboodram/">https://www.linkedin.com/in/leonboodram/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8af081a2e7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[      …]]></title>
            <link>https://medium.com/@leon_b./-df36cc7060a5?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/df36cc7060a5</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 02:12:08 GMT</pubDate>
            <atom:updated>2025-01-06T02:12:08.023Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝗨𝘁𝗶𝗹𝗶𝘇𝗶𝗻𝗴 𝗗𝗼𝗰𝗸𝗲𝗿 𝗳𝗼𝗿 𝗪𝗲𝗯 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝗮𝗻𝗱 𝗦𝗲𝗰𝘂𝗿𝗶𝘁𝘆 𝗘𝗻𝗵𝗮𝗻𝗰𝗲𝗺𝗲𝗻𝘁</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3FY2K-dmN98P2MOT-PNug.jpeg" /></figure><p><strong>Project Overview:</strong> Level Up Solutions is a Tech Company that wants to implement Docker to improve their web app deployment. This technology allows them to package, distribute, and run applications consistently across different environments. Docker offers benefits like consistency, portable, isolation, reproducibility, version control, scalable, and improved collaboration, which streamline the development and deployment processes.</p><p><strong>Prerequisites:</strong></p><p>◉Ubuntu EC2 instance- Check out my previous documentation to create an EC2 instance step by step.(<a href="https://medium.com/@leon_b./-2477b6fc91b0">Click Here</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yau3Nc2QRzj2wCPUf9Mc2A.png" /></figure><p>● Once our EC2 instance has been created we can ssh into the instance and begin. First you must go into the directory that your key pair has been downloaded at. Then you can “ssh” into your instance with AWS’s provided command… We’re in💻</p><pre>sudo docker pull ubuntu:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*lqGC6hXCXh5mU8lgMQEaNw.png" /></figure><p>● Now we will need to pull the latest image from the docker registry in order to use it for our container</p><pre>docker run -it -d -p 80:80 ubuntu<br>sudo docker container ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0PtuEYMLdQR579wGaaO_RA.png" /></figure><p>● In this step we are going to pull a ubuntu image and run a container that will be detached and our port we will be using is port 80. Then after we can run another command that will allow us to see if our container was created and the port being used. It worked!</p><pre>sudo docker exec -it sweet_poitras bash<br>apt-get update &amp;&amp; apt-get upgrade -y<br>apt-get install apache2 -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDgCZzIJGffNz2Wyi8ksmQ.png" /></figure><p>● Our first set of commands is used to start a new bash shell session inside an already-running Docker container named sweet_poitras.</p><p>●Next my second command will update all the packages inside the container so everything is up to date.</p><p>● Lastly, my last command will be to install Apache Version 2</p><pre>service apache2 start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*B-1U7uhWXxgKZYxiuKOr4Q.png" /></figure><p>● Time to start the Apache webserver.</p><pre>apache2 -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*kOY6fuNYYUfWC1RSdILIkA.png" /></figure><p>● I am using this command in order to see what version is my Apache service is using, this is just to verify the correctly installed version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywcgvwh7yHB2dUo4dEel0w.png" /></figure><p>● We can head over to our ubuntu based EC2 instance on AWS Console and copy the public IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-3h6pEZFfW85oLDIa9qkg.png" /></figure><p>● When you paste the public IP address into another tab search bar, you should get an Apache2 default page. This is just verification that my commands are working and we can test as we go along to make sure our steps are working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lYpqic0k33W84axQRvHKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPwQ95yX1Ti2yGhCIFSrfA.png" /></figure><p>● After seeing my test webpage works I wanted to create a custom webpage!</p><p>Objective: Push to Docker Hub.</p><h3>𝟐𝐧𝐝 𝐎𝐛𝐣𝐞𝐜𝐭𝐢𝐯𝐞: 𝐏𝐮𝐬𝐡 𝐭𝐨 𝐃𝐨𝐜𝐤𝐞𝐫 𝐇𝐮𝐛 𝐚𝐧𝐝 𝐩𝐮𝐥𝐥 𝐲𝐨𝐮𝐫 𝐧𝐞𝐰 𝐢𝐦𝐚𝐠𝐞 𝐚𝐧𝐝 𝐫𝐮𝐧 𝐨𝐧 𝐚 𝐝𝐢𝐟𝐟𝐞𝐫𝐞𝐧𝐭 𝐩𝐨𝐫𝐭 𝐭𝐡𝐚𝐧 𝟖𝟎 𝐰𝐡𝐢𝐥𝐞 𝐬𝐭𝐢𝐥𝐥 𝐦𝐚𝐩𝐩𝐢𝐧𝐠 𝐭𝐨 𝟖𝟎 𝐨𝐧 𝐭𝐡𝐞 𝐜𝐨𝐧𝐭𝐚𝐢𝐧𝐞𝐫. Using Docker scout to detect vulnerabilities.</h3><pre>docker login</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OblhMLZ92m-HWAJ5Xyg5A.png" /></figure><p>● I had switched over to VSCODE because I learned how to “ssh” into an instance much faster. We are going to push our container to Docker Hub, so we need to login to our docker via the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1P_3gTVnYAzpNVDXMw2ovg.png" /></figure><p>● When you click the link that’s provided from docker in your terminal, copy and paste the link to your browser and the Docker Device Activation will be shown. Enter the 8-digit code docker provided in the terminal.</p><pre>docker tag ubuntu leonthelion22/dockerpurplerepo2025<br>docker push leonthelion22/dockerpurplerepo2025<br>docker pull leonthelion22/dockerpurplerepo2025<br>docker run -d -p 81:80 leonthelion22/dockerpurplerepo2025<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bpXknd7BMqzTjICcgR5wPA.png" /></figure><p>● If we login correctly then Docker will say it succeeded.</p><p>● Docker tag will tag an existing Docker image to a new name but it still the same image, this is helpful to push an image to my repo for my docker hub account.</p><p>●Docker push will push the Docker image to a Docker registry which is my account on Docker Hub</p><p>● Docker pull will allow me to pull that Docker Image to my local machine.</p><p>●Lastly, Docker run will start the Docker container and in this case its detached and I am using another port 81 which is my host machine port and 80 is my container port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_RA-2PuewWDKUkVl6JVHg.png" /><figcaption>Here is my image on the Docker Hub account</figcaption></figure><pre>- ARG instructions define build-time variables.<br>    <br>- LABEL instructions add metadata to the Docker image.<br>    <br>- ADD copies files from the host to the Docker image.<br>    <br>- CMD specifies the default command to run when the container starts.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ot38pseFrScudqovGZgOw.png" /></figure><p>● My image layers shown that was created and used for my container.</p><pre>curl -sSfL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh | sh -s --</pre><p>● Here is the command I will be using to install Docker Scout which is a great tool that will identify and address vulnerabilities in your Docker images!!!</p><pre>docker scout quickeview leonthelion22/dockerpurplerepo2025</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dW3EXwuXicnaDR7xLNEHQA.png" /></figure><p>● Docker scout quickview command will provide an overview of the Docker image used showing its vulnerabilities.</p><pre>docker scout cves leonthelion22/purplerepo2025</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*zYej-oFKBQX-R1zJV4utvQ.png" /></figure><p>● The recommendations to fix these Common Vulnerability issues can be used by the Docker cves command. You will get detailed reports found in the Docker image and this can help address and mitigate possible security risks.</p><p><strong>Conclusion:</strong></p><p>Thank you all for taking the time to learn from my documentation and I hope you found it helpful. Any recommendations or tips you can reach me on my <a href="https://www.linkedin.com/in/leonboodram/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df36cc7060a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[      …]]></title>
            <link>https://medium.com/@leon_b./-0ace597915a4?source=rss-c780fe27f09f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ace597915a4</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[autoscaling]]></category>
            <dc:creator><![CDATA[Leon B.]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 01:29:50 GMT</pubDate>
            <atom:updated>2024-12-14T01:29:50.616Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝐒𝐞𝐜𝐮𝐫𝐞 𝐑𝐞𝐦𝐨𝐭𝐞 𝐀𝐜𝐜𝐞𝐬𝐬𝐢𝐧𝐠 𝐀𝐳𝐮𝐫𝐞 𝐕𝐢𝐫𝐭𝐮𝐚𝐥 𝐌𝐚𝐜𝐡𝐢𝐧𝐞𝐬 𝐰𝐢𝐭𝐡 𝐀𝐮𝐭𝐨 𝐒𝐜𝐚𝐥𝐢𝐧𝐠</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Da_hH6auhdeYwxNvMXG87A.jpeg" /></figure><p><strong>Business Problem:</strong> A business corporation host its Linux and Windows applications on over 100 Azure Virtual Machines (VM). The globally dispersed IT team needs efficient, secure, and reliable tools for remote administration and troubleshooting to minimize downtime and security risks. Additionally, the company needs to ensure high availability and scalability of its applications.</p><p><strong>Business Solution:</strong>To address this the solution involves setting up Auto Scaling Groups to automatically adjust the number of Virtual Machines based on demand, ensuring scalability and high availability. For secure remote administration, SSH will be implemented for Linux Virtual Machines, providing encrypted channels for secure access. Also network Security Groups (NSGs), routing rules, ensure secure and efficient communication within the network and with external networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t4KEEdQ1XHOmStgissJ1Hg.png" /></figure><p>◍ We will need to create our Azure Virtual Machine first to start off this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ME7UQXUTa1h-suY7lpH3lA.png" /></figure><p>◍ A new resource group will be needed to host all the tools we are going to use. Next we can input a name and region as well as availability zones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xb5z_e8Zi8hM_DOtr5W0-w.png" /></figure><p>◍ For this project I will be choosing a Linux image for my virtual machine. I had to mess around with multiple images to get a smaller size VM so it won’t be so expensive to create this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*LNDmFmQwgEvNWRka1PkUdw.png" /></figure><p>◍ I will be connecting to my Virtual Machine later and I will do so by using SSH to connect, so for the authentication type I will choose SSH public key and I will also choose generate new key pair. This key pair will need a name and allow the inbound port number 22 to be enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xR-F56CCE-9-4PDsEndfYQ.png" /></figure><p>◍ Our network security group will need to be created and it will be advanced and this is important because we need to manage the inbound and outbound traffic to allow or deny traffic, and also many other security rules you can configure in depth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*BAQUuIAYXRdC7hdzkO4TrA.png" /></figure><p>◍ We can skip past all other configurations for this Virtual Machine and create it. This pop-up will show up to download our private key that we need for <strong>SSH</strong>’ing to our Virtual Machine through our command line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jwV8UMRc6M11nxsTfn9meg.png" /></figure><p>◍ Lets connect!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgFPWWOfWmyT-u5yGrqc8w.png" /></figure><p>◍ I would like to connect to my Virtual Machine through my command line using Powershell, So choose Native SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*xbd3gY2jocHMByC5qGVLIg.png" /></figure><p>◍ Now with Azure, in order to connect to our Virtual Machine we need to enter the file name of the key pair downloaded. This is cool that Azure has this procedure because with AWS you just copy and paste the specified private key into the command line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KKRiAAhS0UI15aZ2jmeXsA.png" /></figure><p>◍ In order to SSH into your VM please make sure you are in the correct <strong>DIRECTORY!! </strong>Here I am in my downloads directory and I will enter the private key Azure provides… And we are in!! I ran the “<strong>whoami</strong>” command to make sure I am the Azure user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GqCPTNlNtTXpQZGMosfSeA.png" /></figure><p>◍ To further my project I will be creating an Auto-Scaling group to automatically spin up more Virtual Machine instances based on demand usage. I will be using different availability zones to provide resiliency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*tbrlIjD9qbp-2Gd6M09RsQ.png" /></figure><p>◍ I will choose my security type as trusted launch virtual machines. For the scaling I will choose Auto-scaling based on CPU metric so that we can meet the demands of many customers on our website etc. We don’t want any overloading and buffering to occur in case the demand is too high and the network can’t be supported.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*DUs7XmwrvCvDkdX-yT1OVQ.png" /></figure><p>◍ Based on my preference in doing this project I will only need to have a minimum of 2 instances running at all times, a maximum of 5 instances to upscale, and if the CPU usage is greater that 65% then we can proceed with another instance creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*al9K6lhQhDBzfXKPprqT8Q.png" /></figure><p>◍ Once our network traffic slows down then we can decrease our running instances if our CPU output is less then 20%. For any spikes we can give a time of 6 minutes to gather the CPU data to see if we need to scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1s59M4sVviKxTjtQwW40g.png" /><figcaption>All the Resources Created</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpNu0lH02buoeCiS2xtgbg.png" /></figure><p>◍ Heading over to our Virtual machines. We have 2 instances running because of the minimum amount of instances we need to stay running constantly.</p><p>Thanks for taking the time to read my project. This is just a simple project to create our Virtual Machines and use the powerful tool of Auto-Scaling to keep anywhere from a small business afloat to a large business afloat to meet demands. Any questions comment or concerns please reach me at my LinkedIn: <a href="https://www.linkedin.com/in/leonboodram/">https://www.linkedin.com/in/leonboodram/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ace597915a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>