<?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: Oladoyin Idris</title>
    <description>The latest articles on DEV Community by Oladoyin Idris (@oladris).</description>
    <link>https://dev.to/oladris</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%2F1152231%2F8a7dbfaa-18f0-47d7-9d20-807d5a38c9f1.JPG</url>
      <title>DEV Community: Oladoyin Idris</title>
      <link>https://dev.to/oladris</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oladris"/>
    <language>en</language>
    <item>
      <title>How to Deploy Your Code with AWS S3 - A Guide for Developers</title>
      <dc:creator>Oladoyin Idris</dc:creator>
      <pubDate>Sun, 03 Sep 2023 10:38:23 +0000</pubDate>
      <link>https://dev.to/oladris/how-to-deploy-your-code-with-aws-s3-devops-basics-3pkh</link>
      <guid>https://dev.to/oladris/how-to-deploy-your-code-with-aws-s3-devops-basics-3pkh</guid>
      <description>&lt;p&gt;Would you like to see your code going live on the Internet? In this article, you will learn how to deploy your project on Amazon Web Services (AWS) as a developer. Let's get started.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Have Front End Libraries Project (at least one)&lt;/li&gt;
&lt;li&gt;Have an AWS account.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Deploy Your Project to AWS?
&lt;/h2&gt;

&lt;p&gt;As you work through your Front End Libraries Projects, you submit those projects. But that's all. But beyond that, in the real world when a company finishes a project they don’t just leave it at that  – they deploy (hosting) it to the server. &lt;br&gt;
Note: To “deploy" means taking your code from a local environment (your computer, or editors) and putting it on a server. That server, which is just another computer, is networked in such a way that the world to access your site.&lt;/p&gt;

&lt;p&gt;So, let’s get started!&lt;/p&gt;

&lt;p&gt;If you wanted to, you could set up a PC in your home and do the proper networking for it to serve your project to the world. Or, you could subscribe to a hosting company for them to serve your website for you.&lt;/p&gt;

&lt;p&gt;There are a variety of approaches to deploying code, but one very popular method is to use a cloud computing platform like Amazon Web Services (AWS). &lt;/p&gt;

&lt;p&gt;Let's dive into the Cloud.&lt;/p&gt;

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

&lt;p&gt;Amazon Web Services (AWS) offers a “cloud computing platform”. &lt;br&gt;
AWS has services ranging from simply storing files, running servers, converting speech to text or text to speech, machine learning, private cloud networks, and about 200+ other services.&lt;/p&gt;

&lt;p&gt;The basic idea behind cloud computing is to gain on-demand IT resources.&lt;br&gt;
There are a number of benefits to using a cloud computing platform, one of the main is cost savings.&lt;/p&gt;

&lt;p&gt;Imagine trying to pay for all the physical IT resources that it would take to run the 200+ services AWS offers. That upfront cost is something most companies cannot afford, and fewer could pay for the engineers to configure.&lt;/p&gt;

&lt;p&gt;Also, since the resources are on-demand, cloud platforms allow you to launch resources much faster than an IT department could.&lt;/p&gt;

&lt;p&gt;In short, with a cloud computing platform like AWS, you save on cost and deployment time, plus many more benefits not the least of which is security. Needless to say, cloud computing is the new approach to IT and AWS is leading in this regard.&lt;/p&gt;

&lt;p&gt;Why does this matter to you? If you intend to pursue a career in development, regardless of your focus (backend, frontend, web technologies, mobile apps, gaming, desktop applications, and so on) you will find that many job postings include a reference to cloud computing platform experience.&lt;/p&gt;

&lt;p&gt;So the more you can become familiar with one, like AWS, the more you’ll separate yourself from other candidates.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Deploy your Code with AWS S3
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is AWS S3?
&lt;/h3&gt;

