Skip to content
/ vgrepo Public

Utility for managing Vagrant repositories written in Python

License

Notifications You must be signed in to change notification settings

creitve/vgrepo

Repository files navigation

About

Build Status codebeat badge PyPI

vgrepo is a tool for managing Vagrant repositories written in Python.

Requirements

  • Python 2.6 or higher
  • clint 0.5.0 or higher
  • PyYAML 3.10 or higher

Installation

From PyPI

pip install vgrepo

From source

git clone [email protected]:gongled/vgrepo
python vgrepo/setup.py install

Configuration

Specify storage settings in the /etc/vgrepo.conf configuration file:

storage:

  path: "/srv/vagrant"

  url: "http://localhost:8080"

Run a NGINX with the following configuration of virtual host:

server {
    listen 8080;
    server_name localhost;

    root /srv/vagrant;

    location ~ ^/([^\/]+)/$ {
        index /metadata/$1.json;
        try_files /$1/metadata/$1.json =404;
    }

    location ~ \.json$ {
        add_header Content-Type application/json;
    }

    location ~ \.box$ {
        add_header Content-Type application/octet-stream;
    }

    location / {
	    autoindex off;
        expires -1;
    }
}

Well done. Now you can use http://localhost:8080/boxname in the config.vm.box_url parameter.

Usage

Usage: vgrepo [command] [options]

Commands

    add or a                     Add image into the Vagrant's repository
    list or l                    Show list of available images
    remove or r                  Remove image from the repository
    help or h                    Display current help message

Options

    -v, --version                Value of version of the box
    -n, --name                   Name of box in the repository
    -d, --desc                   Description of the box in the repository
    -p, --provider               Name of provider (e.g. virtualbox)

Examples

    vgrepo add image.box --name box --version 1.0.1
    vgrepo remove powerbox --version 1.1.0
    vgrepo list

License

MIT

About

Utility for managing Vagrant repositories written in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published