<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Paschal Ogu</title>
    <description>The latest articles on DEV Community by Paschal Ogu (@paschalogu).</description>
    <link>https://dev.to/paschalogu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F876015%2Fa96fc524-ca33-40c3-ae38-9e136af4bc44.png</url>
      <title>DEV Community: Paschal Ogu</title>
      <link>https://dev.to/paschalogu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/paschalogu"/>
    <language>en</language>
    <item>
      <title>How I Self-Host Metabase &amp; Why Your Team Should Too</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Tue, 24 Feb 2026 22:26:29 +0000</pubDate>
      <link>https://dev.to/paschalogu/how-i-self-host-metabase-why-your-team-should-too-1a6l</link>
      <guid>https://dev.to/paschalogu/how-i-self-host-metabase-why-your-team-should-too-1a6l</guid>
      <description>&lt;p&gt;If you have not yet explored Metabase, this is for you.&lt;/p&gt;

&lt;p&gt;I have had this piece sitting in my drafts for a long time because I kept asking myself a simple question: &lt;strong&gt;Do businesses really need yet another tool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer, for me, ended up being yes.&lt;/p&gt;

&lt;p&gt;Metabase is one of those rare tools that feels equally friendly to non-technical teammates and powerful enough for someone who wants to write SQL, model data, and build dashboards that actually get used.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Metabase?
&lt;/h2&gt;

&lt;p&gt;Metabase is an open-source business intelligence tool that helps people explore, visualize, and understand data. If you are working in a startup, it usually shows up in moments like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ops wants a daily view of signups, churn, or cashflow.&lt;/li&gt;
&lt;li&gt;Sales wants a clean dashboard they can check without waiting on engineering.&lt;/li&gt;
&lt;li&gt;Product wants quick answers without spinning up a full analytics pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Image below shows sample dashboard built with metabase:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofgxhuuvx9kqku5kh2yk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofgxhuuvx9kqku5kh2yk.png" alt="Metabase Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why I think this matters — especially for startups
&lt;/h2&gt;

&lt;p&gt;Most startups struggle because their data is scattered, hard to query, and only a few people can make sense of it. Metabase helps by making data visible to the wider team, reducing the time it takes to answer basic questions, and building a habit of checking numbers before making decisions.&lt;/p&gt;
&lt;h2&gt;
  
  
  A few Metabase features I like
&lt;/h2&gt;

&lt;p&gt;Here are some of the highlights, with links to the official Metabase docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set up quickly:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/setting-up-metabase.html" rel="noopener noreferrer"&gt;Set up in five minutes&lt;/a&gt; — Unlike most BI tools that require lengthy onboarding or dedicated IT support, Metabase gets you from zero to exploring data in minutes with a straightforward guided setup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Self-serve analytics:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/questions/introduction" rel="noopener noreferrer"&gt;Let anyone ask questions&lt;/a&gt; — The question builder lets non-technical teammates pull their own insights without writing a single line of SQL, reducing the bottleneck on data and engineering teams.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Power user mode:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/questions/native-editor/writing-sql" rel="noopener noreferrer"&gt;SQL editor&lt;/a&gt; — For those who prefer working directly with the database, the built-in SQL editor gives full flexibility without ever leaving the tool.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Beautiful dashboards:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/users-guide/07-dashboards.html" rel="noopener noreferrer"&gt;Dashboards&lt;/a&gt; — Metabase makes it easy to combine charts, metrics, and tables into clean, shareable dashboards that look good without any design effort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated sharing:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/users-guide/dashboard-subscriptions" rel="noopener noreferrer"&gt;Dashboard subscriptions&lt;/a&gt; — Schedule dashboards to be delivered by email or Slack on a recurring basis, keeping stakeholders informed without anyone manually sending reports.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proactive monitoring:&lt;/strong&gt; &lt;a href="https://www.metabase.com/docs/latest/users-guide/15-alerts.html" rel="noopener noreferrer"&gt;Alerts&lt;/a&gt; — Get notified when a metric crosses a threshold so you catch problems or opportunities as they happen, not in a weekly review.'&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Cloud vs self-hosted
&lt;/h2&gt;

&lt;p&gt;Metabase can be used in two main ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud&lt;/strong&gt; — You pay Metabase to host it for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosted&lt;/strong&gt; — You run it on your own server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post I focus on &lt;strong&gt;self-hosting&lt;/strong&gt; because you keep full control of your data, you can place it close to your database, and it is a great option for teams already running services on a VPS or AWS.&lt;/p&gt;
&lt;h2&gt;
  
  
  Self-hosting Metabase with Docker
&lt;/h2&gt;
&lt;h3&gt;
  
  
  What you will need
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A laptop or VM with &lt;a href="https://docs.docker.com/engine/install/ubuntu/" rel="noopener noreferrer"&gt;Docker installed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;An SQL client (MySQL Workbench or DbGate works fine)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What we are going to do
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Run a MySQL database in Docker&lt;/li&gt;
&lt;li&gt;Load sample data into MySQL&lt;/li&gt;
&lt;li&gt;Run Metabase in Docker&lt;/li&gt;
&lt;li&gt;Connect Metabase to MySQL&lt;/li&gt;
&lt;li&gt;Build your first question and dashboard&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Step 1: Run MySQL in Docker
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; test-mysql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; my-mysql-data:/var/lib/mysql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;strong_password &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;customuser &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custompassword1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mydatabase &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 3306:3306 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Here is what each flag does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--name test-mysql&lt;/code&gt; — names the container so you can reference it later&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-v my-mysql-data:/var/lib/mysql&lt;/code&gt; — creates a Docker volume so data persists if the container restarts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-e MYSQL_ROOT_PASSWORD&lt;/code&gt; — sets the root password&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-e MYSQL_USER&lt;/code&gt; / &lt;code&gt;-e MYSQL_PASSWORD&lt;/code&gt; — creates a non-root user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-e MYSQL_DATABASE=mydatabase&lt;/code&gt; — creates a database on first start&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p 3306:3306&lt;/code&gt; — exposes MySQL on port 3306&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-d mysql&lt;/code&gt; — runs the official MySQL image in detached mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To confirm the container started correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker logs test-mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Download and import sample data
&lt;/h3&gt;

&lt;p&gt;Download the MySQL sample database from &lt;a href="https://www.mysqltutorial.org/getting-started-with-mysql/mysql-sample-database/" rel="noopener noreferrer"&gt;mysqltutorial.org&lt;/a&gt;, unzip it, and import the SQL dump using MySQL Workbench or DbGate. You should be able to preview all the tables after the import completes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Run Metabase
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 3000:3000 &lt;span class="nt"&gt;--name&lt;/span&gt; metabase metabase/metabase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give it a minute or two to boot, then open your browser at &lt;code&gt;http://localhost:3000&lt;/code&gt; or &lt;a href="http://your-ip-address:3000" rel="noopener noreferrer"&gt;http://your-ip-address:3000&lt;/a&gt;. Follow the setup wizard — choose your language and create your admin account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb16aiuiy539xf5tla97u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb16aiuiy539xf5tla97u.png" alt="Metabase Welcome Screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Connect Metabase to MySQL
&lt;/h3&gt;

&lt;p&gt;Metabase is able to connect to host of databases below:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9jr2nauix1z77sq0mni.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9jr2nauix1z77sq0mni.png" alt="Metabase connection option"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When Metabase prompts for database connection details, use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Port&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3306&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mydatabase&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Username&lt;/td&gt;
&lt;td&gt;&lt;code&gt;customuser&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Password&lt;/td&gt;
&lt;td&gt;the password you set above&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8nws0wcayqh9z7gucffy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8nws0wcayqh9z7gucffy.png" alt="metabase-connected"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbineoh0ke4nx7st7cbmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbineoh0ke4nx7st7cbmr.png" alt="payment-metabase-table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Build something small
&lt;/h3&gt;

&lt;p&gt;Once the connection works, try this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask a simple question — for example, total payment per month.&lt;/li&gt;
&lt;li&gt;Save it.&lt;/li&gt;
&lt;li&gt;Add it to a new dashboard.&lt;/li&gt;
&lt;li&gt;Share the dashboard link with your team.&lt;/li&gt;
&lt;li&gt;Create notification to alert your team of important events.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the moment Metabase starts paying for itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyoa5vkhlshv2eheqe886.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyoa5vkhlshv2eheqe886.png" alt="Metabase Notification"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;I like Metabase because it is practical. It gets a team from "we have data" to "we can actually use it" without a heavy setup or a dedicated data engineer.&lt;/p&gt;

&lt;p&gt;Do you need help self-hosting Metabase for your organization? Feel free to reach out to me on &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and on &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter @Paschal_ik&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found this useful, you can &lt;a href="https://buymeacoffee.com/paschalogu" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;buy me a coffee&lt;/a&gt;
  — I'd always appreciate you.&lt;/p&gt;

</description>
      <category>database</category>
      <category>datascience</category>
      <category>docker</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Growing in a Job you Love: Simple Yet Powerful Strategies That Work</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Thu, 23 Jan 2025 19:51:22 +0000</pubDate>
      <link>https://dev.to/paschalogu/growing-in-a-job-you-love-simple-yet-powerful-strategies-that-work-2mci</link>
      <guid>https://dev.to/paschalogu/growing-in-a-job-you-love-simple-yet-powerful-strategies-that-work-2mci</guid>
      <description>&lt;p&gt;Two years ago, I attended a session by &lt;a href="https://www.linkedin.com/in/imichaelowolabi/" rel="noopener noreferrer"&gt;Michael Madu&lt;/a&gt; where he delivered a powerful session that stuck with me.  The nuggets he shared shaped my approach to work at &lt;a href="https://getanchor.co/" rel="noopener noreferrer"&gt;Anchor&lt;/a&gt; ever since. I came to realise that it’s not just about having the right skills—it’s also about aligning your efforts with what truly matters to the business.&lt;/p&gt;

