GithubHelp home page GithubHelp logo

vmagent's Introduction

VMagent

Summary

Create a VM image to be a buildkite agent that can be run on multiple platforms, set up a corresponding VirtualBox machine and export it to be a Vagrant box.

Requirements

  • VirtualBox
  • Python 2.7 (Haven't tested on Python 3 yet)
  • Packer v1.0.4
  • Vagrant v1.9.3
  • Jinja2

Get started

Before running the program, you need to:

  • Generate a service account key for your Google API credentials and name it google_credential.json to put into credentials/ directory.
  • Have a buildkite-agent token to pass to the program

To see the usage of the program, you can type python vmagent.py -h in the terminal:

usage: vmagent.py [-h] --token TOKEN --vm_number VM_NUMBER [--name NAME]
                  [--memory MEMORY] [--cpus CPUS]

Setting up buildkite agents using Ubuntu Trusty virtual machines.

optional arguments:
  -h, --help            show this help message and exit
  --token TOKEN         Buildkite agent's token.
  --vm_number VM_NUMBER
                        Number of buildkite agents to set up.
  --name NAME           Name of the vagrant box.
  --memory MEMORY       Memory of each buildkite agent VM (in megabytes).
  --cpus CPUS           Number of cpus for each buildkite agent VM.

To run the program, please type:

python vmagent.py --token <buildkite_agent_token> --vm_number <number_of_vms_to_setup>

You can also add options such as memory and cpus to configure the memory and number of cpus used in the virtual machines.

After this command you will have a Vagrant box in the output/ folder, which is also already added to your Vagrant, and a Vagrantfile in the current directory. You can change the configurations in Vagrantfile and simply do vagrant up to run the virtual machines.

After you do vagrant up, the virtual machines will start running, and buildkite agents on these machines will be started as well.

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.