GCP Classroom notes 08/Nov/2024

Github Actions

Runners

  • We need a place to execute the workflow (virtual or physical system)
  • At a highlevel, we have two choices
    • Github hosted runners
    • Self hosted runners

Github hosted Runners

  • These runners are provided by Github
  • Every Github hosted runner is created as a new virtual machine with choice of
    • Ubuntu Linux
    • Windows Servers
    • macos
  • When executing workflows on this runners a simple declaration suchss runs-on: ubuntu-latest
  • Refer Here for the available images as SBOM . Sample for ubuntu 24.04
  • Apart from existing softwares already installed we can add additonal softwares if required
jobs:
  update-env:
    runs-on: ubuntu-24.04
    steps:
      - name: Install packages
        run: |
          sudo apt update
          sudo apt install <package-name> -y

Self hosted Runners

  • A runner can be mapped at
    • Repository Level
    • Organization Level
    • Enterprise
  • Refer Here for official docs on self hosted runners

Autoscaling Self-Hosted Runners

  • If you have access to k8s cluster, you can setup self-hosted runner orchestration and scaling via Actions Runner Controllers (ARC).
  • ARC works as k8s operator to create scale sets
  • Scale sets are runners that are controlled by ARC and can have jobs assigned to them from GitHUb
  • Setting up Actions Runner Controller on K8s
  • for runners on aws Refer Here

Finding Github Actions from market place

Preview

Core Github Actions

  • actions/checkout
  • actions/setup-node
  • actions/setup-python
  • actions/setup-java
  • actions/setup-go
  • actions/cache
  • actions/upload-artifacts
  • actions/download-artifacts
  • actions/github-script

Create a workflow to build, test java application

  • Workflow syntax
  • Watch classroom recording
  • Exercise: Try publishing the test results for spring petclinic

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube