Skip to main content

vagrant-metadata

Creates and updates Vagrant box metadata files (metadata.json)

Build Status License


An utility program which creates and updates Vagrant box metadata files. This program is meant for small-scale deployment and versioning of Vagrant base boxes to private servers. For large scale deployment it always better to just use Atlas.

Usage

Installation

This program requires Python 2.7 and can be installed via PIP:

pip install vagrant-metadata

Publishing Your First Box

Now, let's suppose you have a base box called precise64 in two flavors: one for Virtualbox and the other for VMWare. vagrant-metadata follows the "convention over configuration" principle and it expects a certain directory layout to do its magic. Let's start by creating the required directory structure:

mkdir -p precise64/1.0.0/virtualbox
mkdir -p precise64/1.0.0/vmware_desktop

At this point you should have a directory tree like this:

.
└── precise64
    └── 1.0.0
        ├── virtualbox
        └── vmware_desktop

Now you should copy your boxes to their appropriate directory and end up with something like this:

.
└── precise64
    └── 1.0.0
        ├── virtualbox
        │   └── precise64.box
        └── vmware_desktop
            └── precise64.box

Now let's go into the precise64 directory:

cd precise64

Since this is the first time we run vagrant-metadata we'll have to tell it something about the base box such as its URL, name and description:

vagrant-metadata --name="lvillani/precise64" --description="Ubuntu 12.04 64-bit" \
    --baseurl="http://lorenzo.villani.me/vagrant/precise64"

After a while, when vagrant-metadata exits, you will find a fresh metadata.json file which contains all the box metadata. At this point you can publish the whole precise64 directory somewhere.

Updating a Box

Updating a box is easier than preparing a new one for publication. Let's suppose we want to publish version 2.0.0 of the precise64 box described before: create a new 2.0.0 directory with the same layout as before and copy your boxes there ending up with something like:

.
└── precise64
    ├── 1.0.0
    │   ├── virtualbox
    │   │   └── precise64.box
    │   └── vmware_desktop
    │       └── precise64.box
    ├── 2.0.0
    │   ├── virtualbox
    │   │   └── precise64.box
    │   └── vmware_desktop
    │       └── precise64.box
    └── metadata.json

At this point go to the precise64 directory and run vagrant-metadata:

cd precise64
vagrant-metadata

Notice that we don't even have to specify the box name, description or base URL.

Sync this directory with your remote server and you are done.

If you don't have all box files downloaded locally, and want to add new version to existing metadata.json simply add --append (-a) option to only add new version box to existing metadata

Release files for vagrant-metadata 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vagrant-metadata 1.1.2
File Size Uploaded
vagrant-metadata-1.1.2.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vagrant-metadata 1.1.2
File Interpreter ABI Platform
vagrant_metadata-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / vagrant-metadata-1.1.2.tar.gz

Download URL vagrant-metadata-1.1.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e14f90cf813480a460c982bb2ab489b2452b88934f69938f4d4afbd45089fafe
BLAKE2b-256 checksum
How to use checksums
eabe2b266b9074a9b2492a4f1e7c9c49fab18d2a66aa84721fe3ad51f104188e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / vagrant_metadata-1.1.2-py3-none-any.whl

Download URL vagrant_metadata-1.1.2-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e68ae2f99179a309510b1989c5d725425236e565ccc961ec8aa7a677408c7ab
BLAKE2b-256 checksum
How to use checksums
b0d5370a2c488fd49e8c9a60f038ea253855ab69e8fbf8596387dd1a5a9b0208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page