<?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"><channel><title><![CDATA[Atharva's Blog]]></title><description><![CDATA[Atharva's Blog]]></description><link>https://anevase.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 11:31:01 GMT</lastBuildDate><atom:link href="https://anevase.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Deploy a LAMP Stack Application to Amazon Lightsail]]></title><description><![CDATA[A LAMP stack is a popular set of open-source software used for web development. It stands for Linux, Apache, MySQL, and PHP:

Linux: The operating system that runs the server.

Apache: The web server software that delivers web pages to users.

MySQL:...]]></description><link>https://anevase.hashnode.dev/deploy-a-lamp-stack-application-to-amazon-lightsail</link><guid isPermaLink="true">https://anevase.hashnode.dev/deploy-a-lamp-stack-application-to-amazon-lightsail</guid><category><![CDATA[lamp]]></category><category><![CDATA[LAMP stack project]]></category><category><![CDATA[AWS]]></category><category><![CDATA[#Lightsail]]></category><category><![CDATA[aws lightsail]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[TODOLIST]]></category><category><![CDATA[todoapp]]></category><dc:creator><![CDATA[Atharva Nevase]]></dc:creator><pubDate>Fri, 12 Jul 2024 12:13:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1720762759275/6aa63289-4197-4ae8-9534-9d5dac218939.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A LAMP stack is a popular set of open-source software used for web development. It stands for Linux, Apache, MySQL, and PHP:</p>
<ul>
<li><p><strong>Linux</strong>: The operating system that runs the server.</p>
</li>
<li><p><strong>Apache</strong>: The web server software that delivers web pages to users.</p>
</li>
<li><p><strong>MySQL</strong>: The database management system that stores and retrieves data for the website.</p>
</li>
<li><p><strong>PHP</strong>: The programming language used to create dynamic web content.</p>
</li>
</ul>
<h2 id="heading-sequential-guide">Sequential guide:</h2>
<h3 id="heading-step-1-navigate-to-amazon-lightsail">Step 1: Navigate to Amazon Lightsail</h3>
<p>Start by logging into your Amazon Lightsail account. Choose a region that is closest to your geographical location for optimal performance. Linux is the default platform, which is ideal for running a LAMP stack due to its open-source compatibility.</p>
<h2 id="heading-step-2-select-lamp-php-blueprint"><strong>Step 2: Select LAMP (PHP) Blueprint:</strong></h2>
<p>In the Lightsail dashboard, select the LAMP (PHP) blueprint. This pre-configured blueprint will set up your LAMP stack on your instance automatically.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720786244884/ed71f9ae-e5d9-4fa5-8da0-af6992c3a57b.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-3-building-it-with-a-launch-script"><strong>Step 3: Building it with a Launch Script:</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720786267243/11434242-376b-4cf7-ab1a-8b3c7b6eeaad.png" alt class="image--center mx-auto" /></p>
<p>To set up your LAMP stack application, use the following launch script:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># remove default website</span>
<span class="hljs-comment">#-----------------------</span>
<span class="hljs-built_in">cd</span> /opt/bitnami/apache2/htdocs 
rm -rf *

<span class="hljs-comment"># clone github repo</span>
<span class="hljs-comment">#------------------</span>
git <span class="hljs-built_in">clone</span> -b loft https://github.com/mikegcoleman/todo-php .

<span class="hljs-comment"># set write permissions on the settings file</span>
<span class="hljs-comment">#-----------------------------------</span>
sudo chown bitnami:daemon connectvalues.php
chmod 666 connectvalues.php

<span class="hljs-comment"># inject database password into configuration file</span>
<span class="hljs-comment">#-------------------------------------------------</span>
sed -i.bak <span class="hljs-string">"s/&lt;password&gt;/<span class="hljs-subst">$(cat /home/bitnami/bitnami_application_password)</span>/;"</span> /opt/bitnami/apache2/htdocs/connectvalues.php

