<?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: Abhishek Vaidya</title>
    <description>The latest articles on DEV Community by Abhishek Vaidya (@abhivaidya07).</description>
    <link>https://dev.to/abhivaidya07</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%2F516251%2F0a9ff02b-16eb-4ba2-9716-8ce136db64a2.png</url>
      <title>DEV Community: Abhishek Vaidya</title>
      <link>https://dev.to/abhivaidya07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhivaidya07"/>
    <language>en</language>
    <item>
      <title>In this post, we’ll build an automation that updates JIRA ticket statuses instantly based on Slack emoji reactions—saving time and making life easier!</title>
      <dc:creator>Abhishek Vaidya</dc:creator>
      <pubDate>Thu, 06 Feb 2025 13:53:32 +0000</pubDate>
      <link>https://dev.to/abhivaidya07/in-this-post-well-build-an-automation-that-updates-jira-ticket-statuses-instantly-based-on-slack-5hdh</link>
      <guid>https://dev.to/abhivaidya07/in-this-post-well-build-an-automation-that-updates-jira-ticket-statuses-instantly-based-on-slack-5hdh</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/abhivaidya07" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F516251%2F0a9ff02b-16eb-4ba2-9716-8ce136db64a2.png" alt="abhivaidya07"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/abhivaidya07/automate-jira-ticket-updates-with-slack-reactions-4hic" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Automate JIRA Ticket Updates with Slack Reactions&lt;/h2&gt;
      &lt;h3&gt;Abhishek Vaidya ・ Feb 2&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cloud&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>devops</category>
      <category>python</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Automate JIRA Ticket Updates with Slack Reactions</title>
      <dc:creator>Abhishek Vaidya</dc:creator>
      <pubDate>Sun, 02 Feb 2025 07:36:51 +0000</pubDate>
      <link>https://dev.to/abhivaidya07/automate-jira-ticket-updates-with-slack-reactions-4hic</link>
      <guid>https://dev.to/abhivaidya07/automate-jira-ticket-updates-with-slack-reactions-4hic</guid>
      <description>&lt;p&gt;&lt;strong&gt;Tired of Manually Updating JIRA Tickets? Let Slack Reactions Do It for You! 🚀&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On-call engineers already have enough on their plate—manually updating JIRA ticket statuses shouldn’t be one of them. It’s a tedious, time-consuming task that’s easy to forget, leading to delays and miscommunication.&lt;/p&gt;

&lt;p&gt;But what if a simple Slack reaction could handle it for you? In this post, we’ll build an automation that updates JIRA ticket statuses instantly based on Slack emoji reactions—saving time and making life easier!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fun Fact&lt;/strong&gt;: Even AI can't generate this solution. Yet! 😎&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&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%2Fm10toqsuf5oswlrramve.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%2Fm10toqsuf5oswlrramve.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The workflow begins when an end-user creates a JIRA ticket in Slack using the &lt;code&gt;/jira create&lt;/code&gt; command or directly from the console. Automation is triggered based on the emoji reaction to the Slack message, which seamlessly updates the JIRA ticket status.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Need a paid Slack subscription.&lt;/li&gt;
&lt;li&gt;An AWS User/Role with the below permissions:

&lt;ul&gt;
&lt;li&gt;AWSLambda_FullAccess&lt;/li&gt;
&lt;li&gt;IAMFullAccess&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Jira Cloud integration with Slack&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  GitHub
&lt;/h2&gt;

&lt;p&gt;You can find the resources in &lt;a href="https://github.com/abhivaidya07/slack-reaction-bot" rel="noopener noreferrer"&gt;abhivaidya07/slack-reaction-bot&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a Slack Application
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;On the &lt;a href="https://api.slack.com/apps" rel="noopener noreferrer"&gt;Your Apps&lt;/a&gt; page, select &lt;strong&gt;Create New App&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;From scratch&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter your App Name.&lt;/li&gt;
&lt;li&gt;Select the Workspace where you'll be developing your app. You'll be able to distribute your app to other workspaces later if you choose.
&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%2Fy8iz2c3yjvzg8nfo5mtk.png" alt="Image description" width="800" height="769"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create App&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Adding Permissions to Slack application
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to the Slack application created in the above steps.&lt;/li&gt;
&lt;li&gt;From the left navigation panel, select &lt;strong&gt;OAuth &amp;amp; Permissions&lt;/strong&gt;, scroll down to &lt;strong&gt;Scopes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Bot Token Scopes&lt;/strong&gt;, select &lt;strong&gt;Add an OAuth Scope&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To allow your app to react based on slack reactions, add below scopes:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;channels:history&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;reactions:read&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;users:read&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;users:read.email&lt;/code&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%2Fc1yqn2xeeh2y27i51lc6.png" alt="Image description" width="800" height="769"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Scroll up to &lt;strong&gt;OAuth Tokens&lt;/strong&gt; and click on &lt;strong&gt;Install to Workspace&lt;/strong&gt; button.
&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%2Ftwgwh37r254v5rdlnpn5.png" alt="Image description" width="800" height="236"&gt;
&lt;/li&gt;
&lt;li&gt;You'll now be sent through the Slack OAuth flow. Select Allow on the following screen.&lt;/li&gt;
&lt;li&gt;Copy and Save the &lt;strong&gt;Bot User OAuth Token&lt;/strong&gt; (starting with &lt;code&gt;xoxb&lt;/code&gt;), we will need it in the next steps !!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Enable Workflow steps
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;From the left navigation panel, select &lt;strong&gt;Org Level Apps&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Enable Org-Readiness&lt;/strong&gt; and enable it.
&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%2Fjggndxdx47adpryovmnu.png" alt="Image description" width="800" height="509"&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Workflow steps&lt;/strong&gt; in left navigation panel.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Update settings&lt;/strong&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%2Fy8khmy2moki1del91y8b.png" alt="Image description" width="800" height="55"&gt;
&lt;/li&gt;
&lt;li&gt;We'll enable &lt;strong&gt;Event Subscriptions&lt;/strong&gt; in further steps.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create Lambda Function (Using AWS Console)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;a href="https://console.aws.amazon.com/lambda/home#/functions" rel="noopener noreferrer"&gt;Functions page&lt;/a&gt; of the Lambda console.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Create function&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Author from scratch&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Basic information&lt;/strong&gt; panel, enter the &lt;strong&gt;Function name&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For Runtime, choose &lt;strong&gt;Python 3.9&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Leave &lt;strong&gt;architecture&lt;/strong&gt; set to &lt;strong&gt;x86_64&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Expand &lt;strong&gt;Additional Configurations&lt;/strong&gt; and then select &lt;strong&gt;Enable function URL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;Auth type&lt;/strong&gt;, choose &lt;strong&gt;NONE&lt;/strong&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%2Fe7mrzhde4q13ucuntvlc.png" alt="Image description" width="800" height="279"&gt;
&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Create function&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create/Attach Lambda Layers
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Install python version &lt;strong&gt;3.9&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the below command to install &lt;code&gt;jira&lt;/code&gt; package on the local filesystem.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 install jira -t jira/python
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Repeat the same command to install &lt;code&gt;requests&lt;/code&gt; package on the local filesystem.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 install requests -t requests/python
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create &lt;code&gt;.zip&lt;/code&gt; files for both the install packages&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd jira &amp;amp;&amp;amp; zip -r ../jira_layer.zip python
cd ..
cd requests &amp;amp;&amp;amp; zip -r ../requests_layer.zip python
cd ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create AWS lambda layers using the below commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws lambda publish-layer-version --layer-name jira-layer --zip-file fileb://jira_layer.zip --compatible-runtimes python3.9 --query 'LayerVersionArn' --output text
aws lambda publish-layer-version --layer-name requests-layer --zip-file fileb://requests_layer.zip --compatible-runtimes python3.9 --query 'LayerVersionArn' --output text
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy &lt;code&gt;LayerVersionArn&lt;/code&gt; from the above commands&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the below command to attach layers to the lambda function.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws lambda update-function-configuration \
--function-name &amp;lt;FUNCTION_NAME&amp;gt; \
--layers &amp;lt;JIRA_LAYER_VERSION_ARN&amp;gt; &amp;lt;REQUEST_LAYER_VERSION_ARN&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;
Replace the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FUNCTION_NAME: Name of the lambda function created in above steps.&lt;/li&gt;
&lt;li&gt;JIRA_LAYER_VERSION_ARN: ARN of the JIRA layer. &lt;/li&gt;
&lt;li&gt;REQUEST_LAYER_VERSION_ARN: ARN of the request layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Upload Code to Lambda Function (Using AWS Console)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Clone this GitHub &lt;a href="https://github.com/abhivaidya07/slack-reaction-bot" rel="noopener noreferrer"&gt;repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Zip the repository content using the below commands.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd slack-reaction-bot
zip -r slack_reaction_function.zip . -x ".git/*"
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the &lt;a href="https://console.aws.amazon.com/lambda/home#/functions" rel="noopener noreferrer"&gt;Functions page&lt;/a&gt; of the Lambda console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the function created above and choose the &lt;strong&gt;Code&lt;/strong&gt; tab.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Code source&lt;/strong&gt;, choose &lt;strong&gt;Upload from&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;.zip file&lt;/strong&gt;, and then choose &lt;strong&gt;Upload&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the zip file we created in earlier steps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uploaded code structure should look like this:&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%2Fj2zyvk15vk526vje81sk.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%2Fj2zyvk15vk526vje81sk.png" alt="Image description" width="800" height="151"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Deploy&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Set Environment Variables for Lambda Function (Using AWS Console)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;a href="https://console.aws.amazon.com/lambda/home#/functions" rel="noopener noreferrer"&gt;Functions page&lt;/a&gt; of the Lambda console.&lt;/li&gt;
&lt;li&gt;Choose the function created above and choose the &lt;strong&gt;Configuration&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Environment variables&lt;/strong&gt;, choose &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add environment variable&lt;/strong&gt; and add below variables:

&lt;ul&gt;
&lt;li&gt;Key: JIRA_SERVER, Value: Your JIRA server URL for eg. &lt;a href="https://org-name.atlassian.net" rel="noopener noreferrer"&gt;https://org-name.atlassian.net&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Key: JIRA_USERNAME, Value: Your JIRA username.&lt;/li&gt;
&lt;li&gt;Key: JIRA_API_TOKEN, Value: API Token for above user. Refer to this &lt;a href="https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/" rel="noopener noreferrer"&gt;link&lt;/a&gt; for token creation.&lt;/li&gt;
&lt;li&gt;Key: SLACK_APP_TOKEN, Value: Slack token created in &lt;em&gt;Adding Permissions to Slack application&lt;/em&gt; step&lt;/li&gt;
&lt;li&gt;Key: DONE_TRANSITION_ID, Value: Transition ID of done status. for example: 41&lt;/li&gt;
&lt;li&gt;Key: IN_PROGRESS_TRANSITION_ID, Value: Transition ID of in-progress status. for example: 31

&lt;ul&gt;
&lt;li&gt;Steps to get transition ID:

&lt;ul&gt;
&lt;li&gt;Go to JIRA board &amp;gt; Project settings &amp;gt; Workflows &amp;gt; Edit workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Enable Event Subscriptions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;On the &lt;a href="https://api.slack.com/apps" rel="noopener noreferrer"&gt;Your Apps&lt;/a&gt; page, select application created in above steps.&lt;/li&gt;
&lt;li&gt;From the left navigation panel, select &lt;strong&gt;Event Subscriptions&lt;/strong&gt; and toggle &lt;strong&gt;Enable Events&lt;/strong&gt; to ON.&lt;/li&gt;
&lt;li&gt;Paste the &lt;strong&gt;Function URL&lt;/strong&gt; of our lambda function into &lt;strong&gt;Request URL&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Request URL should be &lt;strong&gt;Verified&lt;/strong&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%2Fx9h5yuo5e58bgkfqyx79.png" alt="Image description" width="800" height="376"&gt;
&lt;/li&gt;
&lt;li&gt;(Temporary) Within &lt;strong&gt;Subscribe to bot events&lt;/strong&gt;, select &lt;strong&gt;Add Bot User Event&lt;/strong&gt;, then search for &lt;code&gt;reaction_added&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save Changes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: We will remove the &lt;code&gt;reaction_added&lt;/code&gt; event to ensure we do not receive two events when a slack reaction is added.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Create Workflow Steps
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;From the left navigation panel, select &lt;strong&gt;Workflow Steps&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Update settings&lt;/code&gt; from the highlighted text.
&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%2Fxkpd7nyk874v1sim79jj.png" alt="Image description" width="800" height="55"&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Event Subscriptions&lt;/strong&gt;, remove the &lt;code&gt;reaction_added&lt;/code&gt; event added in the earlier step and click &lt;strong&gt;Save Changes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Go back to &lt;strong&gt;Workflow Steps&lt;/strong&gt; and click &lt;strong&gt;Add Step&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Provide the &lt;strong&gt;Basic Information&lt;/strong&gt; as shown in the below image:
&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%2F06pu06mjbq8m89oqnqmt.png" alt="Image description" width="800" height="430"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Input Parameters&lt;/strong&gt; and fill in the details as follows: 

&lt;ul&gt;
&lt;li&gt;Input 1:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;String&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;message_ts&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: &lt;strong&gt;Message Timestamp&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Input 2:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;Channel&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;channel_id&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: Message &lt;strong&gt;Channel ID&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Input 3:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;User&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;user_id&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: Message &lt;strong&gt;User ID&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add one more step, while providing &lt;strong&gt;Basic Information&lt;/strong&gt; as shown in the below image:
&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%2F66ceuhyi2mbpvs0osly3.png" alt="Image description" width="800" height="430"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Input Parameters&lt;/strong&gt; and fill in the details as follows: 