&lt;p&gt;In this post, we will focus on the AWS service called &lt;strong&gt;S3&lt;/strong&gt;.&lt;br&gt;
 S3 stands for Simple Storage Solution. As you might have guessed from that name, the service lets you simply store stuff, more specifically &lt;em&gt;objects&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You can find tutorials and courses on S3 that are hours and days long. On the surface though, it’s just a place where you can store objects. Objects can be things like image files, video files, and even HTML, CSS, and JavaScript files.&lt;/p&gt;

&lt;p&gt;As you dive deeper into S3, you’ll learn that S3 allows you to do a lot of things to and with those objects. But for our project, we just want to learn how to store objects and look at a single one of those deeper features – using S3 as a website hosting service.&lt;/p&gt;

&lt;p&gt;That's right, AWS S3 is a service we can use to deploy a website.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Get Your Project Ready for Deployment
&lt;/h2&gt;

&lt;p&gt;In this article, I’ll deploy a front-end project to AWS using a Random Quote Machine project. &lt;strong&gt;&lt;em&gt;You can use your personal projects to learn this tutorial.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We need to take your  HTML, CSS, and JS code and put them into their own separate files in a text editor (VS Code).&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Your IDE (for example, Visual Studio Code)
&lt;/h2&gt;

&lt;p&gt;Make sure your codes are stored in three new files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;index.html&lt;/li&gt;
&lt;li&gt;styles.css&lt;/li&gt;
&lt;li&gt;main.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hxlvFWS7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.08.42-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hxlvFWS7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.08.42-PM--1-.png" alt="photo" width="800" height="473"&gt;&lt;/a&gt;&lt;br&gt;
            Three empty files: &lt;strong&gt;main.js&lt;/strong&gt;, &lt;strong&gt;styles.css&lt;/strong&gt;, and &lt;strong&gt;index.html&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Make whatever changes you find necessary to get your project in working order, but remember, the purpose of this exercise is to learn about deploying a website on AWS S3. &lt;/p&gt;

&lt;p&gt;Once your site works locally, then let's get into AWS.&lt;/p&gt;

&lt;p&gt;Login into your &lt;strong&gt;AWS account&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Work with the S3 Management Console
&lt;/h2&gt;

&lt;p&gt;After logging into AWS, in the top search bar type “S3” and then select the option that says “S3”, not “S3 Glacier”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yv7OEjwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.41.52-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yv7OEjwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.41.52-PM--1-.png" alt="photo" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      Searching for S3 in the AWS Management Console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Alternatively, instead of the search bar you could expand the “Services” dropdown and enjoy looking at all the AWS service offerings. Either way, let’s click on S3.&lt;/p&gt;

&lt;p&gt;You should now see the &lt;strong&gt;S3 Management Console&lt;/strong&gt;. Something like this…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tKN9QoUm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.46.20-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tKN9QoUm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.46.20-PM--1-.png" alt="photo" width="800" height="393"&gt;&lt;/a&gt;&lt;br&gt;
                            &lt;em&gt;S3 Management Console&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is what AWS calls the &lt;strong&gt;Management Console&lt;/strong&gt;. It’s the website interface to interact with AWS and create resources and services.&lt;/p&gt;

&lt;p&gt;There is a Management Console for all of the AWS services, but this console is not the only way you can interact with AWS. There is also a CLI (command line interface), which allows you to script to AWS what you would like to do.&lt;/p&gt;

&lt;p&gt;Instead of clicking on buttons, in the CLI you type what you would otherwise have clicked on (though less verbosely). We are going to stick with the console for now.&lt;/p&gt;

&lt;p&gt;Here you can view all of your S3 buckets. S3 is composed of buckets, and a bucket is basically a big container where we get to put files. Think of a bucket as a drive on your computer (like your C: drive). It technically isn’t – it’s a method for routing in S3 – but for now, it’s fine to see the bucket in this way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Your S3 Bucket
&lt;/h2&gt;

&lt;p&gt;Click on the &lt;strong&gt;Create bucket&lt;/strong&gt;. Then, enter a unique name for your bucket (no spaces allowed).&lt;/p&gt;