&lt;p&gt;Below are tested strategies you can incorporate to remain relevant and grow in any job you choose:&lt;/p&gt;

&lt;h2&gt;
  
  
  1.) Know and Care About the Business
&lt;/h2&gt;

&lt;p&gt;Take the time to understand the business: goals, challenges, and the value delivered to customers. When you genuinely care about the business, it shows. You’ll make better decisions, prioritize effectively, and demonstrate that you’re not just a number in the team.&lt;br&gt;
Don't be shy to ask questions about the business model. Pay attention to industry trends and show that you’re invested in more than just your role. From a personal standpoint, it is rare to retain what you don't care about.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.) Link Your Work to the Company's Bottom Line
&lt;/h2&gt;

&lt;p&gt;Every business cares about two things: making money and saving money. The more directly your work ties into these goals, the more relevant you are to the organization.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Revenue Generation: Are you helping attract, retain, or satisfy paying customers?&lt;/li&gt;
&lt;li&gt;Cost Savings: Are you improving processes, reducing inefficiencies, or cutting unnecessary expenses?
Think about how your role fits into these two boxes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3.) Show Up and Own Something
&lt;/h2&gt;

&lt;p&gt;When you’re the go-to person for something important, your value increases. Being reliability and accountability sets you apart. Even if it is a process or problem you identified that need to be solved, take full ownership and deliver results. Ownership isn’t just about doing what was assigned; it’s about identifying opportunities for improvement, solving problems proactively, and taking initiatives.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus Point:
&lt;/h3&gt;

&lt;h2&gt;
  
  
  4.) Communicate your impact - Show Working
&lt;/h2&gt;

&lt;p&gt;Use metrics and tangible results to highlight how your work contributes to the company’s financial health. Don’t just do the work—show the value of the work.&lt;/p&gt;

&lt;p&gt;If you found this article helpful, you can support me here: &lt;a href="http://buymeacoffee.com/paschalogu" rel="noopener noreferrer"&gt;Buy Me a Coffee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do you have any approach to staying relevant and growing in your job? You can share them in the comments! 💡&lt;/p&gt;

</description>
      <category>growth</category>
      <category>learning</category>
    </item>
    <item>
      <title>What developers really want</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Sat, 21 Dec 2024 20:24:33 +0000</pubDate>
      <link>https://dev.to/paschalogu/what-developers-really-want-aae</link>
      <guid>https://dev.to/paschalogu/what-developers-really-want-aae</guid>
      <description>&lt;p&gt;I had the opportunity to assist over 200+ businesses and developers build and scale financial solutions in 2024. &lt;/p&gt;

&lt;p&gt;Through this, I got valuable insights on what developers are looking for when selecting an API provider to power their innovations.&lt;/p&gt;

&lt;p&gt;Summarised below are five key factors consistently come up in discussions with developers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.) Security 🔐 :&lt;/strong&gt; Developers prioritize the protection of their data and that of their users. When events are sent across systems, developers expect these events to be encrypted and protected against interception or tampering by bad actors. Security is simply non-negotiable!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.) Reliability 📈:&lt;/strong&gt; Uninterrupted service is a top priority. APIs must be fast, reliable, and have strong high uptime values. Providers who fulfil their promises are highly valued by developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.) Consistent API Structure :&lt;/strong&gt; A uniform API structure facilitates integration. Developers value predictable API formats and user-friendly error messages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.) Comprehensive &amp;amp; Updated Documentation 📝:&lt;/strong&gt; The quality of documentation significantly influences developers' experience. In-depth documentation including use cases, examples, step-by-step instructions, and easily searchable references significantly enhance developer satisfaction. Great docs = Great experience!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.) Fast Support Response Time 🧑‍💻:&lt;/strong&gt; When developers hit a roadblock, they need answers, and they need it fast ⚡️. Support must be great for developers to keep coming back.&lt;/p&gt;

&lt;p&gt;Which of these factors do you believe holds the most significance for developers? &lt;/p&gt;

&lt;p&gt;If you found this article helpful, you can support me here: &lt;a href="http://buymeacoffee.com/paschalogu" rel="noopener noreferrer"&gt;Buy Me a Coffee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know your thoughts in the comments!👇 Also, feel free to connect with me on LinkedIn at &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;Paschal Ogu&lt;/a&gt; and on X (formerly Twitter) &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;@Paschal_Ik&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PS:&lt;br&gt;
If you are developing a solution tailored for developers, feel free to drop a DM. Let's collaborate.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>developers</category>
      <category>api</category>
    </item>
    <item>
      <title>I Passed Google Associate Cloud Engineer Certification Exam in One Sitting 🕺🏻🥳</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Sun, 28 Jul 2024 15:21:05 +0000</pubDate>
      <link>https://dev.to/paschalogu/i-passed-google-associate-cloud-engineer-certification-gcp-ace-exam-in-one-sitting-2jfj</link>
      <guid>https://dev.to/paschalogu/i-passed-google-associate-cloud-engineer-certification-gcp-ace-exam-in-one-sitting-2jfj</guid>
      <description>&lt;p&gt;The reliability of Google's email service, Gmail, sharpened my keen interest in Google's Site Reliability Engineering (SRE) culture. I was intrigued by the secrets behind its remarkable availability, so I went deep into understanding their insfrastrture.&lt;/p&gt;

&lt;p&gt;Gmail is a service I use daily, and its exceptional reliability inspired me to learn more. I went on a journey to understand how Google configures, deploys, and manages cloud solutions that power Gmail. This curiosity ultimately led me to certification. Safe to say my curiosity got me certified.&lt;/p&gt;

&lt;p&gt;I validated my experience in cloud technology by earning the Associate Google Cloud Engineer certification and badge. This achievement serves to prove my ability to configure, deploy, and manage cloud solutions on the Google Cloud Platform (GCP).&lt;/p&gt;

&lt;p&gt;In this post, I will be detailing the key resources I used to adequately prepare for and pass this exam in one sitting and explain why this certification is important to me.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://www.credly.com/badges/a765a0b0-d403-4180-b3e5-49c46666046c/public_url" rel="noopener noreferrer"&gt;Verify my credentials here&lt;/a&gt;👈&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnbnw9h7ecxe888az5z5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnbnw9h7ecxe888az5z5.png" alt="Google Cloud Certification" width="792" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How I Prepared: Journey, Duration and Cost
&lt;/h3&gt;

&lt;p&gt;As you may already guess, cloud concepts are not new to me. I have years of experience with Amazon Web Services (AWS), Microsoft Azure Cloud, Oracle Cloud, DigitalOcean and other cloud providers. To sit for this examination, all I needed was consolidate the knowledge to Google Cloud concepts.&lt;/p&gt;

&lt;p&gt;The Google cloud certification journey started with my interest to join the &lt;a href="https://cloud.google.com/innovators" rel="noopener noreferrer"&gt;Google Cloud Innovators&lt;/a&gt;. The program looks for practitioners who are passionate, driven, and ready to push boundaries. I got an email invite to join the Get Certified program.  This program lasted for 10 weeks and was packed with hands-on labs, video and text based resources. &lt;/p&gt;

&lt;p&gt;The Associate Cloud Engineer certification exam costs $125 at the time of publishing this post. However, as a benefit of being in the Get Certified program, you get voucher to sit for one exam from Google.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources Used
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Google Cloud Free Credit&lt;/strong&gt;: I signed up for the Google Cloud free trial. The GCP free trial was an excellent resource for gaining hands-on experience. I completed several labs and exercises, which reinforced my theoretical knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Skills Boost (formerly Qwiklabs)&lt;/strong&gt;: This &lt;a href="https://www.cloudskillsboost.google/paths/11" rel="noopener noreferrer"&gt;Cloud Engineer Learning Path&lt;/a&gt; provided free access to labs, videos and texts to guide my preparation. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Udemy &amp;amp; YouTube Courses&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;"Google Cloud Associate Cloud Engineer certification" by &lt;a href="https://www.udemy.com/course/google-cloud-certification-associate-cloud-engineer" rel="noopener noreferrer"&gt;Ranga Karanam&lt;/a&gt;. I highly recommend this course.&lt;/li&gt;
&lt;li&gt;There are also several free YouTube courses available, such as this one by &lt;a href="https://www.youtube.com/watch?v=jpno8FSqpc8" rel="noopener noreferrer"&gt;freeCodeCamp.org&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practice Exams&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Google provides an official &lt;a href="https://cloud.google.com/learn/certification/guides/cloud-engineer" rel="noopener noreferrer"&gt;preparation guide&lt;/a&gt; and &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSfexWKtXT2OSFJ-obA4iT3GmzgiOCGvjrT9OfxilWC1yPtmfQ/viewform" rel="noopener noreferrer"&gt;review questions&lt;/a&gt; here.&lt;/li&gt;
&lt;li&gt;However, I highly recommend the &lt;a href="https://www.udemy.com/course/latest-gcp-ace-google-associate-cloud-engineer-practice-exams-tests" rel="noopener noreferrer"&gt;practice exam&lt;/a&gt; course on Udemy &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Personal Impact of My Certification
&lt;/h3&gt;

&lt;p&gt;Adding this certification to my profile enhances my professional credibility. It serves as an official acknowledgment of my expertise in Google Cloud and cloud technologies as a whole. I am certain it would open doors to opportunities and collaborations within the cloud space.&lt;/p&gt;

&lt;p&gt;On a personal level, passing this GCP ACE exam is a proud accomplishment. It reflects my dedication, hard work, and ability to achieve my goals. This sense of personal achievement motivates me to continue learning and pursuing further professional development opportunities. &lt;em&gt;(I would get to back my proposals with official certification from Google)&lt;/em&gt; 🤠.&lt;/p&gt;

&lt;h3&gt;
  
  
  What This Means for You
