{"id":7004,"date":"2024-12-05T07:00:00","date_gmt":"2024-12-05T07:00:00","guid":{"rendered":"https:\/\/www.hostinger.com\/blog\/?p=7004"},"modified":"2024-12-19T12:02:08","modified_gmt":"2024-12-19T12:02:08","slug":"fireactions","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/blog\/fireactions","title":{"rendered":"Introducing Fireactions: Self-host your GitHub runners without a sweat"},"content":{"rendered":"<p>Scaling and boosting <strong>GitHub Actions<\/strong> runners is a must for those with high <strong>Continuous Integration \/ Continuous Deployment (CI\/CD)<\/strong> workloads. Self-hosting the runners is a great solution, but it&rsquo;s complex and time-consuming. This inspired us to create <strong>Fireactions<\/strong>, an open-source orchestrator for GitHub runners.<\/p><p>Fireactions allows you to Bring Your Own Metal (BYOM) and self-host GitHub runners in short-lived, fast, and secure <a href=\"https:\/\/firecracker-microvm.github.io\" target=\"_blank\" rel=\"noreferrer noopener\">Firecracker<\/a>-based virtual machines. It&rsquo;s ideal for organizations, freelancers, and hobbyists looking to <strong>reduce workflow queue times, minimize costs, and decrease maintenance overhead<\/strong>.<\/p><p>Find detailed instructions on how to install, configure, and use the application at <a href=\"http:\/\/fireactions.io\" target=\"_blank\" rel=\"noreferrer noopener\">Fireactions.io<\/a> or visit the <a href=\"https:\/\/github.com\/hostinger\/fireactions\" target=\"_blank\" rel=\"noreferrer noopener\">Fireactions repository<\/a> for the code, quickstart guide, and contribution opportunities.<\/p><h2 class=\"wp-block-heading\" id=\"h-the-problems-we-needed-to-solve\">The problems we needed to solve<\/h2><p>Like many software companies, we utilize a CI\/CD pipeline to streamline code integration, testing, and deployment.<\/p><p>We heavily rely on GitHub Actions to manage the process. However, with the rapid expansion of microservices and the growing number of repositories, our <strong>increased CI\/CD workload created stability and scalability challenges<\/strong>.<\/p><p>The immediate pain point was the lengthy delays due to queued jobs, slowing down our entire development and release process.<\/p><p>With plenty of bare metal on hand, we decided to run self-hosted GitHub runners on our own infrastructure. This way, we could <strong>optimize build times, enhance efficiency, and ensure a more reliable and scalable CI\/CD pipeline<\/strong> as we continue to grow.<\/p><p>There are several options to do this, such as <a href=\"https:\/\/github.com\/actions\/actions-runner-controller\" target=\"_blank\" rel=\"noreferrer noopener\">Actions Runner Controller<\/a>, but it requires Kubernetes and privileged containers, which add complexity, increase maintenance overhead, and pose potential security risks.<\/p><p>We needed a more flexible solution. We wanted the same level of control, reliability, and security as with GitHub-hosted runners but without their limitations, such as long startup times and limited resources.<\/p><h2 class=\"wp-block-heading\" id=\"h-what-fireactions-is-and-how-it-works\">What Fireactions is and how it works<\/h2><p>We chose <strong>Firecracker<\/strong>, an open-source <strong>virtual machine monitor (VMM)<\/strong>, to deploy workloads in <strong>micro virtual machines (microVMs)<\/strong>.<\/p><p>MicroVMs are ideal for running untrusted workloads, such as CI\/CD jobs. Unlike containers that share the host operating system, microVMs run their own lightweight kernel. This provides stronger isolation and security while maintaining speed and resource efficiency.<\/p><p>However, it takes time and effort to set up and maintain the GitHub runners. This is where <strong>Fireactions<\/strong> steps in. It&rsquo;s a <strong>completely free, open-source self-hosted CI\/CD solution that automates GitHub runners<\/strong>.<\/p><p>Here&rsquo;s how it works:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/public\" alt=\"How Fireactions work. \" class=\"wp-image-7005\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/w=1920,fit=scale-down 1920w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/4\/2024\/12\/Fireactions_architecture.png\/w=1536,fit=scale-down 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/figure><\/div><p>First, Fireactions <strong>loads the configuration file<\/strong> to determine the setup, and <strong>starts<\/strong> <strong>pools<\/strong> of runners. It continuously checks to ensure there are enough runners available.<\/p><p>For a new runner, Fireactions <strong>requests a token from GitHub<\/strong>, then quickly <strong>creates an isolated microVM<\/strong> using Firecracker. Once the job is complete, Fireactions <strong>destroys the microVM<\/strong>. Just like with GitHub-hosted runners, no state is preserved between jobs.<\/p><p>Fireactions automatically scales the number of runners based on incoming workflow events. You can define job labels and customize virtual machine resources to fit your needs.<\/p><p>You can run Fireactions on <strong>any regular bare metal server or a virtual machine that supports nested virtualization<\/strong> &ndash; virtual machines running within other virtual machines. For example, you can use <a href=\"https:\/\/support.hostinger.com\/en\/articles\/10278557-how-to-use-the-fireactions-vps-template\" target=\"_blank\" rel=\"noreferrer noopener\">Fireactions VPS template<\/a> to easily set up the application on Hostinger VPS hosting.<\/p><h2 class=\"wp-block-heading\" id=\"h-our-results\">Our results<\/h2><p>Fireactions has paid off in spades, and all the teams working with CI\/CD workflows have felt the impact.<\/p><p>To put things in perspective, we recorded <strong>835,186 minutes of build time<\/strong> on Fireactions over the past month alone. This figure includes all CI\/CD workflows, from simple tests to complex deployment pipelines.<\/p><p>Our initial and critical target was reducing job queue times by at least 90%. Instead, we&rsquo;ve <strong>reduced the queues to zero<\/strong>.<\/p><p>Depending on the configuration of the bare metal server and its resources, <strong>Fireactions builds can take up to 20x less time than GitHub-hosted runners<\/strong>, particularly for resource-intensive tasks.<\/p><p>The average <strong>GitHub runner startup time on Fireactions is 20 seconds<\/strong>. Meanwhile, creating and booting runners on traditional virtual machines typically takes a minute or more.<\/p><h2 class=\"wp-block-heading\" id=\"h-giving-back-to-the-community\">Giving back to the community<\/h2><p>At Hostinger, we use many open-source tools and want to give back to the community. Therefore, we developed Fireactions as an open source from the very beginning.<\/p><p>It took approximately three months for our core development team of two engineers to develop a robust solution while managing other responsibilities.<\/p><p>We moved all GitHub workflows to Fireactions and fixed issues in almost a year. This includes three major refactorings, enhancing performance, scalability, and maintainability based on the feedback and challenges encountered during the initial deployment and scaling phases.<\/p><p>We continue enhancing Fireactions based on user feedback. We also encourage and value all types of contributions to the project.<\/p><p>Fireactions is our second open-source project launched recently. We launched AI assistant <a href=\"https:\/\/www.hostinger.com\/blog\/kodee\" target=\"_blank\" rel=\"noreferrer noopener\">Kodee<\/a> in September, and shared an open-source <a href=\"https:\/\/github.com\/hostinger\/kodee-demo\" target=\"_blank\" rel=\"noreferrer noopener\">Kodee demo repository<\/a> with <a href=\"https:\/\/www.hostinger.com\/blog\/building-kodee#Our_journey_of_building_Kodee\" target=\"_blank\" rel=\"noreferrer noopener\">instructions how you can set up a similar system<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scaling and boosting GitHub Actions runners is a must for those with high Continuous Integration \/ Continuous Deployment (CI\/CD) workloads. Self-hosting the runners is a great sol\u2026<\/p>\n","protected":false},"author":482,"featured_media":7006,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[],"hashtags":[],"class_list":["post-7004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering"],"hreflangs":[],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/posts\/7004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/users\/482"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/comments?post=7004"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/posts\/7004\/revisions"}],"predecessor-version":[{"id":7106,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/posts\/7004\/revisions\/7106"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/media\/7006"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/media?parent=7004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/categories?post=7004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/tags?post=7004"},{"taxonomy":"hashtags","embeddable":true,"href":"https:\/\/www.hostinger.com\/blog\/wp-json\/wp\/v2\/hashtags?post=7004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}