&lt;p&gt;The name of your buckets must be globally unique. So, if you try to create one named test, there is probably someone in the world who used that already so it won’t be available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pkN8Z-LJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.56.19-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pkN8Z-LJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-8.56.19-PM--1-.png" alt="photo" width="800" height="478"&gt;&lt;/a&gt;&lt;br&gt;
                             Entering my new S3 bucket name&lt;/p&gt;

&lt;p&gt;After inputting your bucket’s name, scroll down to the section called &lt;strong&gt;Block Public Access settings for this bucket.&lt;/strong&gt; We want to uncheck the &lt;strong&gt;Block all public access&lt;/strong&gt; checkbox, and then further down check to acknowledge the warning box that appears.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hQXVz7Zw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.13.44-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hQXVz7Zw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.13.44-PM--1-.png" alt="photo" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Security and permissions in AWS is a lengthy topic, but, as you can see by the warning, you typically do not want to unblock public access to your files.&lt;/p&gt;

&lt;p&gt;In this case, we want our website’s visitors’ web browsers to be able to access our index.html file so that they can see our project.&lt;/p&gt;

&lt;p&gt;There are other methods we could use to unblock access to our bucket’s content, but for now, this is sufficient for our goal of deploying a project on AWS with S3.&lt;/p&gt;

&lt;p&gt;Scroll down to the bottom of the form. Click the &lt;strong&gt;Create bucket&lt;/strong&gt; button at the bottom. If your name was unique, you just made your first AWS S3 bucket, congrats!&lt;/p&gt;

&lt;p&gt;It’s pretty amazing to stop and think that in that short amount of time, AWS just made space available for you in their network to store an unlimited amount of data. That’s right, unlimited!&lt;/p&gt;

&lt;p&gt;Although the maximum size for a single object in your bucket is 5 terabytes (good luck hitting that), your new bucket can hold as much as you want in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upload Your Files to Your Bucket
&lt;/h2&gt;

&lt;p&gt;Next, back in the S3 console view, click on the link to your newly created S3 bucket. Once inside, we want to click on the &lt;strong&gt;Upload&lt;/strong&gt; button. Select your three files (index.html, styles.css, and main.js).&lt;/p&gt;

&lt;p&gt;After you see their names show up in the list of items about to be uploaded, scroll down to the bottom of the upload form.&lt;/p&gt;

&lt;p&gt;Expand the &lt;strong&gt;Additional upload options&lt;/strong&gt;, and then scroll down to the &lt;strong&gt;Access control list (ACL)&lt;/strong&gt;. Check the &lt;strong&gt;Read&lt;/strong&gt; boxes for &lt;strong&gt;Everyone (public access)&lt;/strong&gt;, and then check the acknowledgment box that appears underneath, just like when we created our bucket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--le9U1ckG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.11.52-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--le9U1ckG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.11.52-PM.png" alt="photo" width="800" height="519"&gt;&lt;/a&gt;&lt;br&gt;
                         Your selections should look like this&lt;/p&gt;

&lt;p&gt;Scroll down the rest of the way and click the &lt;strong&gt;Upload&lt;/strong&gt; button.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enable Hosting on the S3 Bucket
&lt;/h2&gt;

&lt;p&gt;Now we have our S3 bucket, we have our files, and we have them publicly accessible, but we’re not quite done.&lt;/p&gt;

&lt;p&gt;S3 buckets by default are not configured to be treated like web servers. Most of the time companies want the contents of S3 buckets kept private (like hospitals storing medical records, or banks saving financial statements). To make the bucket act like a web server, providing us with a URL to access our files, we need to adjust a setting.&lt;/p&gt;

