Skip to content

arunlab/vagrant-github-runners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Sure, here's a sample readme file for this code:

Vagrant Setup for GitLab and GitHub Runners

This repository contains a Vagrantfile that sets up a virtual machine (VM) for running GitLab and GitHub runners. The VM is configured using the libvirt and VirtualBox providers, and includes the necessary environment variables and scripts to run CI pipelines on GitLab and GitHub.

Prerequisites

Install Vagrant

To install Vagrant, please follow the steps below:

  1. Go to the Vagrant downloads page
  2. Click on the download link for your operating system.
  3. After downloading the installer, run it and follow the installation instructions.
  4. Once the installation is complete, open a terminal or command prompt and type vagrant to verify that Vagrant is installed correctly.

That's it! You now have Vagrant installed on your machine and can use it to create and manage virtual machines.

To use this repository, you need to have Vagrant installed on your local machine. You also need to install the vagrant-reload plugin by running the following command:

vagrant plugin install vagrant-reload

Usage

  1. Clone this repository and navigate to the project directory:

    git clone https://github.com/arunlab/vagrant-github-runners.git
    cd vagrant-github-runner
  2. Set the required environment variables by opening the Vagrantfile and updating the values of the following variables:

    export GITLABCI_NAME=my-gitlab-runner
    export GITLABCI_URL=https://gitlab-ci.local/
    export GITLABCI_TOKEN=changeme
    export GITLABCI_EXECUTOR=docker
    export GITLABCI_TAGS=''
  3. Start the VM by running the following command:

    cd 
    vagrant up
  4. Wait for Vagrant to provision the VM and install all necessary software.

  5. Once the VM is up and running, you can SSH into it by running:

    vagrant ssh
  6. You should now be able to run GitLab and GitHub runners inside the VM.

Configuration

The Vagrantfile includes several configuration options that you can modify to customize your VM setup. Some of the key settings are:

  • V_CPU: Number of CPU cores to allocate to the VM.
  • V_MEM: Amount of memory (in megabytes) to allocate per core.
  • SYNC_TYPE: Method used to sync files in the VM (e.g. 'rsync').
  • config.vm.provider: Configuration for each provider (libvirt or VirtualBox).
  • config.vm.provision: Provisioning scripts and commands to run inside the VM.

You can modify these settings to match your system requirements and desired setup.

Troubleshooting

If you encounter any issues when running this Vagrant setup, try the following troubleshooting steps:

  • Make sure you have installed Vagrant and the vagrant-reload plugin correctly.
  • Check that the environment variables in the Vagrantfile are set correctly.
  • Review the provisioning scripts to see if there are any errors or configuration issues.
  • Check the logs and error messages for more information on what went wrong.

License

This repository is licensed under the MIT License. Feel free to use and modify this code as needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published