GithubHelp home page GithubHelp logo

azure-gitlab-runner's Introduction

azure-gitlab-runner

This repo contains example config for the Gitlab Autoscaler base on Azure VM Scale Sets.
All Azure resources are created with terraform and the image is created with packer.

This is just an example, not designed for production use or to be free of mistakes! You have to adjust the example to your own needs, like passwords, Azure IDs, SSH keys etc.

Manual steps are listed below.

Used tools

  • terraform
  • packer

Required Azure Resources

  • Azure VM (always running)
  • Custom Azure VM Image
  • Azure VM Scale Set
  • Azure compute Gallery
  • VM image version
  • User Managed Identity

How to setup:

  1. Go into terraform folder and do terraform init
  2. Then do terraform apply -target=azurerm_resource_group.prod-gitlab
  3. Go into packer folder and packer build gitlab-runner.json
  4. Go back into terraform folder then do terraform plan and terraform apply
  5. Install fleeting plugin on static runner (vm-prod-gitlab-runner)
    • wget https://gitlab.com/gitlab-org/fleeting/plugins/azure/-/releases/v0.3.0/downloads/fleeting-plugin-azure-linux-amd64
    • mv fleeting-plugin-azure-linux-amd64 fleeting-plugin-azure
    • mv fleeting-plugin-azure /usr/bin/
    • chmod +x /usr/bin/fleeting-plugin-azure
  6. Add runner config Gitlab Runner config to /etc/gitlab-runner/config.toml of the static runner

Resources for information

https://docs.gitlab.com/runner/executors/docker_autoscaler.html#example-azure-scale-set-for-1-job-per-instance
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29223
https://gitlab.com/gitlab-org/fleeting/plugins/azure/-/tree/main?ref_type=heads

https://docs.gitlab.com/ee/ci/pipelines/cicd_minutes.html#gitlab-hosted-runner-costs
https://azure.microsoft.com/de-de/pricing/details/virtual-machines/linux/#pricing

azure-gitlab-runner's People

Contributors

scifire avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.