&lt;ul&gt;
&lt;li&gt;Input 1:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;String&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make Required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;message_ts&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: &lt;strong&gt;Message Timestamp&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Input 2:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;Channel&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make Required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;channel_id&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: Message &lt;strong&gt;Channel ID&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Input 3:

&lt;ul&gt;
&lt;li&gt;Input type: &lt;strong&gt;User&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make Required: &lt;strong&gt;Enabled&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Parameter ID: &lt;strong&gt;user_id&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Title: Message &lt;strong&gt;User ID&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Install App&lt;/strong&gt; from the left navigation bar and then click &lt;strong&gt;Reinstall&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now we are ready to create automation based on Slack reactions !!&lt;/p&gt;

&lt;h3&gt;
  
  
  Add Automation on Slack Channel
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the slack channel on which you want to add automation.&lt;/li&gt;
&lt;li&gt;Click on the name of the channel and go to the &lt;strong&gt;Integration&lt;/strong&gt; tab.
&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%2Figthxsenmi95yrbqirxc.png" alt="Image description" width="800" height="179"&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Apps&lt;/strong&gt;, click &lt;strong&gt;Add apps&lt;/strong&gt; and select the slack application created in earlier steps.&lt;/li&gt;
&lt;li&gt;Go back to the &lt;strong&gt;Integration&lt;/strong&gt; tab, then click on &lt;strong&gt;Add Automation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now click on &lt;strong&gt;+ New Workflow&lt;/strong&gt; and select &lt;strong&gt;Build Workflow&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For event choose &lt;strong&gt;When an emoji reaction is used&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose an &lt;code&gt;emoji&lt;/code&gt; of your choice and &lt;code&gt;channel&lt;/code&gt; on which you want automation to work. for eg. I'm using emoji as ✅ and channel as &lt;code&gt;#devops&lt;/code&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%2Fp7idrrha35inul0ydyg2.png" alt="Image description" width="800" height="616"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Continue&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;Steps&lt;/strong&gt;, scroll down to the last and select &lt;strong&gt;Custom&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the Slack application, which we created in earlier steps.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Update Status Done&lt;/strong&gt;, as this automation is to update the JIRA ticket status as &lt;code&gt;done&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Provide inputs for Message Timestamp, Channel ID, and User ID as specified in the image below:
&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%2F9awcgq92m68rjrwo6he8.png" alt="Image description" width="800" height="672"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;, then click on &lt;strong&gt;Finish Up&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;Name&lt;/strong&gt; and &lt;strong&gt;Description&lt;/strong&gt; to the automation.&lt;/li&gt;
&lt;li&gt;(Optional) You can also specify who can manage, copy, or find this workflow by clicking on &lt;strong&gt;Show more permissions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Publish&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Repeat the same steps to create automation for updating the JIRA ticket status as &lt;code&gt;In Progress&lt;/code&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%2Fzy74kdo6wjeypvf9k0cr.png" alt="Image description" width="800" height="392"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Is it working?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a JIRA ticket on Slack using &lt;code&gt;/jira create&lt;/code&gt; command.
&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%2F2exengv0pmru0b0lgw4r.png" alt="Image description" width="800" height="121"&gt;
&lt;/li&gt;
&lt;li&gt;Add a 👀 reaction to the ticket.&lt;/li&gt;
&lt;li&gt;This will trigger our &lt;code&gt;In-Progress&lt;/code&gt; automation and perform the following steps:

&lt;ul&gt;
&lt;li&gt;Update the ticket status to &lt;strong&gt;In Progress&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Update the &lt;strong&gt;Assignee&lt;/strong&gt; to the user who reacted.
&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%2Fu0p39xz4xw1wx4hw68io.png" alt="Image description" width="800" height="135"&gt;
&lt;/li&gt;
&lt;li&gt;If the ticket status is already &lt;code&gt;In Progress&lt;/code&gt;, then the Lambda function specifies it in CloudWatch logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Now add a ✅ reaction to the ticket.&lt;/li&gt;
&lt;li&gt;This will trigger our &lt;code&gt;Done&lt;/code&gt; automation and perform the following steps:

