GitHub Actions Poll Mode AutoScaler (GAPMAS)

Overview

GitHub Actions Poll Mode AutoScaler (GAPMAS)

What

GitHub Actions Poll Mode AutoScaler, or GAPMAS, is a simple tool that helps you run ephemeral GitHub Actions self-hosted runners on your own infrastructure.

Why

  • Simplicity

    Minimal infrastructure is required to use the tool, in its simplest form this could be managed from a crontab entry on any Linux machine.

  • Poll vs. Push

    The tool reaches out to the GitHub API to look for any queued jobs. The benefit of this approach is that you don't need any service exposed to the internet for this to work.

How

  1. Create GitHub Personal Access Token

    • Personal Access Tokens are associated with a GitHub Account.
    • The account itself needs Admin level permissions to the repository you want to manage runners for.
    • The personal access token requires the public_repo scope.
  2. Set up Environment variables

    Environment variables

    GH_ORG

    The GitHub organization the repository given in GH_REPO resides in.

    GH_REPO

    Name of the GitHub repository we operate on.

    GH_USER

    Username for authentication to the GitHub API.

    GH_TOKEN

    GitHub Personal Access Token.

    OS_KEY_NAME

    Name of OpenStack key pair to associate with the instances we create.

    OS_NETWORK_NAME

    Name of OpenStack network to attach to the instances we create.

    OS_TAG

    Tag to apply to instances. The tool will manage the life cycle of instances and uses this tag to know which instances to operate on.

    • OpenStack client environment
      • The OpenStack provider makes use of the standard OpenStack environment variables for authentication.
  3. Set up a job manager to run the tool periodically

    • When a change is proposed to a repository with workflows destined to self-hosted runners, GitHub will queue the job until a runner consumes it.
    • The tool makes use of this behavior to create new runners whenever there are jobs queued.
    • As such choose a cadence for the run which is in line with how long you would expect to wait before your jobs start.
  4. Create workflow in repository

    • Workflow jobs with 'self-hosted' as the first label in runs-on will be scheduled for self hosted runners.

    • Labels on the form 'distro-release' will be used as input for what type of image you want the job to run on. Example:

      name: Take out tests
      
      on:
        - push
        - pull_request
      
      jobs:
        hello:
          runs-on: [self-hosted, ubuntu-21.10]
          steps:
            - name: hello
              run: |
                echo "Hello, world!"
    • If an image matching the requested distro/release can not be found the tool will fall back to look for a Ubuntu 20.04 image.

Owner
Frode Nordahl
Frode Nordahl
Role Discord Members (by username) from File

Role Discord Members (by username) from File Bot Setup Navigate to https://discord.com/developers/applications Create a new application Navigate to th

Dylan Orrell 3 Jan 06, 2022
discord voice bot to stream radio

Radio-Id Bot (Discord Voice Bot) Radio-id-bot (Radio Indonesia) is a simple Discord Music Bot built with discord.py to play a radio from some Indonesi

Adi Fahmi 20 Sep 20, 2022
AWS EC2 S3 Automated With python

AWS_EC2_S3_Automated Description This programme is a Python3 script that utilizes Boto3 to automate the process of creating an AWS EC2 instance with a

niall_crowe 2 Nov 16, 2021
A modular Telegram Python bot running on python3 with a sqlalchemy, redislab, mongo database, telethon, and pyrogram.

Zeldris Robot A modular Telegram Python bot running on python3 with a sqlalchemy, redislab, mongo database, telethon, and pyrogram. How to set up/depl

IDNCoderX 42 Dec 21, 2022
Python client library for Bigcommerce API

Bigcommerce API Python Client Wrapper over the requests library for communicating with the Bigcommerce v2 API. Install with pip install bigcommerce or

BigCommerce 81 Dec 26, 2022
Music bot for playing music on telegram voice chat group.

Somali X Music 🎵 Music bot for playing music on telegram voice chat group. Requirements FFmpeg NodeJS nodesource.com Python 3.8+ or Higher PyTgCalls

Abdisamad Omar Mohamed 4 Dec 01, 2021
Unofficial YooMoney API python library

API Yoomoney - unofficial python library This is an unofficial YooMoney API python library. Summary Introduction Features Installation Quick start Acc

Aleksey Korshuk 136 Dec 30, 2022
Sail is a free CLI tool to deploy, manage and scale WordPress applications in the DigitalOcean cloud.

Deploy WordPress to DigitalOcean with Sail Sail is a free CLI tool to deploy, manage and scale WordPress applications in the DigitalOcean cloud. Conte

Konstantin Kovshenin 159 Dec 12, 2022
The Dolby.io Developer Days Getting Started with Media APIs Workshop repo.

Dolby.io Developer Days Media APIs Getting Started Application About this Workshop and Application This example is designed to get participants workin

Dolby.io Samples 2 Nov 03, 2022
A Telegram Bot Written In Python

TelegraphUploader A Telegram Bot Written In Python DEPLOY Local Machine Clone the repository Install requirements: pip3 install -r requirements.txt e

Wahyusaputra 2 Dec 29, 2021
A code that can make an account bump your discord server 24/7!

BumpCord A code that can make an account bump your discord server 24/7! The main.py is the main file. keep_alive.py prevents your repl from going to s

Phantom 28 Aug 20, 2022
Represents a Lavalink client used to manage nodes and connections.

lavaplayer Represents a Lavalink client used to manage nodes and connections. setup pip install lavaplayer setup lavalink you need to java 11* LTS or

HazemMeqdad 37 Nov 21, 2022
A Discord webhook spammer made in Python.

A Python made Discord webhook spammer usually used for token loggers to spam them/delete them original by cattyn I only made it so u can change the avatar to whatever u want instead of it being hardc

notperry1234567890 15 Dec 15, 2021
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by beautify.dhravya.dev

Poet this! Replies with a beautiful screenshot of the tweet, powered by poet.so Installation git clone https://github.com/dhravya/poet-this.git cd po

Dhravya Shah 30 Dec 04, 2022
1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能)

op-devops-api 1.本项目采用Python Flask框架开发提供(应用管理,实例管理,Ansible管理,LDAP管理等相关功能) 后端项目配套前端项目为:op-devops-ui jenkinsManager 一.插件python-jenkins bug修复 (1).插件版本 pyt

3 Nov 12, 2021
Minimal Python client for the Iris API, built on top of Authlib and httpx.

🕸️ Iris Python Client Minimal Python client for the Iris API, built on top of Authlib and httpx. Installation pip install dioptra-iris-client Usage f

Dioptra 1 Jan 28, 2022
A simple Python API wrapper for Cloudflare Stream's API.

python-cloudflare-stream A basic Python API wrapper for working with Cloudflare Stream. Arbington.com started off using Cloudflare Stream. We used the

Arbington 3 Sep 08, 2022
This is a very simple botnet with a CnC server, made by me. Feel free to change anything

This is a very simple botnet with a CnC server, made by me. Feel free to change anything

8 Nov 12, 2022