<span class="hljs-comment"># create database</span>
<span class="hljs-comment">#----------------</span>
cat /home/bitnami/htdocs/data/init.sql | /opt/bitnami/mariadb/bin/mysql -u root -p$(cat /home/bitnami/bitnami_application_password)
</code></pre>
<h2 id="heading-summary-of-the-code"><strong>Summary of the Code:</strong></h2>
<ol>
<li><p><strong>Remove Default Website:</strong></p>
<p> Clear out the default website files from the Apache web directory.</p>
</li>
</ol>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> /opt/bitnami/apache2/htdocs 
rm -rf *
</code></pre>
<ol start="2">
<li><p>Clone GitHub Repository:</p>
<p> Clone the <code>loft</code> branch of the GitHub repository into the Apache web directory.</p>
</li>
</ol>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> -b loft https://github.com/mikegcoleman/todo-php .
</code></pre>
<ol start="3">
<li><p>Set Write Permissions on the Settings File:</p>
<p> Adjust the permissions of the <code>connectvalues.php</code> file to ensure it is writable.</p>
</li>
</ol>
<pre><code class="lang-bash">sudo chown bitnami:daemon connectvalues.php
chmod 666 connectvalues.php
</code></pre>
<ol start="4">
<li><p>Inject Database Password into Configuration File:</p>
<p> Replace the placeholder <code>&lt;password&gt;</code> in the configuration file with the actual password.</p>
</li>
</ol>
<pre><code class="lang-bash">sed -i.bak <span class="hljs-string">"s/&lt;password&gt;/<span class="hljs-subst">$(cat /home/bitnami/bitnami_application_password)</span>/;"</span> /opt/bitnami/apache2/htdocs/connectvalues.php
</code></pre>
<ol start="5">
<li><p>Create Database:</p>
<p> Set up the database using the SQL script.</p>
</li>
</ol>
<pre><code class="lang-bash">cat /home/bitnami/htdocs/data/init.sql | /opt/bitnami/mariadb/bin/mysql -u root -p$(cat /home/bitnami/bitnami_application_password)
</code></pre>
<h2 id="heading-step-4-select-instance-size-name-your-instance-and-create"><strong>Step 4: Select Instance Size, Name Your Instance, and Create:</strong></h2>
<p>Choose the instance size that fits your needs; the $5 option is a popular choice. Name your instance and click “Create.” Optionally, add tags such as <code>APP -&gt; Todo</code> to help organize and identify your instance.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720786287582/a74e225a-d995-4b4f-9be3-3cd0147d2b2a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-5-access-lamp-stack-application"><strong>Step 5: Access LAMP Stack Application:</strong></h2>
<p>Once your instance is up and running, access your LAMP stack application by navigating to your instance’s public IP address in your browser. You’ll see the todo application where you can add tasks, set their severity, and mark them as complete or incomplete.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720786313197/4df05125-3dfa-4bdf-895f-1fe20ba320a0.png" alt class="image--center mx-auto" /></p>
<p>You’ve successfully deployed a LAMP stack application on Amazon Lightsail. By following this guide, you’ve set up a powerful and flexible web environment, configured it with a launch script, and deployed a functional todo application.</p>
<p>This setup not only demonstrates the ease and efficiency of Amazon Lightsail but also provides a robust foundation for further web development projects.</p>
<p>Enjoy exploring and expanding your new LAMP stack application!</p>
]]></content:encoded></item><item><title><![CDATA[Build a Drupal Website using Amazon Lightsail]]></title><description><![CDATA[Looking to build and manage a website without diving deep into technical stuff? Drupal is your go-to solution! This free, open-source content management system (CMS) makes it a breeze to create, publish, and organize content.
What is Amazon Lightsail...]]></description><link>https://anevase.hashnode.dev/build-a-drupal-website-using-amazon-lightsail</link><guid isPermaLink="true">https://anevase.hashnode.dev/build-a-drupal-website-using-amazon-lightsail</guid><category><![CDATA[Drupal]]></category><category><![CDATA[Amazon Web Services]]></category><category><![CDATA[#Lightsail]]></category><category><![CDATA[cms]]></category><dc:creator><![CDATA[Atharva Nevase]]></dc:creator><pubDate>Fri, 12 Jul 2024 05:06:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1720757082392/bff2d418-4adf-4625-b72f-d169e61e10f1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Looking to build and manage a website without diving deep into technical stuff? Drupal is your go-to solution! This free, open-source content management system <mark>(CMS)</mark> makes it a breeze to create, publish, and organize content.</p>
<h3 id="heading-what-is-amazon-lightsail">What is Amazon Lightsail?</h3>
<p>Amazon Lightsail is a cloud service that makes it easy to launch and manage virtual servers, storage, and networking. It's perfect for quickly setting up websites, web apps, and other simple cloud-based projects.</p>
<h2 id="heading-comprehensive-walkthrough">Comprehensive walkthrough:</h2>
<h2 id="heading-step-1-navigate-to-amazon-lightsail">Step 1: Navigate to Amazon Lightsail</h2>
<p>Start by logging into your Amazon Lightsail account. Choose a region that is closest to your geographical location for optimal performance. Linux is the default platform, which is ideal for running Drupal due to its open-source compatibility.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720758573637/fc5a2add-fbc8-43b4-82cd-8fa9c0466d79.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-2-select-drupal-blueprint">Step 2: Select Drupal Blueprint</h2>
<p>Once you’re in the Lightsail dashboard, find and select the Drupal blueprint. This pre-configured blueprint will set up Drupal on your instance automatically, saving you time and effort.</p>
<h2 id="heading-step-3-choose-your-instance-size-and-name">Step 3: Choose Your Instance Size and Name</h2>
<p>Pick an instance size that suits your needs. The <mark>$5 option is a popular choice</mark> for most users, offering a good balance of resources and affordability. Give your instance a memorable name, then click on “Create” to launch your Drupal instance.</p>
<h2 id="heading-step-4-access-and-open-drupal">Step 4: Access and Open Drupal</h2>
<p>After your instance is created, copy the public IP address of your instance and paste it into your browser’s address bar. Navigate to the login page by adding <code>/user/login</code> to the end of the URL.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720760144925/049b1119-3f70-49f7-8c32-9e032fde6aa6.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-5-open-instance-terminal">Step 5: Open Instance Terminal</h2>
<p>Go back to your Lightsail dashboard, select your instance, and open the terminal. In the terminal, use the command <code>cat bitnami_application_password</code> to retrieve the unique password for your Drupal installation.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720760262421/bc57836f-184b-45f8-b2b7-46fe3947cd87.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-6-enter-credentials">Step 6: Enter Credentials</h2>
<p>On the Drupal login page, use <code>user</code> as the username and the unique password you copied from the terminal. This will log you into your Drupal site, where you can start creating content and customizing your site.</p>
<h2 id="heading-step-7-drupal-dashboard-panel">Step 7: Drupal Dashboard Panel</h2>
<p>Now that you’re logged in, you can add articles, select themes, and explore the various functionalities of Drupal.</p>
<p>Below is one of my first articles from Hashnode:</p>
<p><a target="_blank" href="https://hashnode.com/post/clxvswdn300030ajy26n8dooe"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1720760573132/966bbcbd-66d2-4584-a89c-7776616515d8.png" alt class="image--center mx-auto" /></a></p>
<p>You have successfully launched a Drupal instance using Amazon Lightsail. With the Drupal dashboard open, you can now start adding articles, selecting themes, and exploring the myriad functionalities that Drupal offers.</p>
<p>This powerful combination of Amazon Lightsail's simplicity and Drupal's flexibility ensures that you can manage your website efficiently and effectively.</p>
<p>Happy site building!</p>
]]></content:encoded></item><item><title><![CDATA[How to install Jenkins on AWS EC2]]></title><description><![CDATA[Step 1:
Launch an EC2 Instance on AWS
Initiate the creation of an EC2 instance on AWS, assigning it a unique name. Choose a Linux (Ubuntu) image, select a free tier t2.micro instance, and configure a key-value pair for secure connectivity.
Key-Value ...]]></description><link>https://anevase.hashnode.dev/how-to-install-jenkins-on-aws-ec2</link><guid isPermaLink="true">https://anevase.hashnode.dev/how-to-install-jenkins-on-aws-ec2</guid><category><![CDATA[AWS]]></category><category><![CDATA[Jenkins]]></category><category><![CDATA[EC2 instance]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Installation]]></category><category><![CDATA[configuration]]></category><dc:creator><![CDATA[Atharva Nevase]]></dc:creator><pubDate>Wed, 26 Jun 2024 12:17:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718874814901/0654f2cc-5934-4d91-9a1e-a65e34b6fc30.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-step-1">Step 1:</h3>
<p><strong>Launch an EC2 Instance on AWS</strong></p>
<p>Initiate the creation of an EC2 instance on AWS, assigning it a unique name. Choose a Linux (Ubuntu) image, select a free tier t2.micro instance, and configure a key-value pair for secure connectivity.</p>
<p><strong>Key-Value Pair Configuration:</strong></p>
<p>A key-value pair is essential for secure connections to other servers. Name it appropriately based on your usage.</p>
<ul>
<li><p>For Linux connections, use a <code>.pem</code> file.</p>
</li>
<li><p>For Windows connections, use a <code>.ppk</code> (PuTTY) private key format.</p>
</li>
</ul>
<p>Upon creation, the key-value pair file will be downloaded locally to your machine.</p>
<p><strong>Connect to the Linux Instance:</strong></p>
<p>Follow the necessary steps to establish a connection to your Linux instance.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1719403666966/1aa00b69-1383-4036-97ea-153160d5752e.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-2-install-jenkins-on-your-aws-ec2-instance">Step 2: Install Jenkins on Your AWS EC2 Instance</h2>
<h3 id="heading-update-your-system">Update Your System</h3>
<p>First, ensure your system is up-to-date:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1719403754166/42980a80-ecb3-4656-8254-e467936ae2cc.png" alt class="image--center mx-auto" /></p>
<pre><code class="lang-bash">sudo apt update
</code></pre>
<h3 id="heading-install-java">Install Java</h3>
<p>Since Jenkins is written in Java, installing Java on your instance is crucial:</p>
<pre><code class="lang-bash">sudo apt install openjdk-11-jre
</code></pre>
<h3 id="heading-validate-installation">Validate Installation</h3>
<p>Verify the Java installation:</p>
<pre><code class="lang-bash">java -version
</code></pre>
<p>You should see something like this:</p>
<pre><code class="lang-bash">openjdk version <span class="hljs-string">"11.0.12"</span> 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)
</code></pre>
<h3 id="heading-install-jenkins">Install Jenkins</h3>
<p>To install Jenkins, you need to add its key and Debian package repository. Copy and paste the following commands into your terminal:</p>
<h4 id="heading-add-jenkins-key-and-debian-package">Add Jenkins Key and Debian Package</h4>
<pre><code class="lang-bash">curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc &gt; /dev/null