&lt;/h3&gt;

&lt;p&gt;With my Google Cloud certification, I'm well-equipped to handle cloud operations, host applications, manage infrastructure and monitor services in a compliant and secure manner. &lt;/p&gt;

&lt;p&gt;If you're interested in leveraging cloud technologies for your business, feel free to reach out. Let's explore how we can drive your business forward!&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://linkdin.com/in/paschal-ogu" rel="noopener noreferrer"&gt;Paschal Ogu&lt;/a&gt;&lt;br&gt;
Follow on X (twitter): &lt;a href="https://x.com/Paschal_ik" rel="noopener noreferrer"&gt;x.com/@paschal_ik&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What's Next
&lt;/h3&gt;

&lt;p&gt;My plan is to continue building and deploying in the cloud. I am also considering pursuing the Google Cloud Professional Certification or the AWS Cloud Solution certification.&lt;/p&gt;

&lt;p&gt;💡 This article was first published at blog.paschalogu.com. If you found it useful, follow me on &lt;a href="https://x.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, and on &lt;a href="https://linkdin.com/in/paschal-ogu" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. Also subscribe to my YouTube Channel: &lt;a href="https://www.youtube.com/@PaschalBuilds" rel="noopener noreferrer"&gt;PaschalBuilds&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>certification</category>
      <category>learning</category>
    </item>
    <item>
      <title>Simplified Virtual Development Environment on the Browser: GitHub Codespace</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Wed, 19 Jun 2024 21:35:39 +0000</pubDate>
      <link>https://dev.to/paschalogu/simplified-virtual-development-environment-on-the-browser-github-codespace-1lab</link>
      <guid>https://dev.to/paschalogu/simplified-virtual-development-environment-on-the-browser-github-codespace-1lab</guid>
      <description>&lt;p&gt;Starting my cloud journey, one of the biggest challenges I faced was finding a place to practice Linux commands. GitHub Codespace has completely solved this problem.&lt;/p&gt;

&lt;p&gt;As a seasoned professional, imagine being able to take your entire local development environment with you, minus the hassle of carrying your computer. GitHub Codespace offers exactly that. Codespace is a cloud-based service that allows you to create and run your projects directly from your browser. No need to set up your projects on your local machine — everything you need is hosted online and accessible from any device through the web.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxwsidj41xuub44p03sk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxwsidj41xuub44p03sk.jpg" alt="Local Device Meme" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Executive Summary
&lt;/h2&gt;

&lt;p&gt;This article aims to introduce and simplify GitHub Codespace: a cloud development environment for developers. It covers the prerequisites, pricing, steps to launch and set up a Codespace, including installing essential tools like Terraform, AWS CLI, and Ansible. The guide also details how to push code changes to GitHub and manage Codespace efficiently. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is GitHub Codespace?
&lt;/h2&gt;

&lt;p&gt;GitHub codespace is a remote compute with a text editor (Visual Studio Code) attached to it that runs on the cloud,  where you can set up a development environment. This means that you can install all your project dependencies and run from the browser. It automatically sets up all the necessary components for your project, including the source code, runtime, compiler, debugger, editor, custom configuration files, relevant editor extensions, and additional features.&lt;/p&gt;

&lt;p&gt;With codespace, individuals can get up to 60 hours of free compute per month,  The best part is, it has vim and nano preinstalled. 🤠&lt;/p&gt;

&lt;p&gt;In this guide, I’ll walk you through the process of installing Terraform and AWS CLI within a  codespace, enabling you to manage your infrastructure as code directly from the cloud on the go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-requisite:
&lt;/h2&gt;

&lt;p&gt;To follow along, you simply need to have a Github account. You can click here to &lt;a href="https://github.com/signup" rel="noopener noreferrer"&gt;sign-up&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to launch GitHub Codespace
&lt;/h2&gt;

&lt;h3&gt;
  
  
  i.) Create a GitHub Repository
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Log into &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;Github.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click on “New”, at the top left page of the screen to add a new repository.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcgecesfl88zesdn5lxy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcgecesfl88zesdn5lxy.png" alt="new-repository.png" width="485" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Give you the new a ay name, and select the button to Add a README file. Then click on “Create”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyquda0vts2o8p5nl2zx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyquda0vts2o8p5nl2zx.png" alt="create-repository.png" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ii.) Create Codespace for the Repository
&lt;/h3&gt;

&lt;p&gt;Once the repository has been created, we can add a codespace using the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the newly created repository and click on “Code”.&lt;/li&gt;
&lt;li&gt;Select "Codespaces" and then click on “Create codespace on main”.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjythhrr1c89lm158lvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjythhrr1c89lm158lvh.png" alt="create-codespace.png" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This process will generate a virtual development environment on the main branch of the repository, facilitating seamless coding and collaboration."&lt;/p&gt;

&lt;p&gt;A couple of things happen when you create your development environment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;VM and storage are assigned to your codespace.&lt;/li&gt;
&lt;li&gt;Container is created and your repository is cloned.&lt;/li&gt;
&lt;li&gt;You can connect to the codespace.&lt;/li&gt;
&lt;li&gt;Codespace continues with post-creation setup.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will open a text editor (visual studio code) on a new browser window, we you can start your development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set-up the Codespace
&lt;/h2&gt;

&lt;p&gt;Welcome to the exciting part where you get to set up your virtual environment to mirror your local development setup. This virtual environment will allow you to write, compile, debug, and test your code just like you would on your local machine.&lt;/p&gt;

&lt;p&gt;In the below steps, we will setup and install terraform, AWS CLI, and Ansible on or virtual environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install Terraform, AWS CLI and Ansible
&lt;/h3&gt;

&lt;h3&gt;
  
  
  i.) Make a File
&lt;/h3&gt;

&lt;p&gt;Open your terminal within the virtual code environment and use the following command to make a new file &lt;code&gt;nano setup_tools.sh&lt;/code&gt; .  This command above will open up the nano editor on your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano setup_tools.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tip: If your terminal is not open by default, you can open this by using the hamburger button at the top right, select &lt;code&gt;Terminal&lt;/code&gt; and &lt;code&gt;New Terminal&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18r511a6klh4p79pxz5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18r511a6klh4p79pxz5e.png" alt="New Terminal" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ii.) Add SetUp Script to the File
&lt;/h3&gt;

&lt;p&gt;Copy the bash script below into the terraform installation file created above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Update package list&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update

&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; gnupg software-properties-common curl

&lt;span class="c"&gt;# Add HashiCorp GPG key&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://apt.releases.hashicorp.com/gpg | &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-key add -

&lt;span class="c"&gt;# Add Terraform repository&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-add-repository &lt;span class="s2"&gt;"deb [arch=amd64] https://apt.releases.hashicorp.com &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;lsb_release &lt;span class="nt"&gt;-cs&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; main"&lt;/span&gt;

&lt;span class="c"&gt;# Update package list again&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update

&lt;span class="c"&gt;# Install Terraform&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; terraform

&lt;span class="c"&gt;# Install AWS CLI&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; awscli

&lt;span class="c"&gt;# Install Ansible&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; software-properties-common
&lt;span class="nb"&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="nt"&gt;--update&lt;/span&gt; ppa:ansible/ansible
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; ansible

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
terraform &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# Verify installation&lt;/span&gt;
aws &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# Verify Ansible installation&lt;/span&gt;
ansible &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To save and exit the editor, press &lt;code&gt;Ctrl + O&lt;/code&gt;, then &lt;code&gt;Enter&lt;/code&gt; to confirm the file name, and finally &lt;code&gt;Ctrl + X&lt;/code&gt; to exit.&lt;/p&gt;

&lt;p&gt;Now, file setup is ready, and you can proceed with running the script to install Terraform, AWS CLI, and Ansible on your virtual environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  iii.) Execute Script
&lt;/h3&gt;

&lt;p&gt;Run the installation script to install terraform and print the version of terraform installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash setup_tools.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will execute all the necessary steps to install Terraform in your GitHub codespace environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lmp6cut9w0l8o0z9lig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lmp6cut9w0l8o0z9lig.png" alt="Installation Complete" width="800" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Push your Changes to GitHub
&lt;/h2&gt;

&lt;p&gt;Follow these steps to add your changes, commit them with a message, and push them to your GitHub repository:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;i.) Stage the File for Commit&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;git add&lt;/code&gt;  command to stage the &lt;code&gt;setup_tools.sh&lt;/code&gt; file. This prepares the file for committing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add setup_tools.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;ii.) Commit the Changes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next, commit the staged file with a descriptive message. This message should give an idea of what changes or additions you made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add setup script"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  iii.) Push the Changes
&lt;/h3&gt;

&lt;p&gt;Finally, push your commit to your GitHub repository. This uploads your changes to GitHub.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codespace is intelligent to push this change to your GitHub repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  To Stop and Exit GitHub Codespace
&lt;/h2&gt;

&lt;h3&gt;
  
  
  i.) List Your Codespaces
&lt;/h3&gt;

&lt;p&gt;On the your terminal, use the following command to list all your active Codespaces. This will help you find the name or ID of the Codespace you want to stop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh codespace list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ii.) Stop the Codespace
&lt;/h3&gt;

&lt;p&gt;Once you've identified the codespace you want to stop, use the following command, replacing &lt;code&gt;&amp;lt;codespace_name_or_id&amp;gt;&lt;/code&gt; with the actual name or ID of your Codespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh codespace stop &lt;span class="nt"&gt;-c&lt;/span&gt; &amp;lt;codespace_name_or_id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is a sample command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gh codespace stop -c miniature-xylophone-wxq5v5pxx5gf57wp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running the above command will kill the session and effectively stop and exit your GitHub Codespace, ensuring that you are not incurring unnecessary usage or costs.&lt;/p&gt;

