<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss/pretty-feed-v3.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Amina Lawal</title><description>Amina&apos;s personal blog, I enjoy the process of building something using any technology stack</description><link>https://aminalawal.com/</link><item><title>IP Addresses &amp; Subnetting - Every device needs an address to communicate</title><link>https://aminalawal.com/posts/ipaddressingandsubnetting/</link><guid isPermaLink="true">https://aminalawal.com/posts/ipaddressingandsubnetting/</guid><description>Networking is how computers and servers communicate with each other over the Internet or a private network. It’s like a postal system for data—your data (letters) needs an address (IP) and a path (routes) to reach its destination.</description><pubDate>Tue, 01 Apr 2025 13:00:00 GMT</pubDate><content:encoded>&lt;h3 id=&quot;what-is-an-ip-address&quot;&gt;&lt;strong&gt;What is an IP Address?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;An &lt;strong&gt;IP address (Internet Protocol address)&lt;/strong&gt; is a unique identifier for a device on a network. It’s like your home address but for computers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Types of IP Addresses&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IPv4&lt;/strong&gt; (e.g., &lt;code&gt;192.168.1.1&lt;/code&gt;) – Most common, but limited.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv6&lt;/strong&gt; (e.g., &lt;code&gt;2001:0db8:85a3::8a2e:0370:7334&lt;/code&gt;) – Newer, more addresses available.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Public vs. Private IP&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Public IP&lt;/strong&gt; – Unique on the internet (e.g., Google’s &lt;code&gt;8.8.8.8&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Private IP&lt;/strong&gt; – Used within a local network (e.g., &lt;code&gt;192.168.1.1&lt;/code&gt; for your router).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;hands-on-task-find-your-ip-address&quot;&gt;&lt;strong&gt;Hands-On Task: Find Your IP Address&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Try these commands on your terminal:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Find your public IP (internet IP):&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ifconfig.me&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; icanhazip.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Find your private IP (local network IP):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;On Linux/macOS:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;ip&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; a&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;On Windows (Command Prompt):&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;ip&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;subnetting-breaking-down-networks&quot;&gt;Subnetting (Breaking Down Networks)&lt;/h2&gt;
&lt;h3 id=&quot;what-is-subnetting&quot;&gt;What is Subnetting?&lt;/h3&gt;
&lt;p&gt;Subnetting is dividing a large network into smaller, more manageable networks (&lt;strong&gt;subnets&lt;/strong&gt;). This helps with:&lt;/p&gt;
&lt;p&gt;✅ Efficient IP allocation&lt;/p&gt;
&lt;p&gt;✅ Better security&lt;/p&gt;
&lt;p&gt;✅ Reduced network congestion&lt;/p&gt;
&lt;h3 id=&quot;ip-address-structure-ipv4&quot;&gt;IP Address Structure (IPv4)&lt;/h3&gt;
&lt;p&gt;An IPv4 address has &lt;strong&gt;four numbers (octets)&lt;/strong&gt; separated by dots, each ranging from &lt;strong&gt;0 to 255&lt;/strong&gt;. Example&lt;/p&gt;
&lt;p&gt;Each IP address consists of two parts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Network Portion&lt;/strong&gt; – Identifies the network&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Host Portion&lt;/strong&gt; – Identifies a specific device&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The &lt;strong&gt;Subnet Mask&lt;/strong&gt; tells us how many bits belong to the &lt;strong&gt;network&lt;/strong&gt; and how many belong to &lt;strong&gt;hosts&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;understanding-subnet-masks&quot;&gt;&lt;strong&gt;Understanding Subnet Masks&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;subnet mask&lt;/strong&gt; determines which part of an IP address belongs to the &lt;strong&gt;network&lt;/strong&gt; and which part is for devices.&lt;/p&gt;
&lt;p&gt;Common subnet masks:&lt;/p&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;Subnet Mask&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;CIDR Notation&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Usable IPs&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;255.0.0.0&lt;/td&gt;&lt;td&gt;/8&lt;/td&gt;&lt;td&gt;16,777,214&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;255.255.0.0&lt;/td&gt;&lt;td&gt;/16&lt;/td&gt;&lt;td&gt;65,534&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;255.255.255.0&lt;/td&gt;&lt;td&gt;/24&lt;/td&gt;&lt;td&gt;254&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;255.255.255.128&lt;/td&gt;&lt;td&gt;/25&lt;/td&gt;&lt;td&gt;126&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IP Address: &lt;code&gt;192.168.1.10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Subnet Mask: &lt;code&gt;255.255.255.0&lt;/code&gt; (&lt;code&gt;/24&lt;/code&gt;)
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Network Portion:&lt;/strong&gt; &lt;code&gt;192.168.1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Host Portion:&lt;/strong&gt; &lt;code&gt;10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Usable IPs: &lt;strong&gt;254&lt;/strong&gt; (from &lt;code&gt;.1&lt;/code&gt; to &lt;code&gt;.254&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;hands-on-task-check-your-subnet-mask&quot;&gt;Hands-on Task: Check Your Subnet Mask&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;On macOS, run:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;ifconfig&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; netmask&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt=&quot;Output&quot; width=&quot;1314&quot; height=&quot;256&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/output.DPXdQ-14_Z1GrgMH.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;understanding-the-output&quot;&gt;&lt;strong&gt;Understanding the Output&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;inet 127.0.0.1 netmask 0xff000000&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is the &lt;strong&gt;loopback address&lt;/strong&gt; (&lt;code&gt;127.0.0.1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;It’s used for internal communication within your device (your computer talking to itself).&lt;/li&gt;
&lt;li&gt;The netmask &lt;code&gt;0xff000000&lt;/code&gt; (hexadecimal) is equivalent to &lt;strong&gt;255.0.0.0&lt;/strong&gt; or &lt;strong&gt;/8&lt;/strong&gt; in CIDR notation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;inet 172.20.10.10 netmask 0xfffffff0 broadcast 172.20.10.15&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is your actual &lt;strong&gt;private IP address&lt;/strong&gt; (&lt;code&gt;172.20.10.10&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;It belongs to the &lt;strong&gt;172.16.0.0 - 172.31.255.255&lt;/strong&gt; range, which is for private networks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Netmask: &lt;code&gt;0xfffffff0&lt;/code&gt; (hex) = 255.255.255.240 (CIDR: /28)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;This means your network has &lt;strong&gt;16 total IPs (14 usable: .1 to .14, since .0 is the network and .15 is the broadcast).&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-this-means-for-your-network&quot;&gt;&lt;strong&gt;What This Means for Your Network&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;You are on a &lt;strong&gt;private network with a small subnet (/28)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Your network can support up to &lt;strong&gt;14 devices&lt;/strong&gt; (IP range: &lt;code&gt;172.20.10.1&lt;/code&gt; to &lt;code&gt;172.20.10.14&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;broadcast address&lt;/strong&gt; (&lt;code&gt;172.20.10.15&lt;/code&gt;) is used to send messages to all devices on this subnet.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;next-steps-practice-subnetting&quot;&gt;&lt;strong&gt;Next Steps: Practice Subnetting&lt;/strong&gt;&lt;/h2&gt;
&lt;h3 id=&quot;try-answering-these-questions&quot;&gt;&lt;strong&gt;Try answering these questions:&lt;/strong&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;If you had a &lt;strong&gt;/24 subnet mask (255.255.255.0)&lt;/strong&gt; instead of &lt;strong&gt;/28&lt;/strong&gt;, how many usable IPs would you have?&lt;/li&gt;
&lt;li&gt;Convert &lt;strong&gt;255.255.255.192&lt;/strong&gt; into CIDR notation and tell me how many usable IPs it provides.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;terminology-to-know&quot;&gt;TERMINOLOGY TO KNOW&lt;/h2&gt;
&lt;h2 id=&quot;what-is-a-loopback-address&quot;&gt;What is a Loopback Address?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Loopback address = 127.0.0.1&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-does-it-do&quot;&gt;What does it do?&lt;/h3&gt;
&lt;p&gt;It lets your computer &lt;strong&gt;talk to itself&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;why-is-that-useful&quot;&gt;Why is that useful?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Testing if your network stack is working.&lt;/li&gt;
&lt;li&gt;Running servers or services &lt;strong&gt;locally&lt;/strong&gt; without internet.&lt;/li&gt;
&lt;li&gt;Developers use it all the time.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Think of 127.0.0.1 like calling your own phone number—it rings, and you’re the one answering.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;what-is-a-broadcast-address&quot;&gt;What is a Broadcast Address?&lt;/h2&gt;
&lt;p&gt;It’s a special IP used to &lt;strong&gt;send data to every device&lt;/strong&gt; on the subnet.&lt;/p&gt;
&lt;h3 id=&quot;why-is-it-needed&quot;&gt;Why is it needed?&lt;/h3&gt;
&lt;p&gt;Let’s say you want to alert &lt;strong&gt;every device&lt;/strong&gt; connected to your network (“hey everyone, please refresh your DNS settings!”) — you send that message to the &lt;strong&gt;broadcast address&lt;/strong&gt;. Everyone on the subnet hears it.&lt;/p&gt;
&lt;p&gt;So in &lt;code&gt;/28&lt;/code&gt;, broadcast = &lt;code&gt;172.20.10.15&lt;/code&gt;&lt;/p&gt;</content:encoded></item><item><title>Exploring Kubernetes with HKE</title><link>https://aminalawal.com/posts/exploring-kubernetes-with-hke/</link><guid isPermaLink="true">https://aminalawal.com/posts/exploring-kubernetes-with-hke/</guid><description>Managing Kubernetes clusters can be complex and time-consuming. HKE (HostSpace Kubernetes Engine) aims to simplify this process with automated cluster management.</description><pubDate>Fri, 03 Jan 2025 21:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Managing Kubernetes clusters can be complex and time-consuming. HKE (HostSpace Kubernetes Engine) aims to simplify this process with automated cluster management, built-in monitoring, and intelligent optimization recommendations. Let’s explore how HKE streamlines the Kubernetes experience while providing robust management features.&lt;/p&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;Before creating your first cluster, ensure you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A server/instance ready for use&lt;/li&gt;
&lt;li&gt;SSH key for secure access&lt;/li&gt;
&lt;li&gt;Instance username&lt;/li&gt;
&lt;li&gt;Basic understanding of Kubernetes concepts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Start by visiting the HKE Settings page to add your instances and SSH keys. This is particularly useful if you manage multiple infrastructure components.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;Instance Page&quot; width=&quot;1400&quot; height=&quot;741&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke2.DVlb6YW5_2wxJ1G.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;creating-your-first-cluster&quot;&gt;Creating Your First Cluster&lt;/h3&gt;
&lt;p&gt;HKE’s approach to cluster creation is refreshingly straightforward. Unlike traditional Kubernetes setups that often require extensive configuration, HKE streamlines the process to a few essential steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose your Kubernetes version&lt;/li&gt;
&lt;li&gt;Select or add your instance IP&lt;/li&gt;
&lt;li&gt;Provide SSH credentials&lt;/li&gt;
&lt;li&gt;Name your cluster&lt;/li&gt;
&lt;li&gt;Select your Kubernetes version (1.31 in my case)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cluster Home Page
&lt;img alt=&quot;Cluster Home Page&quot; width=&quot;1400&quot; height=&quot;741&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke3.CeQVugAm_Z1z8dEr.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;Creating a Cluster using Saved Credentials (Instance IP &amp;#x26; SSH Keys)
&lt;img alt=&quot;Creating a Cluster using Saved Credentials (Instance IP &amp;amp;#x26; SSH Keys)&quot; width=&quot;1400&quot; height=&quot;741&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke4.B5Ef2O8A_19CA4g.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;Cluster Creation Completed
&lt;img alt=&quot;Cluster Creation Completed&quot; width=&quot;1400&quot; height=&quot;741&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke5.CnAW52Ut_WaJYt.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;What stands out is the minimal input required — HKE handles the complex underlying configuration automatically.&lt;/p&gt;
&lt;h3 id=&quot;connecting-to-your-cluster&quot;&gt;Connecting to Your Cluster&lt;/h3&gt;
&lt;p&gt;Once your cluster is up, HKE provides straightforward connection instructions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the kubeconfig file&lt;/li&gt;
&lt;li&gt;Configure kubectl using the provided commands&lt;/li&gt;
&lt;li&gt;Verify connection with &lt;code&gt;kubectl get nodes&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;A useful tip:&lt;/strong&gt; Make sure to use the complete context name when switching contexts, as it includes a unique identifier.&lt;/p&gt;
&lt;p&gt;Connection instructions from HKE UI
&lt;img alt=&quot;Connection instructions from HKE UI&quot; width=&quot;1400&quot; height=&quot;741&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke6.BsxaFvPA_Z2clGSc.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;Cluster Creation Completed
&lt;img alt=&quot;Connection instructions from HKE UI&quot; width=&quot;1400&quot; height=&quot;292&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke7.BMDRg6bC_ZBjta5.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;deploying-applications-from-the-marketplace&quot;&gt;Deploying Applications from the Marketplace&lt;/h3&gt;
&lt;p&gt;HKE comes with a built-in marketplace offering various applications. For this demonstration.&lt;/p&gt;
&lt;p&gt;Before deploying ArgoCD, we first needed to set up the Nginx Ingress Controller from HKE’s Marketplace. This is a crucial component because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It acts as the traffic manager for your cluster&lt;/li&gt;
&lt;li&gt;Enables domain-based routing using .nip.io&lt;/li&gt;
&lt;li&gt;Allows external access to applications running in the cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to the Marketplace tab&lt;/li&gt;
&lt;li&gt;Locate Nginx Ingress Controller &amp;#x26; ArgoCD in the available applications&lt;/li&gt;
&lt;li&gt;Click Install — HKE handles all the underlying complexity&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;HKE Marketplace
&lt;img alt=&quot;HKE Marketplace&quot; width=&quot;1400&quot; height=&quot;708&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke8.Cdn3vFXR_sdhAM.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;quick-verification-with-port-forwarding&quot;&gt;Quick Verification with Port Forwarding&lt;/h3&gt;
&lt;p&gt;Before setting up external access, it’s good practice to verify your deployment using port forwarding:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;kubectl port-forward svc/argocd-server -n argocd 8080:443&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This allows you to quickly access the UI at &lt;a href=&quot;https://localhost:8080&quot;&gt;https://localhost:8080&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Generating password for ArgoCD &amp;#x26; Port Forwarding
&lt;img alt=&quot;Generating password for ArgoCD &amp;amp;#x26; Port Forwarding&quot; width=&quot;1400&quot; height=&quot;342&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke9.BxEOWA6N_Z1wAeIY.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;Local Host ArgoCD UI accessed with Port-forwarding
&lt;img alt=&quot;Local Host ArgoCD UI accessed with Port-forwarding&quot; width=&quot;1400&quot; height=&quot;747&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke10.CW37MX5b_ZiBy2W.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;setting-up-external-access&quot;&gt;Setting Up External Access&lt;/h3&gt;
&lt;p&gt;In our case:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;HKE Marketplace automatically deployed the Nginx Ingress Controller&lt;/li&gt;
&lt;li&gt;Created ingress rules for ArgoCD&lt;/li&gt;
&lt;li&gt;Configured domain access using .nip.io for convenient URL access&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since we’re running in an environment without a LoadBalancer and we didn’t set up MetalLb, we needed to switch to NodePort:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;kubectl patch svc nginx-ingress-ingress-nginx-controller -n default -p &apos;{&quot;spec&quot;: {&quot;type&quot;: &quot;NodePort&quot;}}&apos;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This change allows external traffic to reach our ingress controller through a specific port on the node.&lt;/p&gt;
&lt;p&gt;After configuring NodePort, access ArgoCD through.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://argocd.YOUR-NODE-IP.nip.io:NODEPORT&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Where &lt;strong&gt;NODEPORT&lt;/strong&gt; is the port assigned by Kubernetes (in our case, 31043)&lt;/p&gt;
&lt;p&gt;Successfully deployed ArgoCD interface
&lt;img alt=&quot;Successfully deployed ArgoCD interface&quot; width=&quot;1400&quot; height=&quot;761&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke11.B1dUmkv4_Z1z2oJx.webp&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;/h3&gt;
&lt;p&gt;For production environments, consider these additional security enhancements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable SSL redirect&lt;/li&gt;
&lt;li&gt;Configure backend protocol as HTTPS&lt;/li&gt;
&lt;li&gt;Implement proper certificate management&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;what-makes-hke-stand-out&quot;&gt;What Makes HKE Stand Out&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Simplified Management: The one-click deployment of complex applications like ArgoCD shows how HKE abstracts away Kubernetes complexity&lt;/li&gt;
&lt;li&gt;Intelligent Monitoring: Built-in resource tracking, security monitoring, and advisory systems provide comprehensive cluster insights&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Security Events
&lt;img alt=&quot;Security Events&quot; width=&quot;1400&quot; height=&quot;680&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke12.sWZ3or1A_ZhsQdR.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;HKE Advisory
&lt;img alt=&quot;HKE Advisory&quot; width=&quot;1400&quot; height=&quot;680&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke13.DQbI_sOo_ZrFmzN.webp&quot;&gt;&lt;/p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;
&lt;p&gt;Automated Best Practices: From ingress configuration to resource optimization recommendations, HKE guides you toward Kubernetes best practices&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clear Visibility: The dashboard provides immediate insights into cluster health, resource usage, and potential optimizations&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;General Cluster Dashboard
&lt;img alt=&quot;General Cluster Dashboard&quot; width=&quot;1400&quot; height=&quot;680&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; src=&quot;https://aminalawal.com/assets/hke14.DzyV2Qcg_Z1bEwly.webp&quot;&gt;&lt;/p&gt;
&lt;p&gt;HKE simplifies Kubernetes deployment and management while maintaining flexibility for customization. The marketplace feature particularly stands out, making application deployment a streamlined process.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy cluster creation and management&lt;/li&gt;
&lt;li&gt;Rich marketplace of applications&lt;/li&gt;
&lt;li&gt;Automated ingress configuration&lt;/li&gt;
&lt;li&gt;Flexibility to adapt to different infrastructure requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The platform’s ability to automatically handle complex tasks while providing comprehensive monitoring and optimization recommendations makes it a compelling choice for teams looking to streamline their Kubernetes operations.&lt;/p&gt;
&lt;p&gt;Get started &lt;a href=&quot;https://ui.hostspacecloud.com/&quot;&gt;here&lt;/a&gt; today!&lt;/p&gt;</content:encoded></item><item><title>Advanced Secrets Management for CI/CD Pipelines with Doppler and GitHub Actions</title><link>https://aminalawal.com/posts/-secretsmanagement/</link><guid isPermaLink="true">https://aminalawal.com/posts/-secretsmanagement/</guid><description>Doppler is a secrets management platform that helps teams securely store and manage their environment variables and other sensitive data.</description><pubDate>Tue, 16 Apr 2024 21:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In the dynamic field of software development, integrating effective tools is crucial for maintaining a secure and efficient workflow. Doppler is a secrets management platform that helps teams securely store and manage their environment variables and other sensitive data. GitHub Actions is a CI/CD solution that automates workflows to run tasks, such as testing and deploying code, directly from GitHub. Together, they provide a robust solution for automating deployments and managing secrets securely across multiple repositories. This integration not only simplifies the management of secrets but also enhances the security and consistency of your deployment processes.&lt;/p&gt;
&lt;h2 id=&quot;why-use-doppler-with-github-actions&quot;&gt;Why Use Doppler with GitHub Actions?&lt;/h2&gt;
&lt;p&gt;Doppler provides a seamless way to integrate secrets management into CI/CD processes, significantly enhancing the security and efficiency of these pipelines. By centralizing secret storage and tightly controlling their distribution, Doppler prevents the accidental exposure of sensitive data across development stages, from testing to production. This integration ensures that sensitive data, such as API keys and credentials, are managed securely and are only accessible to authorized systems and personnel.&lt;/p&gt;
&lt;h2 id=&quot;getting-started-with-doppler-and-github-actions&quot;&gt;Getting Started with Doppler and GitHub Actions&lt;/h2&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;Before you begin integrating Doppler with GitHub Actions, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A GitHub Account: You should have owner access to one or more repositories. &lt;a href=&quot;https://github.com/join&quot;&gt;Create a GitHub account&lt;/a&gt; if you don’t have one.&lt;/li&gt;
&lt;li&gt;A Doppler Account: Necessary for managing and syncing secrets across your projects. Sign up for Doppler.&lt;/li&gt;
&lt;li&gt;Familiarity with GitHub Actions: Basic understanding of how to configure and manage workflows. For a quick overview, refer to the &lt;a href=&quot;https://docs.github.com/en/actions&quot;&gt;GitHub Actions documentation&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;1-integrating-your-repositories-with-doppler&quot;&gt;1. Integrating Your Repositories with Doppler&lt;/h3&gt;
&lt;h4 id=&quot;step-1-doppler-setup&quot;&gt;Step 1: Doppler Setup&lt;/h4&gt;
&lt;p&gt;For each repository you wish to integrate, follow these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Log into your Doppler dashboard.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*CSmwQihNDTsIKKZXorar0g.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Project: This will be your central space for managing secrets. Set up a new project for each application or service you deploy using GitHub Actions. Organize your secrets within this project by environment (development, staging, production) to streamline access and enhance security.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select “Integrations” and choose GitHub as your integration service.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*yp0NlussfPAtZ8NWsYf-zw.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*yrhqFp4tTnvmxM-fbeYc3A.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Follow the prompts to authorize Doppler to access your GitHub repositories.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*9MRUmg22k-rgb5Gk2IBxLA.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose a repository to integrate and configure the secrets you want to sync.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2-configuring-github-actions-workflows&quot;&gt;2. Configuring GitHub Actions Workflows&lt;/h3&gt;
&lt;p&gt;For each repository, create or ensure a &lt;code&gt;.github/workflows&lt;/code&gt; directory exists at the root with a YAML file defining your CI/CD workflow. This file should specify the actions to be taken (e.g., build, test, deploy) and configure triggers for &lt;code&gt;repository_dispatch&lt;/code&gt; or &lt;code&gt;workflow_dispatch&lt;/code&gt; events, depending on your operational needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Repository Dispatch&lt;/strong&gt;: Triggers workflows on custom repository events.&lt;/p&gt;
&lt;p&gt;File: &lt;code&gt;repository_dispatch.yaml&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Dispatch Event for Doppler&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  repository_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    types&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;deploy_event&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  process_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Checkout code&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/checkout@v4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Run Custom Script&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        run&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          echo &quot;I worked!&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Workflow Dispatch&lt;/strong&gt;: Allows you to run workflows manually or via API calls.&lt;/p&gt;
&lt;p&gt;File: &lt;code&gt;workflow_dispatch.yaml&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Handle Dispatch Event for Doppler&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  workflow_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  process_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Checkout code&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/checkout@v4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Run Custom Script&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        run&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          echo &quot;I worked!&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;repository_dispatch&lt;/code&gt; is ideal for automated scenarios where external events (like a tool or service hook) trigger the workflow.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;workflow_dispatch&lt;/code&gt; provides flexibility to trigger workflows manually or programmatically, offering control when deployments are more sensitive or require timing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;3-setting-up-webhooks-in-doppler&quot;&gt;3. Setting Up Webhooks in Doppler&lt;/h3&gt;
&lt;p&gt;Doppler webhooks will trigger your GitHub Actions workflows upon changes to your secrets.&lt;/p&gt;
&lt;h4 id=&quot;creating-a-webhook-for-each-repository&quot;&gt;Creating a Webhook for Each Repository&lt;/h4&gt;
&lt;p&gt;In Doppler, navigate to the “Webhooks” section within your project’s settings.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*4hLB6tf1v9UDWuv3DgXuUg.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;configuration-steps&quot;&gt;Configuration Steps:&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;URL&lt;/strong&gt;: Set this to the GitHub Actions trigger endpoint.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For &lt;code&gt;repository_dispatch&lt;/code&gt;, use:
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://api.github.com/repos/OWNER/REPO_NAME/dispatches&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;For &lt;code&gt;workflow_dispatch&lt;/code&gt;, adjust the URL to target the specific workflow within the repository. Please note that the WORKFLOW_ID is the name of the workflow; e.g. main.yaml
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/dispatches&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;: Ensure each webhook is authenticated with a GitHub Personal Access Token (PAT) that has &lt;code&gt;repo workflow&lt;/code&gt; permissions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose “Bearer Token” for authentication.&lt;/li&gt;
&lt;li&gt;Input the PAT you generated.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;JSON Payload&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The payload varies based on the event type (&lt;code&gt;repository_dispatch&lt;/code&gt; or &lt;code&gt;workflow_dispatch&lt;/code&gt;) and the data your workflow expects.&lt;/li&gt;
&lt;li&gt;For repository_dispatch:
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;event_type&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;deploy_event&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;client_payload&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    &quot;unit&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    &quot;integration&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;For workflow_dispatch:
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;ref&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;develop&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Adjust the “ref”, and “event_type” as needed for your specific workflows. The “ref” is to reference the branch name the workflow is on&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;common-issues&quot;&gt;Common Issues:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Webhook Failures: Ensure the PAT has appropriate permissions.&lt;/li&gt;
&lt;li&gt;Workflow Errors: Verify YAML syntax and ensure all required secrets are correctly referenced in Doppler.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;4-testing-your-integration&quot;&gt;4. Testing Your Integration&lt;/h3&gt;
&lt;p&gt;After configuring webhooks in Doppler, test the integration by updating a secret in Doppler and verifying that it triggers the appropriate workflow in GitHub Actions. Check the “Actions” tab in your GitHub repository for execution details.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*b2Bct3CMuBUY81NYUHhN2g.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;p&gt;Actions triggered with both workflow &amp;#x26; repository triggers.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*dg_C8ZUydiZPtT44prrjGg.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Integrating Doppler with GitHub Actions across multiple repositories enhances your CI/CD pipelines by automating deployments and securing secrets. By following the steps outlined above, you can ensure consistent, secure, and efficient workflows across all your development projects.&lt;/p&gt;
&lt;p&gt;Remember to maintain security best practices by managing access permissions carefully and regularly reviewing your integration setup for any potential improvements.&lt;/p&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch&quot;&gt;Create a workflow dispatch event&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository_dispatch&quot;&gt;Create a repository dispatch event&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.doppler.com/docs/webhooks&quot;&gt;Creating Doppler Webhooks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.doppler.com/docs/github-actions&quot;&gt;Doppler GitHub Actions Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content:encoded></item><item><title>Deploying Actions Runner Controller for Cost-Efficient GitHub Actions</title><link>https://aminalawal.com/posts/actionsrunner/</link><guid isPermaLink="true">https://aminalawal.com/posts/actionsrunner/</guid><description>Actions Runner Controller (ARC) emerges as a solution to manage self-hosted runners on your Kubernetes cluster, offering cost savings, autoscaling capabilities, and seamless integration with GitOps practices.</description><pubDate>Sun, 21 Jan 2024 16:00:00 GMT</pubDate><content:encoded>&lt;p&gt;GitHub Actions is a powerful tool for automating workflows within your software development lifecycle. While GitHub offers hosted runners to execute these workflows, they can incur significant costs, especially for frequent or resource-intensive jobs. Actions Runner Controller (ARC) emerges as a solution to manage &lt;a href=&quot;http://differences%20between%20github-hosted%20and%20self-hosted%20runners/&quot;&gt;self-hosted runners&lt;/a&gt; on your Kubernetes cluster, offering cost savings, autoscaling capabilities, and seamless integration with GitOps practices.&lt;/p&gt;
&lt;h2 id=&quot;why-use-arc&quot;&gt;Why Use ARC?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cost-Effectiveness&lt;/strong&gt;: Self-hosted runners often cost less than hosted runners, especially for long-running or high-resource jobs. ARC allows you to leverage your existing infrastructure, potentially saving you money.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autoscaling&lt;/strong&gt;: ARC automatically scales runners up and down based on demand, ensuring efficient resource utilization and avoiding unnecessary costs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Increased Security&lt;/strong&gt;: GitHub self-hosted runners can be configured to run on your servers, which provides an extra layer of security compared to using shared runners. This helps to protect sensitive information and data in your workflows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Greater Control&lt;/strong&gt;: Self-hosted runners give you complete control over the resources and environment used for your workflows, which can help you optimize performance and ensure that your builds and deployments run smoothly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, we will show you how to set up GitHub’s ARC on Kubernetes using Helm, then create and run a workflow that uses runner scale sets. For more information about runner scale sets, see “Deploying runner scale sets with Actions Runner Controller.”&lt;/p&gt;
&lt;p&gt;If you are looking to secure your Actions Runner Controller (ARC) environment, get in touch with Hostspace.&lt;/p&gt;
&lt;h2 id=&quot;step-by-step-guide&quot;&gt;Step-by-Step Guide&lt;/h2&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Basic understanding of Kubernetes, Git, and GitHub Actions&lt;/li&gt;
&lt;li&gt;A Kubernetes cluster with ArgoCD installed&lt;/li&gt;
&lt;li&gt;Helm installed on your local machine&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;1-prepare-the-arc-charts-repository&quot;&gt;1. Prepare the ARC Charts Repository:&lt;/h3&gt;
&lt;h4 id=&quot;create-a-new-repository&quot;&gt;Create a New Repository&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;You need to create a dedicated repository to store the Helm charts for this specific deployment. You can create this repository on GitHub within your organization or on any other Git hosting platform you prefer.&lt;/li&gt;
&lt;li&gt;For clarity, let’s assume you call this new repository &lt;code&gt;gh-arc-scale-set-charts&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;clone-the-base-repository&quot;&gt;Clone the Base Repository&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Next, clone the &lt;a href=&quot;https://github.com/actions/actions-runner-controller/tree/master&quot;&gt;&lt;code&gt;actions/actions-runner-controller&lt;/code&gt;&lt;/a&gt; repository to your local machine. This repository contains the base files needed for deploying ARC. We only need the below folders.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Link to the gha-runner-scale-set-controller folder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://github.com/actions/actions-runner-controller/tree/master/charts/gha-runner-scale-set-controller&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;#Link to gha-runner-scale-set-controller folder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://github.com/actions/actions-runner-controller/tree/master/charts/gha-runner-scale-set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Now, you need to copy the contents of the cloned &lt;code&gt;actions-runner-controller&lt;/code&gt; directory into the local directory of your newly created &lt;code&gt;gh-arc-scale-set-charts&lt;/code&gt; repository.&lt;/li&gt;
&lt;li&gt;Finally, push the local gh-arc-scale-set-charts repository.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*CQyLOBhOGKgJJ1p0ZeI9Dg.png&quot; alt=&quot;Actions Runner&quot;&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2-create-argocd-applications&quot;&gt;2. Create ArgoCD Applications:&lt;/h3&gt;
&lt;p&gt;Once you’ve prepared your custom gh-arc-scale-set-charts repository, it’s time to tell ArgoCD how to deploy and manage your ARC components. This involves creating two ArgoCD applications, one for the gha-runner-scale-set-controller and one for the gha-runner-scale-set.&lt;/p&gt;
&lt;h4 id=&quot;recommended-approach-using-a-connected-git-repository&quot;&gt;Recommended Approach: Using a Connected Git Repository&lt;/h4&gt;
&lt;p&gt;Use the provided manifest files (&lt;code&gt;gha-runner-scale-set-controller.yaml&lt;/code&gt; and &lt;code&gt;gha-runner-scale-set.yaml&lt;/code&gt;), adjusting values as needed.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*M9KLxsbTAPaK1S6NqQ5Iow.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;create-the-gha-runner-scale-set-controller-application&quot;&gt;Create the gha-runner-scale-set-controller Application&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*9n5-OikL154BWN16QtHCtQ.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;name&lt;/strong&gt;: This defines the name of your ArgoCD application, in this case, &lt;code&gt;gha-runner-scale-set-controller&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/strong&gt;: This specifies the namespace where the application resources will be deployed. In this example, it’s &lt;code&gt;argocd&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;destination&lt;/code&gt;&lt;/strong&gt;: This defines the Kubernetes cluster and namespace where the resources will be deployed. Here, it points to the &lt;code&gt;arc-systems&lt;/code&gt; namespace in the default Kubernetes cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;project&lt;/code&gt;&lt;/strong&gt;: This defines the ArgoCD project the application belongs to. Usually, you’ll use the default project.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;source&lt;/code&gt;&lt;/strong&gt;: This section specifies the location of the manifest files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;repoURL&lt;/code&gt;&lt;/strong&gt;: Replace this with the URL of your gh-arc-scale-set-charts repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;targetRevision&lt;/code&gt;&lt;/strong&gt;: This specifies the Git revision to use. Typically, you’ll use &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;path&lt;/code&gt;&lt;/strong&gt;: This points to the specific directory within the repository containing the manifest files. In this case, it’s &lt;code&gt;./gha-runner-scale-set-controller&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;syncPolicy&lt;/code&gt;&lt;/strong&gt;: This defines how ArgoCD will manage the application’s state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;automated&lt;/code&gt;&lt;/strong&gt;: Enables automatic syncing with the Git repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;prune&lt;/code&gt;&lt;/strong&gt;: Removes resources that are no longer present in the repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;selfHeal&lt;/code&gt;&lt;/strong&gt;: Attempts to fix any discrepancies between the desired and actual state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;syncOptions&lt;/code&gt;&lt;/strong&gt;: Additional options for syncing. In this case, &lt;code&gt;CreateNamespace=true&lt;/code&gt; ensures the arc-systems namespace is created if it doesn’t exist.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;githubConfigUrl&lt;/code&gt;&lt;/strong&gt;: Specifies the URL of your GitHub repository, organization, or enterprise where the runners will operate. Example: &lt;code&gt;https://github.com/your-organization&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;githubConfigSecret&lt;/code&gt;&lt;/strong&gt;: References a Kubernetes secret containing credentials for authenticating with GitHub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To enable ARC to authenticate to GitHub, generate a personal access token (classic) or GitHub App. For more information, see &lt;a href=&quot;https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api#deploying-using-personal-access-token-classic-authentication&quot;&gt;Authenticating to the GitHub API&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;maxRunners&lt;/code&gt;&lt;/strong&gt;: Sets the maximum number of runners that can be scaled up in the cluster. Example: 5&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;minRunners&lt;/code&gt;&lt;/strong&gt;: Specifies the minimum number of runners that should always be available. Example: 1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;controllerServiceAccount&lt;/code&gt;&lt;/strong&gt;: Configures the service account used by the ARC controller to manage runners.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;namespace&lt;/code&gt;&lt;/strong&gt;: Identifies the namespace where the service account resides (usually &lt;code&gt;arc-systems&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;&lt;/strong&gt;: Specifies the name of the service account (usually &lt;code&gt;actions-runner-controller-gha-rs-controller&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Key Point:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Carefully adjust these values to match your specific environment and requirements.&lt;/li&gt;
&lt;li&gt;Ensure the &lt;code&gt;githubConfigSecret&lt;/code&gt; exists in your Kubernetes cluster with the appropriate credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;3-authentication-configuration&quot;&gt;3. Authentication Configuration:&lt;/h3&gt;
&lt;p&gt;In the &lt;code&gt;gha-runner-scale-set&lt;/code&gt; Helm values file, choose your authentication method:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PAT&lt;/strong&gt;: Use a personal access token (PAT) with appropriate permissions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHubConfigSecret&lt;/strong&gt;: Create a Kubernetes secret containing GitHub app credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;To enable ARC to authenticate to GitHub, generate a personal access token (classic) or GitHub App. For more information, see &lt;a href=&quot;https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api#deploying-using-personal-access-token-classic-authentication&quot;&gt;Authenticating to the GitHub API.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reference the secret in the githubConfigSecret field of the Helm values.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;5-deploy-the-applications&quot;&gt;5. Deploy the Applications:&lt;/h3&gt;
&lt;p&gt;If you’ve wisely connected your &lt;code&gt;gh-arc-scale-set-charts&lt;/code&gt; &amp;#x26; your manifests repository to ArgoCD, the deployment process is remarkably streamlined! ArgoCD will automatically detect changes in your repository and initiate syncs without requiring manual commands.&lt;/p&gt;
&lt;p&gt;Here’s a brief overview for those who haven’t connected their repository yet:&lt;/p&gt;
&lt;h4 id=&quot;manual-sync-if-not-using-gitops&quot;&gt;Manual Sync (If Not Using GitOps):&lt;/h4&gt;
&lt;p&gt;Use the following commands to manually trigger the initial sync:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;argocd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; app&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; sync&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; gha-runner-scale-set-controller&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;argocd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; app&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; sync&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; gha-runner-scale-set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;6-verify-deployment&quot;&gt;6. Verify Deployment:&lt;/h3&gt;
&lt;p&gt;Check if the ARC controller and runner pods are running in your cluster.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*o6hwwMfF0kwLQK8ja4fGNA.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*3xszgSPK9hY6Vsb_relMXw.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;7-actions-workflows-to-test-custom-runners&quot;&gt;7. Actions Workflows to Test Custom Runners:&lt;/h3&gt;
&lt;p&gt;Once you’ve successfully deployed your Actions Runner Controller (ARC) with custom runners using ArgoCD, it’s essential to verify that everything works as expected. This section guides you through creating a sample workflow to test your setup.&lt;/p&gt;
&lt;p&gt;Before that, let’s &lt;a href=&quot;https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner&quot;&gt;Check the status of our deployed self-hosted runner.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A self-hosted runner can be located in either your repository, organization, or enterprise account settings on GitHub. To manage a self-hosted runner, you must have the following permissions, depending on where the self-hosted runner was added:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;User repository&lt;/strong&gt;: You must be the repository owner.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Organization&lt;/strong&gt;: You must be an organization owner.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Organization repository&lt;/strong&gt;: You must be an organization owner, or have admin access to the repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;In your organization or repository, navigate to the main page and click Settings.&lt;/li&gt;
&lt;li&gt;In the left sidebar, click Actions, then click Runners.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;“Runners”&lt;/strong&gt;, you can view a list of registered runners, including the runner’s name, labels, and status.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The status can be one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Idle&lt;/strong&gt;: The runner is connected to GitHub and is ready to execute jobs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Active&lt;/strong&gt;: The runner is currently executing a job.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Offline&lt;/strong&gt;: The runner is not connected to GitHub. This could be because the machine is offline, the self-hosted runner application is not running on the machine, or the self-hosted runner application cannot communicate with GitHub.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*U4kwHU9Jzv16pRVWAV4Bjw.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;p&gt;Since our runner is online, let’s test it by creating a workflow to test our setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here’s the process:&lt;/strong&gt;&lt;/p&gt;
&lt;h5 id=&quot;access-your-workflow-file&quot;&gt;Access Your Workflow File:&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to the GitHub repository where you want to create the test workflow.&lt;/li&gt;
&lt;li&gt;Create a new file named &lt;code&gt;.github/workflows/test-custom-runners.yml&lt;/code&gt; (or any preferred name).&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;define-the-workflow&quot;&gt;Define the Workflow:&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*JHQlltnHNaRnyp57tGvIMw.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;monitor-the-workflow&quot;&gt;Monitor the Workflow:&lt;/h4&gt;
&lt;p&gt;The workflow will automatically execute on the specified runner.
You can track its progress and output in the “Actions” tab of your repository.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*Nhjv90YZ3jRdlG-QEaEIAA.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*OSomVOiOp7XHkC4Ec6mobg.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;tips-and-troubleshooting-for-deploying-actions-runner-controller-with-argocd&quot;&gt;Tips and Troubleshooting for Deploying Actions Runner Controller with ArgoCD&lt;/h4&gt;
&lt;h5 id=&quot;tips&quot;&gt;Tips:&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use Secrets for Credentials&lt;/strong&gt;: Store GitHub access tokens or App credentials in Kubernetes Secrets for enhanced security and easier management.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test and Validate your Manifests&lt;/strong&gt;: Ensure your manifests are correct before syncing them to your cluster. Consider using tools like Helm lint or Kustomize for validation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor ArgoCD and Kubernetes Logs&lt;/strong&gt;: Keep an eye on ArgoCD UI and Kubernetes logs for deployment progress and potential issues.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start Small and Scale Gradually&lt;/strong&gt;: Begin with a minimal runner scale set and gradually increase based on your workload demands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Utilize GitOps Best Practices&lt;/strong&gt;: Leverage the power of Git for version control, collaboration, and automated deployments.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;troubleshooting&quot;&gt;Troubleshooting:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Connection Errors&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Verify that ArgoCD can access your Kubernetes API server.&lt;/li&gt;
&lt;li&gt;Double-check the URL and namespace settings in your manifests.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource Creation Failures&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Ensure the required Kubernetes resources (namespaces, service accounts, etc.) exist.&lt;/li&gt;
&lt;li&gt;Check for permission errors related to the service account used by the controller.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ArgoCD Sync Failures&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Review the ArgoCD UI for detailed error messages.&lt;/li&gt;
&lt;li&gt;Consult the ArgoCD documentation for specific troubleshooting steps.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion:&lt;/h3&gt;
&lt;p&gt;ARC empowers you to take control of GitHub Actions runner costs and management while benefiting from autoscaling, declarative configuration, and GitOps integration. By following these steps and understanding the key concepts, you can successfully deploy ARC in your Kubernetes environment and optimize your GitHub Actions workflows.&lt;/p&gt;
&lt;p&gt;This doesn’t end here, there will be next steps after the successful deployment&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Creating custom images for actions-runner-controller:&lt;/strong&gt; Now that we have &lt;a href=&quot;https://github.com/actions/actions-runner-controller&quot;&gt;actions-runner-controller&lt;/a&gt; up and running, we need to think through the runner image some. You would want to install dependencies on the image eg Docker, Yarn, etc. — &lt;strong&gt;Article coming soon&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/actions/actions-runner-controller/releases&quot;&gt;Actions Runner Controller (ARC) Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller&quot;&gt;Actions Runner Controller (ARC) Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://argocdoperator.readthedocs.io/en/latest/reference/api.html/&quot;&gt;ArgoCD Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://helm.sh/docs/helm/&quot;&gt;Helm Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app&quot;&gt;GitHub App Authentication&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Triggering Workflows in Another Repository with GitHub Actions</title><link>https://aminalawal.com/posts/triggeringworkflows/</link><guid isPermaLink="true">https://aminalawal.com/posts/triggeringworkflows/</guid><description>GitHub Actions provides a powerful automation framework that allows you to orchestrate and automate various tasks within your repositories.</description><pubDate>Tue, 03 Oct 2023 12:00:00 GMT</pubDate><content:encoded>&lt;p&gt;GitHub Actions provides a powerful automation framework that allows you to orchestrate and automate various tasks within your repositories. One of its features is the ability to trigger workflows in one repository from another repository. This can be useful for managing cross-repository actions, such as updating dependencies or deploying services.&lt;/p&gt;
&lt;p&gt;In this guide, we will walk you through the steps to create a workflow in a source repository that triggers a workflow in a target repository.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before you begin, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Access to the source repository (the repository where you want to trigger the workflow).&lt;/li&gt;
&lt;li&gt;Access to the target repository (the repository where the triggered workflow will run).&lt;/li&gt;
&lt;li&gt;Basic knowledge of GitHub Actions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;step-1-configure-the-source-repository&quot;&gt;Step 1: Configure the Source Repository&lt;/h3&gt;
&lt;h4 id=&quot;11-set-up-the-trigger-workflow&quot;&gt;1.1. Set Up the Trigger Workflow&lt;/h4&gt;
&lt;p&gt;In the source repository (the repository that will trigger the workflow in the target repository), create a new GitHub Actions workflow file or use an existing one. This file should define the workflow responsible for triggering the target workflow.&lt;/p&gt;
&lt;p&gt;Example workflow file (&lt;code&gt;target_workflow.yml&lt;/code&gt;):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Trigger Target Workflow&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  workflow_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    inputs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;      target_service&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        description&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;Input a service name (e.g., demo-app)&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        required&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;      target_version&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        description&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;Input a version (e.g., v1.0.0)&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        required&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  trigger&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Trigger Workflow in Another Repository&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        run&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          # Set the required variables&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          repo_owner=&quot;REPOSITORY OWNER&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          repo_name=&quot;REPOSITORY NAME&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          event_type=&quot;trigger-workflow&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          service=&quot;${{ github.event.inputs.target_service }}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          version=&quot;${{ github.event.inputs.target_version }}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;          curl -L \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            -X POST \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            -H &quot;Accept: application/vnd.github+json&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            -H &quot;Authorization: Bearer ${{ secrets.PAT }}&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            -H &quot;X-GitHub-Api-Version: 2022-11-28&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            https://api.github.com/repos/$repo_owner/$repo_name/dispatches \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;            -d &quot;{\&quot;event_type\&quot;: \&quot;$event_type\&quot;, \&quot;client_payload\&quot;: {\&quot;service\&quot;: \&quot;$service\&quot;, \&quot;version\&quot;: \&quot;$version\&quot;}}&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we’ve defined a workflow named “Trigger Target Workflow” that allows you to manually trigger the target workflow in another repository. This workflow is responsible for triggering another workflow in a different repository (target repository) based on user input. It allows you to specify a service name and a version (e.g., demo-app and v1.0.0) and then triggers the target workflow in the specified repository.&lt;/p&gt;
&lt;h4 id=&quot;12-configure-the-trigger-logic&quot;&gt;1.2. Configure the Trigger Logic&lt;/h4&gt;
&lt;p&gt;Inside your source workflow, define the logic and inputs required to trigger the target workflow. The key part is setting the target_repository input to specify the target repository where the workflow should be triggered.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*peAjC5a5K76Lcsd0f6JH0Q.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;trigger-logic-and-inputs&quot;&gt;Trigger Logic and Inputs:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;on&lt;/strong&gt;: This workflow is triggered manually using the &lt;code&gt;workflow_dispatch&lt;/code&gt; event, which allows users to specify inputs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inputs&lt;/strong&gt;: Users are prompted to provide two inputs:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;target_service&lt;/code&gt;: The service name (e.g., demo-app) that identifies the target repository where the workflow should be triggered.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;target_version&lt;/code&gt;: The version (e.g., v1.0.0) that will be passed to the target workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Job: trigger&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;runs-on&lt;/strong&gt;: The job runs on an Ubuntu-based runner.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Steps&lt;/strong&gt;:
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Trigger Workflow in Another Repository&lt;/strong&gt;: This step performs the actual triggering of the target workflow in the specified repository.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;It sets the required variables:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;repo_owner&lt;/code&gt;: The owner or organization name of the target repository.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;repo_name&lt;/code&gt;: The name of the target repository.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;event_type&lt;/code&gt;: The event type that the target workflow listens for (e.g., trigger-workflow).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;service&lt;/code&gt;: The service name provided as an input.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;version&lt;/code&gt;: The version provided as an input.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;It uses the curl command to send a POST request to the GitHub API to trigger the workflow.&lt;/li&gt;
&lt;li&gt;The request includes necessary headers such as authorization, content type, and API version.&lt;/li&gt;
&lt;li&gt;It passes the event type and a client payload with the service name, version, and other optional flags.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: You should generate your own Personal Access Token (PAT) with the required permissions to enable you to trigger workflows in other repositories. You can refer to this &lt;a href=&quot;https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens&quot;&gt;guide&lt;/a&gt; for instructions on how to create a PAT.&lt;/p&gt;
&lt;h4 id=&quot;13-commit-and-push&quot;&gt;1.3. Commit and Push&lt;/h4&gt;
&lt;p&gt;Commit the changes to your source repository and push them to the main branch. This ensures that the source workflow is set up and ready to trigger the target workflow.&lt;/p&gt;
&lt;h3 id=&quot;step-2-configure-the-target-repository&quot;&gt;Step 2: Configure the Target Repository&lt;/h3&gt;
&lt;h4 id=&quot;21-set-up-the-target-workflow&quot;&gt;2.1. Set Up the Target Workflow&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;In the target repository (the one where you want to run the triggered workflow), create a new GitHub Actions workflow file or use an existing one. This file should define the workflow you want to run when triggered.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Example workflow file (&lt;code&gt;target_workflow.yml&lt;/code&gt;):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;My Target Workflow&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  repository_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    types&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;trigger-workflow&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  build&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Checkout code&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/checkout@v4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        with&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;          ref&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;${{ github.event.client_payload.sha }}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;      # Add your workflow steps here&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, the “My Target Workflow” workflow is designed to respond to a &lt;code&gt;repository_dispatch&lt;/code&gt; event with the &lt;code&gt;trigger-workflow&lt;/code&gt; type. When this event occurs, it initiates the workflow.&lt;/p&gt;
&lt;h4 id=&quot;22-configure-the-workflow-logic&quot;&gt;2.2. Configure the Workflow Logic&lt;/h4&gt;
&lt;p&gt;Inside your target workflow, define the logic and actions you want to perform when the workflow is triggered. This could include tasks like updating dependencies, deploying applications, or running tests.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*sJsCnHRAUDvaxxnTXEd31w.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Checkout code&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This step uses the &lt;code&gt;actions/checkout@v4&lt;/code&gt; action to check out the source code of the repository.&lt;/li&gt;
&lt;li&gt;Important customization is applied here by specifying the &lt;code&gt;ref&lt;/code&gt; parameter with the value &lt;code&gt;${{ github.event.client_payload.sha }}&lt;/code&gt;. This means that the workflow will check out the specific commit or branch referenced in the &lt;code&gt;sha&lt;/code&gt; field of the &lt;code&gt;client_payload&lt;/code&gt; object of the triggering event. This allows the workflow to operate on the exact code state associated with the triggering event.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Extract Service Name &amp;#x26; Version&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This step is responsible for extracting and displaying the service name and version values from the &lt;code&gt;client_payload&lt;/code&gt; object of the triggering event. These values were passed when the workflow was manually triggered and are stored in the payload for use in downstream steps.&lt;/li&gt;
&lt;li&gt;The extraction process involves the following actions:
&lt;ul&gt;
&lt;li&gt;Parsing the &lt;code&gt;service&lt;/code&gt; field from the &lt;code&gt;client_payload&lt;/code&gt; object and assigning it to the &lt;code&gt;service_name&lt;/code&gt; variable.&lt;/li&gt;
&lt;li&gt;Displaying the extracted service name using &lt;code&gt;echo&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Parsing the &lt;code&gt;version&lt;/code&gt; field from the &lt;code&gt;client_payload&lt;/code&gt; object and assigning it to the &lt;code&gt;version&lt;/code&gt; variable.&lt;/li&gt;
&lt;li&gt;Displaying the extracted version using &lt;code&gt;echo&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;23-commit-and-push&quot;&gt;2.3. Commit and Push&lt;/h3&gt;
&lt;p&gt;Commit the changes to your target repository and push them to the main branch. This ensures that the target workflow is set up and ready to be triggered.&lt;/p&gt;
&lt;h2 id=&quot;step-3-trigger-the-workflow&quot;&gt;Step 3: Trigger the Workflow&lt;/h2&gt;
&lt;p&gt;Now that both the source and target workflows are set up, you can trigger the target workflow in the target repository from the source repository.&lt;/p&gt;
&lt;h3 id=&quot;31-manual-trigger&quot;&gt;3.1. Manual Trigger&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;In the source repository, go to the “Actions” tab.&lt;/li&gt;
&lt;li&gt;Find and select the “Trigger Target Workflow” workflow.&lt;/li&gt;
&lt;li&gt;Click the “Run workflow” button.&lt;/li&gt;
&lt;li&gt;Provide the target_repository input with the name of the target repository (e.g., owner/repo).&lt;/li&gt;
&lt;li&gt;Click the “Run workflow” button to trigger the target workflow in the specified repository.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*_UV1NahIu7RWdxNQB2-foA.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*2m5urHSQ8gJBxPv0209mmw.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once this has successfully completed, it then triggers the other workflow and passes the inputs from the previous workflow to the current one.
&lt;img src=&quot;https://miro.medium.com/v2/resize:fit:1400/format:webp/1*-yr05xPPYONy1kuL0zaPbg.png&quot; alt=&quot;Doppler with GitHub Actions&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;32-automated-trigger-optional&quot;&gt;3.2. Automated Trigger (Optional)&lt;/h4&gt;
&lt;p&gt;You can also automate the trigger process by scheduling the source workflow or integrating it with other events such as code pushes or pull requests. This allows you to set up automatic workflows that trigger the target workflow based on specific conditions or schedules.&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;You’ve successfully configured a GitHub Actions workflow in one repository to trigger another workflow in a different repository. This powerful feature allows you to streamline automation and collaboration across multiple repositories, making it easier to manage complex workflows and tasks.&lt;/p&gt;
&lt;p&gt;With this knowledge, you can automate various processes and actions, improving your development and deployment workflows.&lt;/p&gt;
&lt;h2 id=&quot;references&quot;&gt;REFERENCES&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows&quot;&gt;Events that trigger workflows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#repository_dispatch&quot;&gt;GitHub App webhooks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.github.com/en/actions&quot;&gt;GitHub Actions documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item></channel></rss>