<span class="hljs-built_in">echo</span> deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list &gt; /dev/null
</code></pre>
<h3 id="heading-update-system-and-install-jenkins">Update System and Install Jenkins</h3>
<p>Finally, update your system again and install Jenkins:</p>
<pre><code class="lang-bash">sudo apt-get update
sudo apt-get install jenkins
</code></pre>
<h3 id="heading-step-3-start-jenkins">Step 3: Start Jenkins</h3>
<p>To start Jenkins and ensure it runs persistently even after a system restart, follow these commands:</p>
<p><strong>Enable Jenkins Service:</strong></p>
<pre><code class="lang-bash">sudo systemctl <span class="hljs-built_in">enable</span> jenkins
</code></pre>
<p><em>Note:</em> <code>systemctl</code> (system controller) allows Jenkins to continue running even after a restart or if an instance is destroyed.</p>
<p><strong>Start Jenkins Service:</strong></p>
<pre><code class="lang-bash">sudo systemctl start jenkins
</code></pre>
<p><strong>Check Jenkins Service Status:</strong></p>
<pre><code class="lang-bash">sudo systemctl status jenkins
</code></pre>
<h3 id="heading-step-4-configure-jenkins-port-and-access">Step 4: Configure Jenkins Port and Access</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1719403817524/388bb496-be83-4f88-9a5c-894f44b9ea73.png" alt class="image--center mx-auto" /></p>
<p>Jenkins runs on port 8080 by default. To access Jenkins, you'll need to configure your EC2 instance's security group to allow inbound traffic on this port.</p>
<p><strong>Add Inbound Rule:</strong></p>
<ol>
<li><p>Navigate to the EC2 Dashboard.</p>
</li>
<li><p>Select your EC2 instance.</p>
</li>
<li><p>Click on the "Security" tab, then "Security Groups".</p>
</li>
<li><p>Select the security group associated with your instance.</p>
</li>
<li><p>Click "Edit inbound rules".</p>
</li>
<li><p>Add a new rule with the following settings:</p>
<ul>
<li><p><strong>Type:</strong> Custom TCP</p>
</li>
<li><p><strong>Port Range:</strong> 8080</p>
</li>
<li><p><strong>Source:</strong> My IP (for restricted access) or Anywhere (for open access)</p>
</li>
</ul>
</li>
</ol>
<p><strong>Access Jenkins:</strong></p>
<p>Open your web browser and enter the following URL, replacing <code>&lt;Public_IP&gt;</code> with your EC2 instance's public IP address:</p>
<pre><code class="lang-plaintext">http://&lt;Public_IP&gt;:8080
</code></pre>
<p>Example:</p>
<pre><code class="lang-plaintext">http://13.244.4342:8080
</code></pre>
<p>This will bring you to the Jenkins setup screen, where you can continue with the initial configuration.</p>
<h3 id="heading-step-5-access-jenkins-dashboard-and-initial-setup">Step 5: Access Jenkins Dashboard and Initial Setup</h3>
<ol>
<li><strong>Jenkins Window Opens:</strong></li>
</ol>
<p>After starting Jenkins, the Jenkins window will open in your web browser. You will be prompted to enter an initial password to unlock Jenkins.</p>
<p>To retrieve the initial password:</p>
<ul>
<li><p>Copy the URL shown in red from the Jenkins window.</p>
</li>
<li><p>Use the command below to display the content containing the password:</p>
<pre><code class="lang-bash">  sudo cat /var/lib/jenkins/secrets/initialAdminPassword
</code></pre>
</li>
</ul>
<ol start="2">
<li><strong>Jenkins Install Plugins:</strong></li>
</ol>
<p>After entering the initial password, proceed with the following steps:</p>
<ul>
<li><p><strong>Install Recommended Plugins:</strong> Jenkins will provide options to install recommended plugins. Select this option to proceed.</p>
</li>
<li><p><strong>Create First Admin User:</strong> You will be prompted to create the first administrative user for Jenkins. Enter the username, password, and other required details.</p>
</li>
</ul>
<ol start="3">
<li><strong>Create a New Item:</strong></li>
</ol>
<p>Once Jenkins is set up, create your first project:</p>
<ul>
<li><p>Click on "Create new jobs" or "New Item" to create a new project.</p>
</li>
<li><p>Choose "Freestyle project" to create a flexible, custom project.</p>
</li>
</ul>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Setting up Jenkins on an AWS EC2 instance empowers you with a robust continuous integration and continuous delivery (CI/CD) platform. By following the steps outlined in this guide, you've learned how to:</p>
<ol>
<li><p><strong>Launch an EC2 Instance:</strong> Start by creating an EC2 instance with Ubuntu Linux, ensuring it's equipped with Java to support Jenkins.</p>
</li>
<li><p><strong>Install Jenkins:</strong> Install Jenkins on your EC2 instance, configure its initial setup, and secure access through proper firewall rules.</p>
</li>
<li><p><strong>Configure Jenkins:</strong> Start Jenkins, install recommended plugins, and create your first administrative user to begin managing your projects.</p>
</li>
<li><p><strong>Utilize Jenkins:</strong> Explore the flexibility of Jenkins by creating a new project and setting up a freestyle project for customized workflows.</p>
</li>
</ol>
<p>By leveraging Jenkins, you can streamline your development processes, automate builds, and enhance collaboration within your team.</p>
]]></content:encoded></item></channel></rss>