&lt;p&gt;Once you have run the command above, you can safely close the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;GitHub Codespace is a game changer, providing a simplified, cloud-based development environment accessible directly from the browser. By following the outlined steps in this guide, developers and cloud enthusiasts can quickly set up and configure their workspace, install necessary tools, and seamlessly push changes to GitHub.&lt;/p&gt;

</description>
      <category>virtualmachine</category>
      <category>github</category>
      <category>development</category>
      <category>codespace</category>
    </item>
    <item>
      <title>How I Deployed my Website as a Docker Container</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Fri, 29 Sep 2023 21:17:00 +0000</pubDate>
      <link>https://dev.to/paschalogu/how-i-deployed-my-website-as-a-container-3fje</link>
      <guid>https://dev.to/paschalogu/how-i-deployed-my-website-as-a-container-3fje</guid>
      <description>&lt;p&gt;One of the greatest nightmares of developers is the “It's not working on my machine” problem. I struggled to run my website locally on different machines too. Shout out to &lt;strong&gt;&lt;a href="https://github.com/britslampe" rel="noopener noreferrer"&gt;Brittany Mitchell&lt;/a&gt;&lt;/strong&gt; for giving me the idea to containerize my website. Containerization allowed me to build my website and run it consistently across different environments and machines. Docker is the tool for achieving this containerization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmsimcyg8pul9mg5gsny.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmsimcyg8pul9mg5gsny.jpeg" alt="Image Source: r/ProgrammerHumour" width="422" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Docker?
&lt;/h2&gt;

&lt;p&gt;Docker is an open-source platform for developing, shipping, and running applications. It is a technology that allows you to incorporate and store your code and its dependencies into a neat little package called an image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dockerfile, Docker Image, and Docker Container
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dockerfile:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Dockerfile is a text file containing a collection of commands or procedures. Consider this file as a script that defines how our container image will be built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Image:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A docker image is a packaged, runnable instance of an application or environment. It contains everything needed to run a piece of software (or website in our case), including the code, a runtime, libraries, environment variables, and configuration files. A docker image is read-only template for creating containers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Container:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A docker container is a lightweight, stand-alone, executable package of software that includes everything needed to run the software. Containers isolate applications from each other and the underlying infrastructure while providing an added layer of protection for the application. Containerization solves the problem related to application deployment, and scalability. It helps promote consistency and efficiency in software development and operations. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5vjiak4eaeaw5gjtqg5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5vjiak4eaeaw5gjtqg5.jpeg" alt="Image Source: JFROG" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Here is how I containerized my website
&lt;/h2&gt;

&lt;p&gt;As a prerequisite, ensure that you have docker installed locally on your machine. &lt;a href="https://docs.docker.com/engine/install/" rel="noopener noreferrer"&gt;Install Docker Engine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code for my website is hosted on &lt;a href="https://github.com/paschalogu/personal-website" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.  To follow along, fork and clone this repository and change directory into it by running the commands below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/paschalogu/personal-website.git
&lt;span class="nb"&gt;cd &lt;/span&gt;personal-website
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: Build the Docker image
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add a Dockerfile&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I created a new file named &lt;strong&gt;Dockerfile&lt;/strong&gt; by running the command &lt;code&gt;touch Dockerfile&lt;/code&gt; in the root of my website directory and added these lines of code below inside the Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;FROM nginx:alpine

COPY &lt;span class="nb"&gt;.&lt;/span&gt; /usr/share/nginx/html

EXPOSE 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;FROM nginx:alpine&lt;/code&gt;  line tells Docker to create a Docker image based on the Nginx web server with Alpine Linux. The &lt;code&gt;COPY . /usr/share/nginx/html&lt;/code&gt; line will copy the website content from the directory we are in into the image being built. This means that our website code will replace the default Nginx web server content. &lt;code&gt;EXPOSE 80&lt;/code&gt; specifies that the container should be capable of serving HTTP traffic on port 80.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build Image&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I built the image by running the line of code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; personal-website:v1 &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;docker build&lt;/code&gt; command tells docker to build our website as an image based on the instructions provided in a Dockerfile above. The &lt;code&gt;-t personal-website:v1&lt;/code&gt; tells docker to tag the image personal-website:v1. v1 signifies that this is version 1. The period (.) tells Docker to look for the Dockerfile in the current directory and use the files and directories in this location during the build process. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcfex7zs3l5jw7api0gss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcfex7zs3l5jw7api0gss.png" alt="Docker build" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running the command &lt;code&gt;docker images&lt;/code&gt;  shows this image I just built:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzyu65hrtc7tl488uou3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzyu65hrtc7tl488uou3.png" alt=" " width="800" height="58"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Push to Docker Registry
&lt;/h2&gt;

&lt;p&gt;I logged in to &lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;Docker Hub Container Image Library&lt;/a&gt; and created a new repository.  I named it &lt;code&gt;personal-website&lt;/code&gt; and gave it a short description (description is optional).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjgw56xjhctsg836dxn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjgw56xjhctsg836dxn4.png" alt="Docker Registry" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I ran the &lt;code&gt;docker push&lt;/code&gt; command below to push the image I built in the previous step, but it failed with the error below 😞.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker push paschalogu/personal-website:v1

