<?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>Forem: Kazuo Yagi</title>
    <description>The latest articles on Forem by Kazuo Yagi (@kyagi).</description>
    <link>https://forem.com/kyagi</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%2F57771%2Fea56339a-7b89-4b37-9062-d0f189817f1f.png</url>
      <title>Forem: Kazuo Yagi</title>
      <link>https://forem.com/kyagi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kyagi"/>
    <language>en</language>
    <item>
      <title>Building the development environment on Amazon Linux 2023 with user_data.txt</title>
      <dc:creator>Kazuo Yagi</dc:creator>
      <pubDate>Tue, 25 Apr 2023 14:30:14 +0000</pubDate>
      <link>https://forem.com/kyagi/building-the-development-environment-on-amazon-linux-2023-with-userdatatxt-3g2g</link>
      <guid>https://forem.com/kyagi/building-the-development-environment-on-amazon-linux-2023-with-userdatatxt-3g2g</guid>
      <description>&lt;p&gt;In my case, requirements for an expected development environment on EC2 are as follows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Mandatory:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The following programming language can be available with a specific(latest) version:

&lt;ul&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Rust&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Well equipped with build essential and useful tools

&lt;ul&gt;
&lt;li&gt;jq&lt;/li&gt;
&lt;li&gt;ripgrep(rg)&lt;/li&gt;
&lt;li&gt;fd(fd-find)&lt;/li&gt;
&lt;li&gt;fzf&lt;/li&gt;
&lt;/ul&gt;


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

&lt;h4&gt;
  
  
  Optional:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Could be accessed through EC2 instance connect, the browser-based terminal on AWS Management Console&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  user_data.txt
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/kyagi/c28935eeb83b3b03a296a7ed2a179abc#file-user_data-txt"&gt;https://gist.github.com/kyagi/c28935eeb83b3b03a296a7ed2a179abc#file-user_data-txt&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  how to run
&lt;/h3&gt;

&lt;p&gt;I use ansible and its collection &lt;code&gt;amazon.aws.ec2_instance collection&lt;/code&gt; with my configuration json file with variables to pass over ansible at runtime.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;➜ pyenv exec ansible-playbook -i hosts site.yml --extra-vars "@workstation.json"
&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;➜ cat roles/spawn/tasks/main.yml
---
- name: Spawn an ec2 instance
  amazon.aws.ec2_instance:
    name: "{{ instance_name }}"
    key_name: "{{ key_name }}"
    vpc_subnet_id: "{{ vpc_subnet_id }}"
    instance_type: "{{ instance_type }}"
    security_groups: "{{ security_groups }}"
    network:
      assign_public_ip: true
      private_ip_address: "{{ private_ip_address }}"
    image_id: "{{ image_id }}"
    user_data: "{{ lookup('file', 'user_data.txt') }}"
    volumes:
      - device_name: /dev/xvda
        ebs:
          volume_size: 30
          volume_type: gp2
          delete_on_termination: true
    tags:
      Owner: "{{ owner }}"
      Stack: "{{ stack }}"
      Project: "{{ project }}"
      Application: "{{ application }}"
      Ec2InstanceConnectAccess: "{{ ec2_instance_connect_access }}"
&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;➜ cat workstation/workstation.json
{
  "instance_name": "workstation",
  "key_name": "__key-name__",
  "vpc_subnet_id": "__subnet-id__",
  "instance_type": "t4g.small",
  "security_groups": ["__sg-id1__", "__sg-id2__"],
  "private_ip_address": "10.0.0.10",
  "image_id": "resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64",
  "owner": "kyagi",
  "stack": "deveplopment",
  "project": "workstation",
  "application": "hodgepodge of development tools",
  "ec2_instance_connect_access": "true"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aws</category>
      <category>ec2</category>
      <category>ansible</category>
    </item>
    <item>
      <title>Shamshir: Github Actions to attach a label to pull requests based on the number of approvals</title>
      <dc:creator>Kazuo Yagi</dc:creator>
      <pubDate>Sun, 06 Feb 2022 18:07:27 +0000</pubDate>
      <link>https://forem.com/kyagi/shamshir-github-action-to-attach-a-label-to-pull-requests-based-on-the-number-of-approvals-2abd</link>
      <guid>https://forem.com/kyagi/shamshir-github-action-to-attach-a-label-to-pull-requests-based-on-the-number-of-approvals-2abd</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VACINOUj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0fruckqntafmtcvxs6u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VACINOUj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0fruckqntafmtcvxs6u.png" alt="Image description" width="880" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Shamshir is a Github Action to attach a label to pull requests based on the number of approvals. &lt;/p&gt;

&lt;p&gt;You would find it useful if your team's git repository is run under some conventions that requires 2 or more approvals from members to let a pull request merged or release.&lt;/p&gt;

&lt;p&gt;Shamshir will make it easy to find out which pull request can be "releasable" by attaching a label to each pull request based on the number of approvals.&lt;/p&gt;

&lt;p&gt;It is designed to be run both on stand-alone server and on Github Actions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kyagi/shamshir"&gt;https://github.com/kyagi/shamshir&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Screenshot
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ff0YImvq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qfmhmd8iwdxz8v4gpm5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ff0YImvq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qfmhmd8iwdxz8v4gpm5.png" alt="Image description" width="583" height="67"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jWf1NZnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzmr9fnozhn9vx60lumi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jWf1NZnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bzmr9fnozhn9vx60lumi.png" alt="Image description" width="880" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>javascript</category>
      <category>node</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
