Coder Social home page Coder Social logo

gitlab_runner's Introduction

Gitlab Runner with Podman

Ansible Galaxy

A playbook for installing and running a Gitlab Runner instance using Podman using a normal user. The container still needs to run privileged.

Supports Fedora 33, Debian 12.

Installation

From Ansible Galaxy

$ ansible-galaxy collection install zedr.gitlab_runner

From source

Build the collection:

$ ansible-galaxy collection build -vvv -f --output-path ./build

Install the collection:

$ ansible-galaxy collection install -vvv build/*.tar.gz

Usage

Example playbook:

- hosts: all
  collections:
    - zedr.gitlab_runner
  roles:
    - role: gitlab_runner

See the role documentation for additional configuration.

Molecule test dependencies

OS:

  • libvirt-devel

Running the Molecule tests

Start the test suite by creating the VM and converging using the role:

$ make converge

Verify that the test suite passes:

$ make verify

Destroy the VM:

$ make destroy

Test with a local image to speed up things

$ CLOUD_IMAGE_URL=file:///home/zedr/Archive/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 \
make converge

Test by signing into and using a custom registry

$ EXTRA_VARS="custom_runner_image=quay.io/myrepo/gitlab-runner:latest \
              custom_registry_host=quay.io \
              custom_registry_username=my_quay_user \
              custom_registry_password=my_quay_pass" \
MOLECULE_SCENARIO="registry_auth" \
make converge

Vagrant test VM

Use with:

$ vagrant up

Issues

"UNREACHABLE (...) Failed to connect to the host via ssh"

Destroy the VM with make destroy and retry.

"Failed to download metadata" when creating the VM

A sporadic issue causing the error message Failed to download metadata for repo 'fedora-modular': Cannot prepare internal mirrorlist: Status code: 503 seems to be unrelated to the role and its tests. Try launching the tests again.

$ systemctl --user status gives an error

Running systemd ctl commands as an unprivileged user might yield an error Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

Try defining the env var XDG_RUNTIME_DIR, e.g. XDG_RUNTIME_DIR=/run/user/$UID systemctl --user status

gitlab_runner's People

Contributors

zedr avatar rigeldiscala avatar okin avatar demostenes777 avatar

Stargazers

Tracy Phillips avatar Travis Whitehead avatar  avatar  avatar cesare placanica avatar Ján Bočínec avatar  avatar Bruno Azuara avatar

Watchers

 avatar  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.