&lt;p&gt;Back at your bucket’s main menu view, click on the &lt;strong&gt;Properties&lt;/strong&gt; tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TepA38Fk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-9.43.43-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TepA38Fk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1600/2021/06/Screen-Shot-2021-03-20-at-9.43.43-PM--1-.png" alt="photo" width="800" height="79"&gt;&lt;/a&gt;&lt;br&gt;
                    Select the &lt;strong&gt;Properties tab&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scroll down to the bottom until you find &lt;strong&gt;Static website hosting&lt;/strong&gt;, and click the &lt;strong&gt;Edit&lt;/strong&gt; button. Set &lt;strong&gt;Static website hosting&lt;/strong&gt; to &lt;strong&gt;Enable&lt;/strong&gt;, and then in the &lt;strong&gt;Index document&lt;/strong&gt; and Error document type index.html. Then click the &lt;strong&gt;Save Changes&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yD5-mEQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.15.08-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yD5-mEQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.15.08-PM--1-.png" alt="photo" width="800" height="580"&gt;&lt;/a&gt;&lt;br&gt;
                 Selection should be like this&lt;/p&gt;

&lt;p&gt;You’ll return to the Properties tab of your bucket. Scroll back down to the &lt;strong&gt;Static website hosting&lt;/strong&gt; section, and there you’ll find a link.&lt;/p&gt;

&lt;p&gt;Reading that URL you’ll notice the name of your bucket is in it. By typing index.html in the two fields during the configuration, we told AWS that when this bucket’s URL is opened to use the index.html page to load.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wgJ76u2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.15.22-PM--1-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wgJ76u2j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/size/w1000/2021/06/Screen-Shot-2021-03-20-at-9.15.22-PM--1-.png" alt="photo" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          You should see your bucket’s website endpoint now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you click on that link, your project should now be viewable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;p&gt;If your website worked locally but is not working when you open the S3 website endpoint link, there are a few common problems to try and resolve.&lt;/p&gt;

&lt;p&gt;First, make sure you selected the same files that worked locally. Reopen the local files in a web browser to make sure they work. If it works locally but not through S3, try re-uploading them and ensure you select the same files.&lt;/p&gt;

&lt;p&gt;Next, go to your bucket’s &lt;strong&gt;Permissions&lt;/strong&gt; tab and make sure you have the &lt;strong&gt;Block all public access&lt;/strong&gt; set to &lt;strong&gt;Off&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, delete the files you uploaded, and re-upload them, ensuring that you select the &lt;strong&gt;Read&lt;/strong&gt; checkboxes described above, as well as the acknowledgment box.&lt;/p&gt;

&lt;p&gt;If you are still having problems, feel free to comment with your issue and I’ll be happy to help. Don’t get too discouraged either. AWS can take a while to learn so go easy on yourself if things aren’t falling into place the first time.&lt;/p&gt;

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

&lt;p&gt;Congratulations! You’ve now taken your first steps into cloud computing with the deployment of a website. You should be very proud!  Now, instead of sharing your local directory with your friends and family, you have your very own S3 bucket website endpoint to share. Granted, it’s still not your own personalized domain, but it’s still cool to know you just deployed a website the same way thousands of businesses do.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>aws</category>
      <category>web</category>
    </item>
    <item>
      <title>Python Programming for DevOps Engineer</title>
      <dc:creator>Oladoyin Idris</dc:creator>
      <pubDate>Sat, 02 Sep 2023 22:12:50 +0000</pubDate>
      <link>https://dev.to/oladris/python-programming-for-aspiring-devops-engineer-beginners-guide-gc7</link>
      <guid>https://dev.to/oladris/python-programming-for-aspiring-devops-engineer-beginners-guide-gc7</guid>
      <description>&lt;p&gt;One of the common questions aspiring DevOps engineers ask is, do we need python for DevOps? In this blog, we will explain to you why python is essential in the DevOps world.&lt;/p&gt;

&lt;p&gt;Information Technology is not like it used to be before. Most sysadmin tasks are &lt;strong&gt;automated&lt;/strong&gt; using tools and scripting languages, including configuration management tools like &lt;strong&gt;chef, puppet, Ansible&lt;/strong&gt;, etc., and scripting languages like shell scripting, python, ruby, etc.&lt;/p&gt;