The push refers to repository &lt;span class="o"&gt;[[&lt;/span&gt;docker.io/paschalogu/personal-website]&lt;span class="o"&gt;(&lt;/span&gt;http://docker.io/paschalogu/personal-website&lt;span class="o"&gt;)]&lt;/span&gt;
An image does not exist locally with the tag: paschalogu/personal-website
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why did it fail? The push command was looking for an image named paschalogu/personal-website:v1, but didn't find one.&lt;/p&gt;

&lt;p&gt;To fix this, I ran the &lt;code&gt;docker tag&lt;/code&gt; command to tag my image and then re-ran the &lt;code&gt;docker push command&lt;/code&gt; to push to my docker repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker tag personal-website:v1 paschalogu/personal-website:v1

docker push paschalogu/personal-website:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Test Configuration
&lt;/h2&gt;

&lt;p&gt;Opened my browser and navigated to the website &lt;a href="https://labs.play-with-docker.com/" rel="noopener noreferrer"&gt;https://labs.play-with-docker.com/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Selected Login and then chose docker from the drop-down list. Then, I sign in with my Docker Hub account and clicked the Start button.&lt;/p&gt;

&lt;p&gt;I clicked on ADD NEW INSTANCE option on the left sidebar. After a few seconds, a terminal window opened up in my browser.&lt;/p&gt;

&lt;p&gt;In the terminal, I started my freshly pushed wevsite.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull paschalogu/personal-website:v1

docker run &lt;span class="nt"&gt;-dp&lt;/span&gt; 80:80 paschalogu/personal-website:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Will you be running your applications and websites as a docker container? Let me know in the comments. Feel free to connect with me on LinkedIn at &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/paschal-ogu/&lt;/a&gt; and on Twitter &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;@Paschal_Ik&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found this article helpful, you can support me here: &lt;a href="http://buymeacoffee.com/paschalogu" rel="noopener noreferrer"&gt;Buy Me a Coffee&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.aquasec.com/cloud-native-academy/docker-container/" rel="noopener noreferrer"&gt;https://www.aquasec.com/cloud-native-academy/docker-container/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.docker.com/get-started/04_sharing_app/" rel="noopener noreferrer"&gt;https://docs.docker.com/get-started/04_sharing_app/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>container</category>
      <category>devops</category>
    </item>
    <item>
      <title>Project: Set up EKS, ECR, and MySQL Database using Terraform in AWS</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Sat, 02 Sep 2023 10:04:18 +0000</pubDate>
      <link>https://dev.to/paschalogu/project-set-up-eks-ecr-and-mysql-database-using-terraform-in-aws-1l66</link>
      <guid>https://dev.to/paschalogu/project-set-up-eks-ecr-and-mysql-database-using-terraform-in-aws-1l66</guid>
      <description>&lt;h3&gt;
  
  
  Objectives:
&lt;/h3&gt;

&lt;p&gt;To use infrastructure-as-code tools (Terraform):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up Elastic Kubernetes Service (EKS) cluster, Virtual private Cloud (VPC), subnets, and other required resources.&lt;/li&gt;
&lt;li&gt;Set up a private Docker registry to store the application's Docker images.&lt;/li&gt;
&lt;li&gt;Setup MySQL Database.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;The repository referenced throughout this project is hosted on my github: &lt;a href="https://github.com/paschalogu/Terraform" rel="noopener noreferrer"&gt;https://github.com/paschalogu/Terraform&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Infrastructure Architecture Diagram
&lt;/h3&gt;

&lt;p&gt;Figure 1: Infrastructure diagram of the setup&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxsb443wk2vbn7ynpy7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxsb443wk2vbn7ynpy7f.png" alt="Infrastructure diagram of the setup" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Client device used to prepare the infrastructure as code. It should have git, terraform and AWS CLI installed.&lt;/li&gt;
&lt;li&gt;GitHub: Source Code Management GitHub used for code versioning. With git pull/git push, files are kept in sync with the remote server.&lt;/li&gt;
&lt;li&gt;Terraform: The infrastructure-as-code tool used to codify and provision the infrastructure on cloud.&lt;/li&gt;
&lt;li&gt;AWS Cloud, where the infrastructure resources are provisioned.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 0: Getting Started
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;br&gt;
To reproduce this set-up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Familiarity with Linux, Git and GitHub, infrastructure-as-code and DevOps has been assumed.&lt;/li&gt;
&lt;li&gt;Ubuntu Linux 20.04 Focal Fossa LTS distribution was used for all the activities in the task.&lt;/li&gt;
&lt;li&gt;An AWS account with appropriate permissions to create resources like EKS, VPC, subnets, ECR, and RDS (MySQL) is required. Visit this link to &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html" rel="noopener noreferrer"&gt;create an AWS account&lt;/a&gt; if you don't already have an account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Considerations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Availability: For High availability and fault tolerance, instances have been replicated on different availability zones (us-east-1a, us-east-1b, us-east-1c) within the same region.&lt;/li&gt;
&lt;li&gt;Security: Principle of Least Privilege was considered when assigning policy to IAM role for the cluster.&lt;/li&gt;
&lt;li&gt;Security: Public access to the MySQL database has been disabled.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Step 1: Confirm Terraform is Installed Locally
&lt;/h3&gt;

&lt;p&gt;The command to install Terraform may be slightly different, depending on your local operating system. Refer to the terraform installation documentation for system-specific requirements: &lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Install Terraform&lt;/a&gt;.&lt;br&gt;
Below is a command to install Terraform classic on an Ubuntu Linux machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap &lt;span class="nb"&gt;install &lt;/span&gt;terraform &lt;span class="nt"&gt;--classic&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To confirm the version of Terraform installed, run the command: &lt;code&gt;terraform --version&lt;/code&gt;. This command will print the version of terraform installed.&lt;/p&gt;

&lt;p&gt;Figure 2: showing version of terraform installed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbj50683472la1ug7ov2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbj50683472la1ug7ov2.png" alt="terraform version" width="601" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install and Configure AWS CLI to Authenticate to AWS.
&lt;/h3&gt;

&lt;p&gt;Download and install the AWS CLI based on your operating system. Refer to this AWS documentation for device/operating system specific instruction: &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;Install or update AWS CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Below is a command to install it on Linux, distribution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"awscliv2.zip"&lt;/span&gt;
unzip awscliv2.zip
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./aws/install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To confirm the version of terraform installed, run the command: &lt;code&gt;aws --version&lt;/code&gt;. This command will print the version of AWS CLI that is installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Figure 3: showing version of aws-cli installed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvsj7tsq770mahj88f1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvsj7tsq770mahj88f1h.png" alt="aws-version.png" width="711" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Optionally, you can run this command to remove the installation files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; aws awscliv2.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Set Up AWS Environment Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Set up AWS environment variables to help Terraform automatically pick up your AWS credentials.&lt;/p&gt;

&lt;p&gt;Get your access keys and secret keys from AWS: follow this documentation for the detailed steps: &lt;a href="https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html" rel="noopener noreferrer"&gt;AWS Account and Access Keys&lt;/a&gt;&lt;br&gt;
Run the command on your terminal: &lt;strong&gt;&lt;code&gt;aws configure&lt;/code&gt;&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the following environment variables with your AWS credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt;&lt;/strong&gt;: &amp;lt; AWS_Access_Key_ID &amp;gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;&lt;/strong&gt;: &amp;lt; AWS_Secret_Access_Key &amp;gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;AWS_DEFAULT_REGION&lt;/code&gt;&lt;/strong&gt;: &amp;lt; Preferred_AWS_region (e.g., &lt;strong&gt;&lt;code&gt;us-east-1&lt;/code&gt;&lt;/strong&gt;) &amp;gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Default output format&lt;/code&gt;&lt;/strong&gt;: json&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the following command to verify that your AWS CLI is configured correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see information about the AWS account that your credentials are associated with.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create your Terraform Configuration Files:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Option 1: Pull the repository from GitHub
&lt;/h4&gt;



&lt;p&gt;Clone the Terraform repository from GitHub to your client device and change directory &lt;code&gt;cd&lt;/code&gt; into this repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/paschalogu/Terraform.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Option 2: Create your own terraform configuration files
&lt;/h4&gt;

&lt;p&gt;Make a Repository on your local device to hold Terraform codes, and change directory to this newly created repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;Terraform &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;Terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;mkdir&lt;/code&gt; command creates the directory, and the &lt;code&gt;cd&lt;/code&gt; command changes the working directory to the newly created "Terraform" directory.&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;main.tf&lt;/code&gt; for the main Terraform configuration, &lt;code&gt;variables.tf&lt;/code&gt; to define variables (helpful for managing settings), and &lt;code&gt;outputs.tf&lt;/code&gt; to define outputs (display useful information after running &lt;code&gt;terraform apply&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;main.tf variables.tf outputs.tf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command above creates the three files at ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write your Terraform code in the Appropriate Files.&lt;/strong&gt;&lt;br&gt;
Run the command &lt;code&gt;nano main.tf&lt;/code&gt; and paste the code from &lt;a href="https://github.com/paschalogu/Terraform/blob/main/main.tf" rel="noopener noreferrer"&gt;main.tf&lt;/a&gt; inside:&lt;br&gt;
Repeat same steps for &lt;code&gt;variables.tf&lt;/code&gt; and &lt;code&gt;outputs.tf&lt;/code&gt; and paste the code from &lt;a href="https://github.com/paschalogu/Terraform/blob/main/variables.tf" rel="noopener noreferrer"&gt;variables.tf&lt;/a&gt; and &lt;a href="https://github.com/paschalogu/Terraform/blob/main/outputs.tf" rel="noopener noreferrer"&gt;outputs.tf&lt;/a&gt; respectively.&lt;/p&gt;

&lt;p&gt;This is the structure of the directory after files have been created.&lt;/p&gt;

&lt;p&gt;Figure 4: Showing the structure of the Terraform Directory&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5cie3hlwn25dybhn9muc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5cie3hlwn25dybhn9muc.png" alt="Terraform directory configuration" width="711" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources to be created&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Virtual Private Cloud (VPC): The Virtual Private Cloud will be created to isolate virtual networks within the AWS cloud infrastructure, providing control over network settings, IP address ranges, and subnets securely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subnets: Three subnets will be created within 3 availability zones. This multi-AZ architecture is considered and designed to provide redundancy and high availability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Role: Identity and Access Management (IAM) role that has the necessary permissions for managing the cluster will be created. This IAM role will be used by the EKS cluster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Role Policy Attachment: A resource to attachment the AmazonEKSClusterPolicy to the IAM role created for the EKS cluster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elastic Kubernetes Service (EKS) cluster: AWS EKS cluster will be created and associated with the IAM role created above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elastic Container Registry (ECR): An Elastic Container Registry in which you to store Application Docker images will be created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL database Instance: An RDS MySQL instance with the specified configurations like identifier, engine, instance class, allocated storage, username, password, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Step 4: Initialize, Plan, and Apply Terraform Configuration in your Project Directory:
&lt;/h3&gt;

&lt;p&gt;To initialize the terraform project, run the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To review the list of changes that will be applied during creation, run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply Terraform configuration to create AWS resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terraform will display the changes to be made to AWS cloud infrastructure. Type &lt;strong&gt;&lt;code&gt;yes&lt;/code&gt;&lt;/strong&gt; and press Enter to confirm and apply the changes. To see the state of the infrastructure, run the command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform state list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Figure 5: Showing the terraform state command&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsdumn5cyvh08833w578g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsdumn5cyvh08833w578g.png" alt="Terraform State List" width="711" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, you can use AWS CLI or the AWS Management Console to verify that the resources were created as expected.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5: Pushing the code to GitHub
&lt;/h3&gt;

&lt;p&gt;Create a new repository on GitHub and push the Terraform repository from the command line.&lt;/p&gt;

&lt;p&gt;Initialize the repository for git to track changes in the repository.On your project directory, run the below command to initialize git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a &lt;code&gt;.gitignore&lt;/code&gt; file by running the command &lt;code&gt;nano .gitignore&lt;/code&gt;.&lt;br&gt;
Input the files you don't want to commit to gitHub in this .gitignore file. This includes variable files and terraform state files. Any file added here will not be pushed to GitHub. Add below files to the .gitignore file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.git/
.terraform/
&lt;span class="k"&gt;*&lt;/span&gt;.tfvars
terraform.tfstate
terraform.tfstate.backup
.terraform.lock.hcl
variables.tf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Proceed to add, commit, and push the code to Github.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Commit Message"&lt;/span&gt;
git branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
git remote add origin https://github.com/&amp;lt;github_username&amp;gt;/&amp;lt;github_repo&amp;gt;.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: Deletion of Resources
&lt;/h3&gt;

&lt;p&gt;To destroy, delete and clean up everything, run the destroy command below and type &lt;code&gt;yes&lt;/code&gt; when prompted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform destroy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you found this article helpful, you can support me here: &lt;a href="http://buymeacoffee.com/paschalogu" rel="noopener noreferrer"&gt;Buy Me a Coffee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
    </item>
    <item>
      <title>GitHub Actions in Automation: Display Latest Blog Posts and Badges on your GitHub Profile</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Tue, 25 Jul 2023 08:11:17 +0000</pubDate>
      <link>https://dev.to/paschalogu/github-actions-in-automation-display-latest-blog-posts-and-badges-on-your-github-profile-33hk</link>
      <guid>https://dev.to/paschalogu/github-actions-in-automation-display-latest-blog-posts-and-badges-on-your-github-profile-33hk</guid>
      <description>&lt;p&gt;Whenever I publish a blog post here on Dev Community, or achieve a new badge from Credly, I have to manually update my GitHub profile to display these updates. It's not the most exciting task and can be a drain on productivity. &lt;/p&gt;

&lt;p&gt;There has to be a way to automate the boring stuffs, right?  Isn’t that what developers do?&lt;/p&gt;

&lt;p&gt;The answer is yes! This is where GitHub Actions comes in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu469hzkuraynb2oq6qdo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu469hzkuraynb2oq6qdo.gif" alt="el-profesor-la-casa-de-papel.gif" width="488" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this blog post, we will explore GitHub Actions automation solution to eliminate this repetitive process.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is GitHub Actions?&lt;/li&gt;
&lt;li&gt;Steps to auto-update Dev.to Blog Posts on GitHub Profile&lt;/li&gt;
&lt;li&gt;Steps to auto-update Credly Badges on GitHub&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  What is GitHub Actions?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt; is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline.&lt;/p&gt;

&lt;p&gt;GitHub Actions helps you automate processes in your GitHub repository using workflows. &lt;a href="https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#workflows" rel="noopener noreferrer"&gt;Workflows&lt;/a&gt; are configurable-automated processes that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule. Learn how to write GitHub Actions YAML files in the &lt;a href="https://github.com/padok-team/github-actions-tutorial" rel="noopener noreferrer"&gt;GitHub Tutorial&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Let's get into it.&lt;br&gt;
The code used in this blog post can be found on my &lt;a href="https://github.com/paschalogu/paschalogu/tree/main" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  Steps to auto-update Dev.to Blog Posts on GitHub Profile:
&lt;/h3&gt;

&lt;p&gt;a.) Edit your special repository README file on GitHub &lt;code&gt;&amp;lt;username&amp;gt;/&amp;lt;username&amp;gt;/README.md&lt;/code&gt;. Add the following section to your &lt;strong&gt;README.md&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;---&lt;/span&gt;
&lt;span class="c"&gt;## Latest Blog Posts&lt;/span&gt;
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt; BLOG-POST-LIST:START &lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt; BLOG-POST-LIST:END &lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;b.) On this special repository, create a folder named &lt;code&gt;.github&lt;/code&gt; and create &lt;code&gt;workflows&lt;/code&gt; folder inside if it doesn't already exist.&lt;br&gt;
c.) Create a new file named &lt;code&gt;blogpost-update.yml&lt;/code&gt; inside this workflows directory. Copy and paste the below YAML code inside the file you just created:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6qeh22h0hrcju6mmsnk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6qeh22h0hrcju6mmsnk.png" alt="GitHub workflows" width="738" height="290"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;name: Latest blog post workflow
on:
  schedule: &lt;span class="c"&gt;# Run workflow automatically&lt;/span&gt;
    - cron: &lt;span class="s1"&gt;'0 * * * *'&lt;/span&gt; &lt;span class="c"&gt;# Runs every hour, on the hour&lt;/span&gt;
  workflow_dispatch: &lt;span class="c"&gt;# Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly&lt;/span&gt;