&lt;ul&gt;
&lt;li&gt;Update the ticket status to &lt;strong&gt;Done&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add a comment on the ticket.
&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%2Fb06r2f3im1y7ot9c5oyr.png" alt="Image description" width="800" height="321"&gt;
&lt;/li&gt;
&lt;li&gt;If the ticket status is already &lt;code&gt;Done&lt;/code&gt;, then the Lambda function specifies it in CloudWatch logs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;To sum it up, we’ve created a seamless automation that updates JIRA ticket statuses directly through Slack reactions. With the power of a Slack app, AWS Lambda, and Slack workflow steps, this solution not only saves time but also ensures smoother workflows. Plus, it’s highly customizable—you can extend it to handle more reactions, add comments to JIRA tickets based on Slack threads, and much more. The possibilities are endless for optimizing your team's productivity!&lt;/p&gt;

&lt;p&gt;Alternatively, you can explore &lt;strong&gt;JIRA Service Management&lt;/strong&gt;, which costs approximately $140 for 4 &lt;a href="https://support.atlassian.com/jira-service-management-cloud/docs/what-do-agents-do-in-jira-service-management" rel="noopener noreferrer"&gt;agents&lt;/a&gt; (on-call engineers). However, with this solution, you only pay for the AWS Lambda executions, making it a more cost-effective approach. 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions?
&lt;/h2&gt;

&lt;p&gt;If you have any questions, I’ll be happy to read them in the comments.&lt;br&gt;
You can connect with me on &lt;a href="https://www.linkedin.com/in/abhishek-vaidya-028a70184/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you for reading :)
&lt;/h2&gt;

</description>
      <category>devops</category>
      <category>python</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Kubernetes on CRI-O (CentOS)</title>
      <dc:creator>Abhishek Vaidya</dc:creator>
      <pubDate>Mon, 14 Dec 2020 17:45:00 +0000</pubDate>
      <link>https://dev.to/abhivaidya07/kubernetes-on-cri-o-centos-o1m</link>
      <guid>https://dev.to/abhivaidya07/kubernetes-on-cri-o-centos-o1m</guid>
      <description>&lt;h2&gt;
  
  
  Docker is now deprecated in Kubernetes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Yes, it is true.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Docker support in the kubelet is now deprecated and will be removed in a future release. The kubelet uses a module called "dockershim" which implements CRI support for Docker and it has seen maintenance issues in the Kubernetes community.&lt;/p&gt;

&lt;p&gt;So, Now Kubernetes is encouraging to use different Container Runtime Interface instead of docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why CRI-O ?
&lt;/h2&gt;

&lt;p&gt;CRI-O is an implementation of the Kubernetes CRI (Container Runtime Interface) to enable using OCI (Open Container Initiative) compatible runtimes.&lt;/p&gt;

&lt;p&gt;It is a lightweight alternative to using Docker, Moby or rkt as the runtime for Kubernetes.&lt;/p&gt;

&lt;p&gt;CRI-O is a CRI runtime mainly developed by Red Hat folks. In fact, this runtime is used in Red Hat OpenShift now. Yes, they do not depend on Docker anymore.&lt;/p&gt;

&lt;p&gt;Interestingly, RHEL 7 does not officially support Docker either. Instead, they provide Podman, Buildah and CRI-O for container environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's get started
&lt;/h2&gt;

&lt;p&gt;Here we are deploying a 3 node cluster:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one master node&lt;/li&gt;
&lt;li&gt;two worker nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installing CRI-O (should be done on all nodes)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a enviroment variable for OS.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ export OS=CentOS_7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: If you are using CentOS 8 then give variable name as CentOS_8&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Create another environment variable for VERSION of crio.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ export VERSION=1.17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: If you are using CentOS 8 then you can also install crio version 1.18&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Configure REPO for cri-o.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install cri-o.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo yum install cri-o -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start and enable the cri-o service.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl start cri-o 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If any issue with starting cri-o, refer troubleshooting section !!
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl enable cri-o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Troubleshooting
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Not able to start cri-o service:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl status cri-o