&lt;p&gt;Also, how people and teams work has changed drastically in recent years with philosophies such as DevOps and methodologies like Agile.&lt;/p&gt;

&lt;p&gt;Unlike before, different teams have started working together, and there is more and more automation from application development to deployment. Tools like &lt;strong&gt;Vagrant, Docker, and Kubernetes&lt;/strong&gt; made developers’ lives so easy by reducing the time to set up and test development environments.&lt;/p&gt;

&lt;p&gt;Cloud computing has drastically changed the way how servers are provisioned. You don’t need to wait days to get a server provisioned for your application deployment. With a few clicks, you will have your server ready for deployment. The process gets easier by writing automation scripts for server provisioning and configuration. One such example is the &lt;strong&gt;AWS python boto library&lt;/strong&gt;. Using boto SDK, you can automate AWS server provisioning.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does Python have to do with DevOps?
&lt;/h2&gt;

&lt;p&gt;Gone are the days when DevOps engineers had to work with only CI/CD tools. Nowadays, companies want customized tooling and utilities to fit their CI/CD requirements. A simple example is a python script to parse JSON to test a functionality in the CI/CD process.&lt;/p&gt;

&lt;p&gt;It has led to a shift where people are involved in infrastructure operations, and CI/CD is asked to write custom utilities and modules to improve automation, release, and monitoring.&lt;/p&gt;

&lt;p&gt;No company wants to babysit releases and pipelines. However, to develop custom utilities, you should know some level of programming, and the common language preferred in DevOps for such use cases is Python. Arguably Golang is also getting there because most of the modern DevOps tooling is built in Golang.&lt;/p&gt;

&lt;p&gt;Also, with more and more MLOPS projects, DevOps engineers have to work with ML engineers, data engineers, and data scientists. Python is a common language among all these teams. As a DevOps engineer, you will be responsible for writing small utility and ML pipeline scripts. Programming has become necessary for DevOps engineers, and Python is a great language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Python For DevOps is Important?
&lt;/h2&gt;

&lt;p&gt;Following are some of the main reasons why python of DevOps is important&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Python is one of the best scripting languages. The vast availability of python libraries allows you to write scripts that could communicate with system internals, manipulate files and strings, manage networks, and so on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you learn python, you can write automation scripts in a well-structured way. Moreover, every Linux system today comes bundled with python.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Many DevOps teams use python for building custom utilities, web apps for custom data visualization, and more. The main reason is that it’s easy to learn, and you can develop utilities in days rather than months.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Besides, tools like &lt;strong&gt;Ansible are purely written in python.&lt;/strong&gt; You can develop custom ansible modules for your automation tasks. Also, it is not limited to just Ansible; many tools written in python let you create custom scripts to work with them better.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Most importantly, &lt;strong&gt;during DevOps interviews,&lt;/strong&gt; you would be asked to solve programming or scripting challenges as part of the first round. Python is the best choice to clear those interview rounds.&lt;br&gt;
So, there are enough reasons why you should learn python to automate manual tasks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, there are enough reasons why you should learn python to automate manual tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python Courses To Skill up in DevOps
&lt;/h2&gt;

&lt;p&gt;If you are completely new to Python, we suggest you go through a guided online course or a book to understand python fundamentals.&lt;/p&gt;

&lt;p&gt;Following are the suggested courses to get started with python for absolute beginners.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Learn Python 3 from Scratch&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Introduction to Python&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Udemy Python Courses&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python Scripting Tutorial for Beginners
&lt;/h2&gt;

&lt;p&gt;The first step to getting started with python is to learn the basics which are needed for scripting. Here we are not going to cover python for application development but for automation.&lt;/p&gt;