permissions:
  contents: write &lt;span class="c"&gt;# To write the generated contents to the readme&lt;/span&gt;

&lt;span class="nb"&gt;jobs&lt;/span&gt;:
  update-readme-with-blog:
    name: Update this repo README with latest blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@master
        with:
          feed_list: &lt;span class="s2"&gt;"https://dev.to/feed/&amp;lt;devto username&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;d.) Replace the feed_list URL with your own dev.to RSS feed.&lt;br&gt;
e.) Save the changes and commit your code. You can either allow this workflow to run automatically, or you can manually trigger this workflow.&lt;/p&gt;

&lt;p&gt;Here are some other popular blog sources you may want to automate:&lt;/p&gt;

&lt;p&gt;Dev.to: &lt;code&gt;https://dev.to/feed/username&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Medium: &lt;code&gt;https://medium.com/feed/@username&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Hashnode: &lt;code&gt;https://@username.hashnode.dev/rss.xml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;WordPress: &lt;code&gt;https://www.example.com/feed/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;YouTube Channel Video: &lt;code&gt;https://www.youtube.com/feeds/videos.xml?channel_id=channelId&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;
  
  
  Steps to auto-update Credly Badges on GitHub:
&lt;/h3&gt;

&lt;p&gt;a.) Edit your special repository README file on GitHub //README.md.&lt;br&gt;
b.) Add the following section to your &lt;strong&gt;README.md&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="nt"&gt;---&lt;/span&gt;
&lt;span class="c"&gt;## View my verified badges&lt;/span&gt;
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--START_SECTION&lt;/span&gt;:badges--&amp;gt;
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--END_SECTION&lt;/span&gt;:badges--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;c.) Create a GitHub workflow YAML file, &lt;code&gt;badge-update.yml&lt;/code&gt;. Copy the below code and paste it to the new workflow YAML file you created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;name: Update Credly Badges

on:
  schedule:
    &lt;span class="c"&gt;# Runs at 2am UTC&lt;/span&gt;
    - cron: &lt;span class="s2"&gt;"0 2 * * *"&lt;/span&gt;
  workflow_dispatch: &lt;span class="c"&gt;# Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly&lt;/span&gt;
permissions:
  contents: write &lt;span class="c"&gt;# To write the generated contents to the readme&lt;/span&gt;

&lt;span class="nb"&gt;jobs&lt;/span&gt;:
  update-readme:
    name: Update Readme with badges
    runs-on: ubuntu-latest
    steps:
      - name: Badges - Readme
        uses: pemtajo/badge-readme@main
        with:       
          CREDLY_USER: &amp;lt;credly username&amp;gt; &lt;span class="c"&gt;# optional, but default will use the same from github&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;d.) Replace the  with your own credly username.&lt;br&gt;
e.) Save this change and commit your code. You can either allow this workflow to run automatically, or you can manually trigger it.&lt;/p&gt;

&lt;p&gt;Here is how my GitHub Profile looks after running the workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivyb5zcuwyztip6fe4go.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivyb5zcuwyztip6fe4go.png" alt="GitHub ReadMe.md" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this blog post, we introduced GitHub Actions, defined GitHub Actions workflows, dived into the steps to auto-update Dev.To Blog Posts on GitHub Profile and steps to auto-update Credly badges on GitHub Profile. GitHub Actions is a helpful tool to automate processes and save time on repetitive tasks. &lt;/p&gt;

&lt;p&gt;Thanks for reading. Let me know if you found this helpful. You are welcome to follow me on &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter @Paschal_ik&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>productivity</category>
      <category>github</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>How to Configure Apache web server on Linux using Ansible</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Mon, 03 Jul 2023 17:04:47 +0000</pubDate>
      <link>https://dev.to/paschalogu/how-to-configure-apache-web-server-on-linux-using-ansible-2mcd</link>
      <guid>https://dev.to/paschalogu/how-to-configure-apache-web-server-on-linux-using-ansible-2mcd</guid>
      <description>&lt;p&gt;In this blog post, we will configure an Apache web server on a Linux Machine (Azure Virtual Machine) using Ansible. Apache web server is a free and open-source software that allows users to deploy their websites on the internet. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Familiarity with the concept of Infrastructure-as-Code (I.a.C) is helpful, but isn't necessary.&lt;/li&gt;
&lt;li&gt;A Linux VM: Although this action is performed on an Azure virtual machine, similar steps could be performed on any Linux distribution. You can follow this link to automate &lt;a href="https://dev.to/paschalogu/create-azure-virtual-machine-linux-vm-with-terraform-29jp"&gt;creation of virtual machines on Azure&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, let's dive in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Ansible, and why use it?
&lt;/h2&gt;

&lt;p&gt;Ansible is an open-source automation tool that can be used to automate the configuration of servers and systems. It is a command-line IT automation software application that automates cloud provisioning, configuration management, application deployment, and many other IT needs. Read more about Ansible here: &lt;a href="https://docs.ansible.com/ansible/latest/index.html" rel="noopener noreferrer"&gt;Get Started with Ansible.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Let's connect to our virtual machine via SSH. If you have not already created a vm, you can follow this link to automate &lt;a href="https://dev.to/paschalogu/create-azure-virtual-machine-linux-vm-with-terraform-29jp"&gt;creation of virtual machines on Microsoft Azure with Terraform&lt;/a&gt;. Connect to the virtual machine&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh linuxuser@ip_address
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make a directory/folder for this Ansible project and change directory to this folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;ansible
&lt;span class="nb"&gt;cd &lt;/span&gt;ansible
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install Ansible
&lt;/h2&gt;

&lt;p&gt;Make a file for the installation of Ansible. We will call this file &lt;code&gt;installations.sh&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano installation.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the code below into the file &lt;code&gt;installation.sh&lt;/code&gt; Note that python is required to perform Ansible operations, hence it needs to be installed also.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;python3-pip

pip &lt;span class="nb"&gt;install &lt;/span&gt;boto3 botocore

pip &lt;span class="nb"&gt;install &lt;/span&gt;boto

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;ansible
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the command to change the permission of the file and make it executable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ./installation.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the command to install Ansible and the above requirements&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./installation.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can test if Ansible is properly configured by running the command below. This should print the version of Ansible installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create an Ansible playbook
&lt;/h2&gt;

&lt;p&gt;An Ansible playbook is a YAML file with list of instructions that executes against the hosts. It is an organized and systematic unit of scripts which defines work for a server configuration executed by the automation tool Ansible. &lt;/p&gt;

&lt;p&gt;Create a file named &lt;code&gt;ansible-playbook.yml&lt;/code&gt; and paste the code below. In this playbook, we are specifying two tasks (namely &lt;code&gt;installing apache2&lt;/code&gt; and &lt;code&gt;starting apache2&lt;/code&gt;) to be performed on the localhost.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;---&lt;/span&gt;
- name: installing and starting apache2
  hosts: localhost
  become: &lt;span class="nb"&gt;yes

  &lt;/span&gt;tasks: 
    - name: installing apache2
      apt: 
        name: apache2 
        state: present

    - name: start nginx
      service: 
        name: apache2
        state: started
        enabled: &lt;span class="nb"&gt;yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that we are running the playbook against &lt;code&gt;localhost&lt;/code&gt;. This is because we are successfully logged into the host server. However, it is possible to run a playbook against multiple hosts. This is done with the use of an inventory file. Read more: &lt;a href="https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html" rel="noopener noreferrer"&gt;Ansible Inventory&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test and deploy the Ansible Playbook configuration
&lt;/h2&gt;

&lt;p&gt;To test the configuration and check for errors, run the command below. This would check the correctness of the playbook.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible-playbook ansible-playbook.yml &lt;span class="nt"&gt;--ask-become-pass&lt;/span&gt; &lt;span class="nt"&gt;--check&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqimvjuxfdk5vxbt875y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqimvjuxfdk5vxbt875y.png" alt="Ansible Playbook Deployment" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy the configuration.
&lt;/h2&gt;