crio.service - Container Runtime Interface for OCI (CRI-O)
   Loaded: loaded (/usr/lib/systemd/system/crio.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-12-11 05:42:49 EST; 29s ago
     Docs: https://github.com/cri-o/cri-o
  Process: 1259 ExecStart=/usr/bin/crio $CRIO_CONFIG_OPTIONS $CRIO_RUNTIME_OPTIONS $CRIO_STORAGE_OPTIONS $CRIO_NETWORK_OPTIONS $CRIO_METRICS_OPTIONS (code=exited, status=1/FAILURE)
 Main PID: 1259 (code=exited, status=1/FAILURE)

Dec 11 05:42:49 ip-172-31-89-94.ec2.internal systemd[1]: Starting Container Runtime Interface for OCI (CRI-O)...
Dec 11 05:42:49 ip-172-31-89-94.ec2.internal crio[1259]: time="2020-12-11 05:42:49.409813214-05:00" level=fatal msg="Validating root config: failed to get store to set defaults: kernel does not support overlay fs: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type is not supported.: driver not supported"
Dec 11 05:42:49 ip-172-31-89-94.ec2.internal systemd[1]: crio.service: main process exited, code=exited, status=1/FAILURE
Dec 11 05:42:49 ip-172-31-89-94.ec2.internal systemd[1]: Failed to start Container Runtime Interface for OCI (CRI-O).
Dec 11 05:42:49 ip-172-31-89-94.ec2.internal systemd[1]: Unit crio.service entered failed state.
Dec 11 05:42:49 ip-172-31-89-94.ec2.internal systemd[1]: crio.service failed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Root Cause:
&lt;/h4&gt;

&lt;p&gt;The default container storage i.e. /var/lib/containers/storage is mounted with ftype=0, so d_type is disabled ( d_type enables mapping of filename to its inode ). For overlay, &lt;strong&gt;ftype=1 is a requirement !!&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo xfs_info /var/lib/containers/storage | grep ftype

naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Solution:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a Logical Volume (LV).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo fdisk &amp;lt;disk_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo partprobe &amp;lt;disk_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vgcreate vgname &amp;lt;partition&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo lvcreate -l 100%FREE -n lvname vgname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo lvs

LV     VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
root   centos -wi-ao----  &amp;lt;6.67g
swap   centos -wi-ao---- 820.00m
lvname vgname -wi-a-----  &amp;lt;5.00g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Format LV with XFS filesystem
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo mkfs.xfs /dev/mapper/vgname-lvname

meta-data=/dev/mapper/vgname-lvname isize=512    agcount=4, agsize=327424 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=1309696, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now ftype is set to 1.&lt;/li&gt;
&lt;li&gt;Mount LV on /var/lib/containers/storage permanently.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/fstab | grep /var/lib/containers/storage

/dev/mapper/vgname-lvname /var/lib/containers/storage xfs defaults 0 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo mount -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo df -hT | grep /var/lib/containers/storage

/dev/mapper/vgname-lvname xfs       5.0G   33M  5.0G   1% /var/lib/containers/storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Change runroot path and un-hash both runroot &amp;amp; root in /etc/crio/crio.conf.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/crio/crio.conf | grep /var/lib/containers/storage

root = "/var/lib/containers/storage"
runroot = "/var/lib/containers/storage"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Then start and enable the cri-o service.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl start cri-o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl enable cri-o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install and configure prerequisites for Kubernetes: (should be done on all nodes)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Load overlay module.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo modprobe overlay
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Load br_netfilter module.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo modprobe br_netfilter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This module is enabled so that iptables, ip6tables and arptables can filter bridged IPv4/IPv6/ARP packets and makes the firewall transparent.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up required sysctl params, these persist across reboots.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat &amp;lt;&amp;lt;EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf
net.bridge.bridge-nf-call-iptables  = 1
net.ipv4.ip_forward                 = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Apply sysctl params without reboot.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo sysctl --system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Disabling firewall.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl stop firewalld &amp;amp;&amp;amp; sudo systemctl disable firewalld
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Set SELinux in permissive mode (effectively disabling it).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo setenforce 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo sed -i -e s/SELINUX=enforcing/SELINUX=permissive/g /etc/sysconfig/selinux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Switching off swap.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo swapoff -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Also disable the swap in /etc/fstab (comment swap entry).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/fstab | grep swap

#/dev/mapper/centos-swap                                swap                    swap    defaults        0 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Change cgroup_manager of crio in /etc/crio/crio.conf.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/crio/crio.conf | grep cgroup_manager

cgroup_manager = "cgroupfs"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Configure Kubernetes repo.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/yum.repos.d/kube.repo

[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deploying Kubernetes Cluster
&lt;/h3&gt;

&lt;h4&gt;
  
  
  COMMANDS ON MASTER
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Install kubeadm package.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo yum install kubeadm -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start and enable kubelet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl start kubelet &amp;amp;&amp;amp; sudo systemctl enable kubelet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now initialize the Kubernetes control-plane and master.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo kubeadm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: If giving error of iptables does not exist, just load br_netfilter module again and run the command.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Output
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

  export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.46.157:6443 --token 7xlnp0.9uv4z0qr4wvzhtqn \
    --discovery-token-ca-cert-hash sha256:4a1a412d2e682556df0bf10dc380c744a98eb99e8c927fa58eb025d5ff7dc694
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To make kubectl work for your non-root user, run these commands, which are also part of the kubeadm init output:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir -p $HOME/.kube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;These commands store your Kubernetes configuration file in home directory.&lt;/li&gt;
&lt;li&gt;Make a record of the kubeadm join command that kubeadm init outputs. You need this command to join nodes to your cluster.&lt;/li&gt;
&lt;li&gt;We need to install CNI plugin. So that pods can communicate with each other. &lt;/li&gt;
&lt;li&gt;There are different CNI plugins for different purpose. Here we are using &lt;strong&gt;Weave Net&lt;/strong&gt; CNI plugin.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Weave Net creates a virtual network that connects containers across multiple hosts and enables their automatic discovery.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once the CNI plugin has been installed, you can confirm that it is working by checking that the CoreDNS Pod is up and running.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods -n kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Our master is ready !!
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get nodes

NAME     STATUS   ROLES                  AGE   VERSION
master   Ready    control-plane,master   14m   v1.20.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now we need to add worker nodes to the cluster. &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  COMMANDS ON WORKER NODES
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Install kubeadm package.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo yum install kubeadm -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start and enable kubelet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl start kubelet &amp;amp;&amp;amp; sudo systemctl enable kubelet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run the kubeadm join command. (command in the output of kubeadm init)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo kubeadm join 192.168.46.157:6443 --token 7xlnp0.9uv4z0qr4wvzhtqn \
    --discovery-token-ca-cert-hash sha256:4a1a412d2e682556df0bf10dc380c744a98eb99e8c927fa58eb025d5ff7dc694
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Output
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now our worker nodes have joined the cluster !!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  COMMAND ON MASTER
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Check whether nodes are ready.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get nodes

NAME      STATUS   ROLES                  AGE     VERSION
master    Ready    control-plane,master   15m     v1.20.0
worker1   Ready    &amp;lt;none&amp;gt;                 4m44s   v1.20.0
worker2   Ready    &amp;lt;none&amp;gt;                 4m18s   v1.20.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  HURRAH !! Kubernetes cluster is ready
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;THANK YOU!!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>linux</category>
      <category>docker</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Connecting WordPress to Amazon RDS using Terraform</title>
      <dc:creator>Abhishek Vaidya</dc:creator>
      <pubDate>Thu, 19 Nov 2020 09:15:43 +0000</pubDate>
      <link>https://dev.to/abhivaidya07/connecting-wordpress-to-amazon-rds-using-terraform-15bm</link>
      <guid>https://dev.to/abhivaidya07/connecting-wordpress-to-amazon-rds-using-terraform-15bm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this blog using terraform, we will launch WordPress application in an Amazon EC2 instance and connect it to Amazon RDS (database instance).&lt;/p&gt;

&lt;h3&gt;
  
  
  What is WordPress ?
&lt;/h3&gt;

&lt;p&gt;WordPress is a free, open-source website creation platform which requires access to database to store information. Therefore we need database to make WordPress accessible. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Amazon RDS ?
&lt;/h3&gt;

&lt;p&gt;Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud.&lt;br&gt;
Here we will use Amazon RDS as database for WordPress application.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Terraform ?
&lt;/h3&gt;

&lt;p&gt;Terraform is used for writing infrastructure as Code to provision and manage any cloud, infrastructure, or service. In this blog we will provision different services provided by Amazon Web Services (AWS). &lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started !!
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Configure AWS CLI, because terraform uses these credentials to authenticate with AWS.
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;p&gt;Give correct access_key and secret_key.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: If you are using aws student account give session token, by pasting it in .aws/credentials file&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Install Terraform (Refer this &lt;a href="https://learn.hashicorp.com/tutorials/terraform/install-cli" rel="noopener noreferrer"&gt;link&lt;/a&gt;) &lt;/li&gt;
&lt;li&gt;Clone Terraform file from this GitHub &lt;a href="https://github.com/abhivaidya07/wordpress_rds" rel="noopener noreferrer"&gt;Repository&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/abhivaidya07/wordpress_rds
$ cd wordpress_rds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Repository contains two files: 

&lt;ul&gt;
&lt;li&gt;script.sh: Contains commands which install WordPress application.&lt;/li&gt;
&lt;li&gt;main.tf: Terraform file which creates EC2 instance with WordPress installed in it (using script.sh) and also creates RDS database instance. &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;RDS database instance is of &lt;em&gt;db.t2.micro&lt;/em&gt; type and contains &lt;em&gt;&lt;strong&gt;username&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;password&lt;/strong&gt;&lt;/em&gt; as &lt;em&gt;&lt;strong&gt;root&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;redhat123&lt;/strong&gt;&lt;/em&gt; respectively. &lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;You can change it by updating username and password parameter under &lt;em&gt;aws_db_instance&lt;/em&gt; resource.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Initialize Terraform to install required providers.
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run the terraform file.
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;RDS instance takes sometime to get created...
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Creates EC2 instance with WordPress application installed in it and also creates RDS instance with &lt;em&gt;mysql 5.7&lt;/em&gt; engine, &lt;em&gt;wordpress&lt;/em&gt; database and 20 GiB storage.&lt;/li&gt;
&lt;li&gt;EC2 instance name - wordpress&lt;/li&gt;
&lt;li&gt;RDS instance name - sample&lt;/li&gt;
&lt;li&gt;Browse to public ip of EC2 instance i.e. wordpress&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Give Database Name - wordpress (Created in RDS instance)&lt;/li&gt;
&lt;li&gt;Give Username - root (If you have not changed)&lt;/li&gt;
&lt;li&gt;Give Password - redhat123 (If you have not changed)&lt;/li&gt;
&lt;li&gt;Give Database Host - &lt;strong&gt;Endpoint of RDS instance&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: To access Endpoint refer this &lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html" rel="noopener noreferrer"&gt;link&lt;/a&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Click on &lt;em&gt;Submit&lt;/em&gt; button.&lt;/li&gt;
&lt;li&gt;Then click &lt;em&gt;Run the installation&lt;/em&gt; button. &lt;/li&gt;
&lt;li&gt;Fill the required details and click on &lt;em&gt;Install WordPress&lt;/em&gt; button. &lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Login using credentials just created.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Hurray !! Your WordPress application is working.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Now your WordPress application is using Amazon RDS as a backend !!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>terraform</category>
      <category>aws</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>GCP Automation using Ansible</title>
      <dc:creator>Abhishek Vaidya</dc:creator>
      <pubDate>Tue, 17 Nov 2020 18:06:20 +0000</pubDate>
      <link>https://dev.to/abhivaidya07/gcp-automation-using-ansible-385c</link>
      <guid>https://dev.to/abhivaidya07/gcp-automation-using-ansible-385c</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Ansible provides different Google Cloud Platform modules for automating google cloud platform. In this blog we will be creating a Google Compute Engine Instance and deploy Apache Server on it using Ansible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;a href="https://console.cloud.google.com/projectselector/compute/instances"&gt;Project&lt;/a&gt; on Google Cloud Platform. &lt;/li&gt;
&lt;li&gt;Create a &lt;a href="https://console.cloud.google.com/iam-admin/serviceaccounts"&gt;Serviceaccount&lt;/a&gt; with editor access. (Refer &lt;a href="https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances"&gt;Creating-service-account&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GitHub
&lt;/h3&gt;

&lt;p&gt;You can find the resources in &lt;a href="https://github.com/abhivaidya07/ansible_gcloud"&gt;abhivaidya07/ansible_gcloud&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started !!
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Install python version &amp;gt; 3.0
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo yum install python3-pip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The GCP modules require both the requests and the google-auth libraries to be installed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo pip3 install requests google-auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install Ansible
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo pip3 install ansible 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Download &lt;a href="https://support.google.com/cloud/answer/6158849?hl=en&amp;amp;ref_topic=6262490#serviceaccounts"&gt;.JSON credentials file&lt;/a&gt; of created service account.&lt;/li&gt;
&lt;li&gt;Edit instance_name in &lt;a href="//vars/main.yml"&gt;vars/main.yml&lt;/a&gt;, by default it is centos-7.&lt;/li&gt;
&lt;li&gt;Edit machine_type in &lt;a href="//vars/main.yml"&gt;vars/main.yml&lt;/a&gt;, by default it is e2-micro.&lt;/li&gt;
&lt;li&gt;Edit zone in &lt;a href="//vars/main.yml"&gt;vars/main.yml&lt;/a&gt;, by default it is us-central1-a.&lt;/li&gt;
&lt;li&gt;Edit source_image in &lt;a href="//vars/main.yml"&gt;vars/main.yml&lt;/a&gt;, by default it is CENTOS-7.&lt;/li&gt;
&lt;li&gt;Give project id, .JSON file_path in &lt;a href="//vars/main.yml"&gt;vars/main.yml&lt;/a&gt; file. &lt;/li&gt;
&lt;li&gt;Run the Playbook
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ansible-playbook gce.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Your Google Compute Engine Instance is now created, with Apache Server installed in it.&lt;/li&gt;
&lt;li&gt;Browse to instance public ip address, and you will see HELLO WORLD !! is getting displayed.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>googlecloud</category>
      <category>ansible</category>
      <category>devops</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