&lt;p&gt;In this knowledge base, here's the necessary basic to get you started with python scripting. Following the list. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to run a Python Script&lt;/li&gt;
&lt;li&gt;Python Basics and Flow Control&lt;/li&gt;
&lt;li&gt;Python Functions&lt;/li&gt;
&lt;li&gt;Lists, Dictionaries, and Structuring Data&lt;/li&gt;
&lt;li&gt;String manipulation and Regular expressions&lt;/li&gt;
&lt;li&gt;Working with Files&lt;/li&gt;
&lt;li&gt;Python Exception handling&lt;/li&gt;
&lt;li&gt;Debugging python scripts&lt;/li&gt;
&lt;li&gt;Working with Linux system configuration.&lt;/li&gt;
&lt;li&gt;Monitoring alerts using python&lt;/li&gt;
&lt;li&gt;System health checks using python&lt;/li&gt;
&lt;li&gt;Managing cron using python.&lt;/li&gt;
&lt;li&gt;Using Python Modules&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python Libraries for DevOps
&lt;/h2&gt;

&lt;p&gt;When it comes to automation using Python, there are many python libraries that you can make use of. Following are the important Python devops libraries you should look at.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS Module&lt;/li&gt;
&lt;li&gt;Subprocess&lt;/li&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;li&gt;urlib3&lt;/li&gt;
&lt;li&gt;HTTP&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python Scripts for Automation – DevOps Tasks
&lt;/h2&gt;

&lt;p&gt;To learn python for DevOps automation, you need to do real-world python automation tasks. Following is a list of real-world python scripting use cases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to parse a JSON file using Python&lt;/li&gt;
&lt;li&gt;Python script to make an HTTP API call with the bearer token.&lt;/li&gt;
&lt;li&gt;Python script to execute SQL statements on PostgreSQL.&lt;/li&gt;
&lt;li&gt;Create an EC2 instance using python boto.&lt;/li&gt;
&lt;li&gt;Parse an IP address using Python&lt;/li&gt;
&lt;li&gt;Segregate IP addresses from a CIDR range using Python Script.&lt;/li&gt;
&lt;li&gt;Write a Python script to get Linux system details like CPU, memory, disk space, and process details.&lt;/li&gt;
&lt;li&gt;Execute a shell script from a Python script.&lt;/li&gt;
&lt;li&gt;Install Nginx in Linux using Python script.&lt;/li&gt;
&lt;li&gt;Replace a string in an application configuration file (For example, nginx.conf)&lt;/li&gt;
&lt;li&gt;Python Script to retrieve AWS EMR mast IP address&lt;/li&gt;
&lt;li&gt;Create a Python script to list all kubernetes pods in a namespace.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The list will grow with more examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn Python By Building Web Apps
&lt;/h2&gt;

&lt;p&gt;The best way for you as a &lt;strong&gt;DevOps engineers to learn Python&lt;/strong&gt; is by building applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  So how to get started?
&lt;/h2&gt;

&lt;p&gt;You can start with a simple &lt;strong&gt;Python micro-framework like Flask&lt;/strong&gt; to understand how web applications work.&lt;/p&gt;

&lt;p&gt;While building an application, you will learn about the front end ( UI ), backend ( middleware/ database connectivity, etc.), and some aspects of development that are helpful for devops engineers in their journey towards becoming one! &lt;/p&gt;

&lt;p&gt;It might seem overwhelming initially, but once you finish the tutorial, you will gain some confidence in developing apps.&lt;/p&gt;

&lt;p&gt;Following are some of the resources to get started.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python Flask tutorial: Build your first Flask application&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flask: Develop Web Applications in Python&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learn the Flask Python Web Development Framework by Building an Ecommerce Platform&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This guide covered why using Python for DevOps is essential for a DevOps engineer. The best way to start your DevOps journey is by learning to develop applications. If you know python basics, you can start with a framework like a python flask to understand the application workflow.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>python</category>
      <category>automation</category>
      <category>software</category>
    </item>
  </channel>
</rss>