&lt;p&gt;Run the Ansible playbook below to provision and start the Apache2 web server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible-playbook ansible-playbook.yml &lt;span class="nt"&gt;--ask-become-pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the playbook has finished running, Apache will be configured on the Virtual Machine. You can test the configuration by opening a web browser and navigating to the public IP address of the VM. You should see the Apache web server homepage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa3esv58cjgyd5xwgoaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa3esv58cjgyd5xwgoaz.png" alt="Configured Apache web server" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading. Let me know if you found this helpful. You are welcome to follow me on &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter @Paschal_ik&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Previous:&lt;/p&gt;

&lt;p&gt;Coming Up Next:&lt;br&gt;
Install LAMP STACK on an Azure Virtual machine&lt;br&gt;
Enable SSL on a Custom Domain on an azure Virtual Machine&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#pip-install" rel="noopener noreferrer"&gt;Installing Ansible — Ansible Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://packaging.python.org/en/latest/tutorials/installing-packages/#ensure-you-can-run-python-from-the-command-line" rel="noopener noreferrer"&gt;Installing Packages — Python Packaging User Guide&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create Azure Virtual Machine (Linux VM) with Terraform</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Mon, 29 May 2023 04:20:02 +0000</pubDate>
      <link>https://dev.to/paschalogu/create-azure-virtual-machine-linux-vm-with-terraform-29jp</link>
      <guid>https://dev.to/paschalogu/create-azure-virtual-machine-linux-vm-with-terraform-29jp</guid>
      <description>&lt;p&gt;Azure Virtual Machines provide a flexible and scalable solution for running your applications in the cloud. By leveraging Terraform, we can automate the creation and configuration of VMs, ensuring consistency and reproducibility in our deployments. We will specifically focus on Linux VMs, as they are widely used for various purposes, such as web hosting, application deployment, and data analysis.&lt;/p&gt;

&lt;p&gt;In this article, we will go through the steps of using Terraform to create an Azure Virtual machine with the following resources: Azure Resource Group, Azure Virtual Network, Network Subnet, Public IP address, Network Security Group, Network Interface, Linux Virtual Machine.&lt;/p&gt;

&lt;p&gt;Prerequisites &lt;br&gt;
Install and Configure Azure CLI &lt;br&gt;
Install and Configure Terraform&lt;br&gt;
Provision the Infrastructure on Azure&lt;br&gt;
Destroy the infrastructure&lt;br&gt;
Conclusion&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An azure account and subscription: If you don't have an Azure subscription, create a &lt;a href="https://azure.microsoft.com/free/?ref=microsoft.com&amp;amp;utm_source=microsoft.com&amp;amp;utm_medium=docs&amp;amp;utm_campaign=visualstudio" rel="noopener noreferrer"&gt;free account&lt;/a&gt; before you begin.&lt;/li&gt;
&lt;li&gt;Infrastructure-as-Code Basics: Basic understanding of infrastructure as code is required to follow along.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Terraform&lt;/strong&gt; is a declarative open-source “&lt;a href="https://www.ibm.com/topics/infrastructure-as-code" rel="noopener noreferrer"&gt;Infrastructure as Code&lt;/a&gt;" tool, created by HashiCorp, that enables the definition of on-premises and cloud resources in human-readable configuration files that can be versioned, reused, and shared as code. &lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Install and Configure Azure CLI
&lt;/h2&gt;

&lt;p&gt;Open a command line from any device that has access to the Azure CLI. For steps on how to configure azure CLI locally, refer to this &lt;a href="https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt" rel="noopener noreferrer"&gt;Microsoft Documentation&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://aka.ms/InstallAzureCLIDeb | &lt;span class="nb"&gt;sudo &lt;/span&gt;bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the command &lt;code&gt;az --version&lt;/code&gt; to confirm this has been installed successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl60gg805gs2w91x93ym0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl60gg805gs2w91x93ym0.png" alt="AZ-Login" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install and Authenticate Terraform to Azure
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install Terraform
&lt;/h3&gt;

&lt;p&gt;Depending on your operating system, the command to install terraform may be slightly different. Refer to the terraform documentation for system-specific instruction: &lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Terraform Installation Guide&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap &lt;span class="nb"&gt;install &lt;/span&gt;terraform &lt;span class="nt"&gt;--classic&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;terraform --version&lt;/code&gt; command to view the version on terraform installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make a Repository to hold our Terraform files and change the directory to this newly created repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;Terraform
&lt;span class="nb"&gt;cd &lt;/span&gt;Terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Authenticate Terraform to Azure using a Microsoft Account
&lt;/h3&gt;

&lt;p&gt;You can either authenticate to Azure using a Microsoft account or by using a service principal. In this blog, we will authenticate using a Microsoft account.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;az login&lt;/code&gt; without any parameters and follow the instructions to sign in to Azure. When you log in successful, &lt;code&gt;az login&lt;/code&gt; will display a list of the Azure subscriptions associated with the logged-in Microsoft account, including the default subscription.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to use a specific subscription, run the command below to show and set the required subscription.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;az account show
az account &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;--subscription&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;subscription_id_or_subscription_name&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Provision the Infrastructure on Azure
&lt;/h2&gt;

&lt;p&gt;Create a file to provision virtual machine on Microsoft Azure. This file will create following resources: Azure Resource Group, Azure Virtual Network, Network Subnet, Public IP address, Network Security Group, Network Interface, Linux Virtual Machine. We will call the file &lt;code&gt;main.tf&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano main.tf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy and paste the code below into the file created above&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "main" {
  name     = "${var.prefix}-resources"
  location =  "eastus"
}

resource "azurerm_virtual_network" "main" {
  name                = "${var.prefix}-network"
  address_space       = ["10.0.0.0/22"]
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name
}

resource "azurerm_subnet" "internal" {
  name                 = "internal"
  resource_group_name  = azurerm_resource_group.main.name
  virtual_network_name = azurerm_virtual_network.main.name
  address_prefixes     = ["10.0.2.0/24"]
}

resource "azurerm_public_ip" "public_ip" {
  name                = "acceptanceTestPublicIp1"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location
  allocation_method   = "Dynamic"
}

resource "azurerm_network_interface" "main" {
  name                = "${var.prefix}-nic"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location

  ip_configuration {
    name                          = "internal"
    subnet_id                     = azurerm_subnet.internal.id
    private_ip_address_allocation = "Dynamic"
    public_ip_address_id          = azurerm_public_ip.public_ip.id
  }
}

resource "azurerm_network_security_group" "nsg" {
  name                = "ssh_nsg"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name

  security_rule {
    name                       = "allow_ssh_sg"
    priority                   = 100
    direction                  = "Inbound"
    access                     = "Allow"
    protocol                   = "Tcp"
    source_port_range          = "*"
    destination_port_range     = "22"
    source_address_prefix      = "*"
    destination_address_prefix = "*"
  }
  security_rule  {
    name                       = "allow_publicIP"
    priority                   = 103
    direction                  = "Inbound"
    access                     = "Allow"
    protocol                   = "Tcp"
    source_port_range          = "*"
    destination_port_range     = "80"
    source_address_prefix      = "*"
    destination_address_prefix = "*"
  }
}

resource "azurerm_network_interface_security_group_association" "association" {
  network_interface_id      = azurerm_network_interface.main.id
  network_security_group_id = azurerm_network_security_group.nsg.id
}

resource "azurerm_linux_virtual_machine" "main" {
  name                            = "${var.prefix}-vm"
  resource_group_name             = azurerm_resource_group.main.name
  location                        = "eastus"
  size                            = "Standard_D2s_v3"
  admin_username                  = "adminuser"
  admin_password                  = "The$admin#password"
  disable_password_authentication = false
  network_interface_ids = [
    azurerm_network_interface.main.id,
  ]

  source_image_reference {
    publisher = "Canonical"
    offer     = "UbuntuServer"
    sku       = "18.04-LTS"
    version   = "latest"
  }

  os_disk {
    storage_account_type = "Standard_LRS"
    caching              = "ReadWrite"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember to change the admin password to a string with your desired password (e.g. &lt;code&gt;admin_password = "253P@assWord!@#"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next, create a terraform variable file with name &lt;code&gt;variable.tf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;variable &lt;span class="s2"&gt;"prefix"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  description &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"The prefix which should be used for all resources in this example"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

variable &lt;span class="s2"&gt;"location"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  description &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"eastus"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;Terraform init&lt;/code&gt; to initialize the repository. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa92rz841pjfr1u4y1cca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa92rz841pjfr1u4y1cca.png" alt="terraform-initn" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see changes that will take effect before any action run &lt;code&gt;terraform plan&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When prompted for location, enter your preferred location e.g. eastus&lt;/p&gt;

&lt;p&gt;When prompted for prefix, enter the prefix that will be prepended to all resources created by terraform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbyjnzed7oxdpyqll8ift.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbyjnzed7oxdpyqll8ift.png" alt="terraform-plan" width="800" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To apply the changes to our Azure environment, run the command below &lt;code&gt;terraform apply&lt;/code&gt; to apply the changes. This should go off and provision the resources in your azure cloud environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lyoivvauxppiz8ymblo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lyoivvauxppiz8ymblo.png" alt="terraform-apply" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see a list of resources provisioned, run the &lt;code&gt;terraform state list&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform state list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvthzeo1oexcdzfesvy7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvthzeo1oexcdzfesvy7.png" alt="terraform-state-list" width="800" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Destroying the infrastructure
&lt;/h2&gt;

&lt;p&gt;Run the below command and type &lt;code&gt;yes&lt;/code&gt; to destroy the infrastructure&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform destroy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;In this article, we harnessed the power of Terraform for infrastructure as code to provision resources on Azure. Firstly, we installed and configured Azure CLI on local device, installed and authenticated Terraform to provision infrastructure and resources on Azure. At the end, we destroyed the infrastructure to avoid incurring much cost.&lt;/p&gt;

&lt;p&gt;Thanks for reading. Let me know if you found this helpful. You are welcome to follow me on LinkedIn → &lt;a href="https://www.linkedin.com/in/paschal-ogu/" rel="noopener noreferrer"&gt;Paschal Ogu&lt;/a&gt; and Twitter → &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Paschal_ik&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coming Up Next&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure Apache web server on Linux Virtual Machine using Ansible&lt;/li&gt;
&lt;li&gt;Enable SSL on a Custom Domain&lt;/li&gt;
&lt;li&gt;Install LAMP STACK on an Azure Virtual machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Terraform on Azure documentation – Articles, samples, references, and resources – &lt;a href="https://learn.microsoft.com/en-us/azure/developer/terraform/" rel="noopener noreferrer"&gt;Terraform on Azure&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Terraform | HashiCorp Developer &lt;a href="https://developer.hashicorp.com/terraform" rel="noopener noreferrer"&gt;Terraform Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>terraform</category>
      <category>linux</category>
      <category>iac</category>
    </item>
    <item>
      <title>Manage Profiles in VS Code</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Thu, 02 Mar 2023 17:07:28 +0000</pubDate>
      <link>https://dev.to/paschalogu/manage-profiles-in-vs-code-1oe7</link>
      <guid>https://dev.to/paschalogu/manage-profiles-in-vs-code-1oe7</guid>
      <description>&lt;p&gt;In Visual Studio Code, a profile is a set of settings that help you customize your environment for your projects. Profiles are a great way to customize VS Code to better fit your need. You can save a set of configurations such as settings, extensions, font size, color theme etc., sync them across your devices, and even easily share them with colleagues. You can create multiple profiles for different scenarios.&lt;/p&gt;

&lt;p&gt;For example, a python project might require specific extensions to run python script smoothly, while a Golang project will require different extensions and settings. &lt;/p&gt;

&lt;p&gt;In another use case, you can create a profile with a specific set of extensions and settings like font size, and color theme for a demo project. By doing this, the demo will not mess up your normal VS Code setup, and you can customize VS Code for better visibility during your demo.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Create a Profile in VS Code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  On Windows
&lt;/h3&gt;

&lt;p&gt;To create a new profile, navigate to the top left of your screen, Click File &amp;gt; Preferences &amp;gt; Profiles &amp;gt; Create Profile.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyohe6sa1ulsfg3k5nr8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyohe6sa1ulsfg3k5nr8h.png" alt="Windows OS" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  For macOS
&lt;/h3&gt;

&lt;p&gt;Navigate to Code &amp;gt; Preferences &amp;gt; Profiles &amp;gt; Create Profile.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3riqu0zq8tzw6vf0wvgx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3riqu0zq8tzw6vf0wvgx.png" alt="macOS" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, you can click on settings (gear ⚙️ Icon) at the bottom left of your screen &amp;gt; Profiles &amp;gt; Create Profile. This works for both macOS and windows.&lt;/p&gt;

&lt;p&gt;In the image above, I have created a DevOps VS Code profile to meet my DevOps needs. &lt;/p&gt;

&lt;p&gt;When creating a profile, you can choose either “Create an Empty Profile” or “Create from current profile”. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcj5jj801aiyytqw2toe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcj5jj801aiyytqw2toe.png" alt="Create Profile" width="800" height="107"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Selecting “Create from Empty Profile” above will create a new profile without any customizations as though you just downloaded and installed VS Code, while creating from current profile will carry/include all changes or settings, if any exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manage Profiles
&lt;/h2&gt;

&lt;p&gt;You can easily switch, rename, create, delete, export or import profiles in VS Code by following the prompts on your screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9i6j6g8ps3m2pmvefl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9i6j6g8ps3m2pmvefl7.png" alt="Manage Profiles" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Profiles:
&lt;/h2&gt;

&lt;p&gt;Enable profiles to sync across all devices by using the &lt;a href="https://code.visualstudio.com/docs/editor/settings-sync" rel="noopener noreferrer"&gt;setting sync&lt;/a&gt; feature. With this setting sync enabled, creating and deleting a profile from one device, creates and deletes it across all your synced devices respectively.&lt;/p&gt;

&lt;p&gt;Is VS Code Profile a feature you would like to explore? Share your thoughts in the comments section.&lt;/p&gt;

&lt;p&gt;💡 This article was first published at &lt;a href="https://blog.paschalogu.com/" rel="noopener noreferrer"&gt;blog.paschalogu.com&lt;/a&gt;. If you found it useful, follow me on &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and also on &lt;a href="https://www.linkedin.com/in/paschal-ogu" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. Thanks for reading!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Set Up Terraform in your Jenkins Docker Container</title>
      <dc:creator>Paschal Ogu</dc:creator>
      <pubDate>Sat, 04 Feb 2023 09:32:30 +0000</pubDate>
      <link>https://dev.to/paschalogu/set-up-terraform-in-your-jenkins-docker-container-4mma</link>
      <guid>https://dev.to/paschalogu/set-up-terraform-in-your-jenkins-docker-container-4mma</guid>
      <description>&lt;p&gt;Organizations can automate their infrastructure as code (IaC) and streamline deployment processes by configuring a continuous integration and continuous development (CI/CD) pipeline to integrate Terraform  within their Jenkins Docker container.&lt;/p&gt;

&lt;h3&gt;
  
  
  Terms:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jenkins&lt;/strong&gt; is an automation server widely used to automate various aspects of software development, including building, testing, and deploying applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; is an open-source platform that enables developers to build, deploy, run, update and manage applications in a container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containers&lt;/strong&gt; are isolated environments that package an application and its dependencies together, allowing it to run consistently across different computing environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terraform&lt;/strong&gt; is a declarative open-source “Infrastructure as Code” tool, created by HashiCorp that enables the definition of on-prem and cloud resources in human-readable configuration files that can be versioned, reused, and shared as code.&lt;/p&gt;

&lt;p&gt;In this artcle, we are going to set up terraform in a jenkins server that runs on a docker container. Let's get into it 🧑🏽‍💻&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Pull and start the Jenkins Docker container:
&lt;/h3&gt;

&lt;p&gt;The Jenkins server used in this project was installed using the documentation. &lt;a href="https://github.com/jenkinsci/docker/blob/master/README.md" rel="noopener noreferrer"&gt;See more&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; jenkins_home:/var/jenkins_home &lt;span class="nt"&gt;-p&lt;/span&gt; 8080:8080 &lt;span class="nt"&gt;-p&lt;/span&gt; 50000:50000 &lt;span class="nt"&gt;--restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;on-failure jenkins/jenkins:lts-jdk11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Install Terraform on your Docker Container
&lt;/h3&gt;

&lt;p&gt;To install terraform on the container, find your Jenkins container ID and log into the container as root user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker ps
docker &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; 0 &lt;span class="nt"&gt;-it&lt;/span&gt; &amp;lt;container_id&amp;gt; /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change Directory to /usr/bin directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /usr/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As the root user, install terraform in the docker container: Reference the &lt;a href="https://developer.hashicorp.com/terraform/downloads" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; for the installation guide.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget &lt;span class="nt"&gt;-O-&lt;/span&gt; https://apt.releases.hashicorp.com/gpg | gpg &lt;span class="nt"&gt;--dearmor&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /usr/share/keyrings/hashicorp-archive-keyring.gpg
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;lsb_release &lt;span class="nt"&gt;-cs&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; main"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/hashicorp.list
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡 If &lt;code&gt;sudo&lt;/code&gt; and &lt;code&gt;wget&lt;/code&gt; above are not found, they can be installed by running the below commands:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt-get &lt;span class="nb"&gt;install sudo
&lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;wget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm that terraform has been installed by running the command to view its version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Install Terraform Plugin
&lt;/h3&gt;

&lt;p&gt;From your &lt;strong&gt;Jenkins dashboard&lt;/strong&gt; navigate to &lt;strong&gt;Manage Jenkins &amp;gt;&amp;gt; Manage Plugins&lt;/strong&gt; and select the &lt;strong&gt;Available&lt;/strong&gt; tab. Locate this plugin by searching for &lt;strong&gt;Terraform&lt;/strong&gt; and clicking on install.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbry2sdlz6osv6q8rnuf0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbry2sdlz6osv6q8rnuf0.png" alt="Terraform-plugin" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installation of this plugin, ensure that it is enabled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Configure Terraform Path
&lt;/h3&gt;

&lt;p&gt;Navigate to Jenkins UI and update the path to the terraform installation path:&lt;/p&gt;

&lt;p&gt;Dashboard &amp;gt;&amp;gt; Manage Jenkins &amp;gt;&amp;gt; Global Tool Configuration &amp;gt;&amp;gt; Scroll down to Terraform and click on &lt;strong&gt;Terraform Installations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Type in the installation path &amp;gt;&amp;gt; uncheck the install automatically &amp;gt;&amp;gt; apply changes and save.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkzy5bokgrwhdg0h9931.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkzy5bokgrwhdg0h9931.png" alt="Terraform-Installation" width="800" height="709"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it! You are now ready to write a CI/CD pipeline script to integrate terraform to automate infrastructure as code (IaC) in your Jenkins Docker container.&lt;/p&gt;

&lt;p&gt;💡 This article was first published at &lt;a href="https://blog.paschalogu.com" rel="noopener noreferrer"&gt;blog.paschalogu.com&lt;/a&gt;. If you found it useful, follow me on &lt;a href="https://twitter.com/Paschal_ik" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and also on &lt;a href="https://www.linkedin.com/in/paschal-ogu" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mentalhealth</category>
      <category>productivity</category>
      <category>career</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
