Code Monkey home page Code Monkey logo

vagrancy's Introduction

Build Status

Private Vagrant box hosting

Vagrancy implments a self-hosted subset of Atlas, (formally Vagrant Cloud). It allows you to build images in Packer, pushlish them and then share the images with your co-workers via Vagrant, all on-premise.

Install

Vagrancy has all its dependencies packaged with it. It requires no runtime at all.

wget https://github.com/ryandoyle/vagrancy/releases/download/0.0.4/vagrancy-0.0.4-linux-x86_64.tar.gz
tar xvf vagrancy-0.0.4-linux-x86_64.tar.gz
cd vagrancy-0.0.4-linux-x86_64
./vagrancy

Upgrade

If you configured filestore_path in config.yml to a directory outside of the Vagrancy install, there's not much to do. Copy this file over from the old install and you're good to go:

wget https://github.com/ryandoyle/vagrancy/releases/download/0.0.4/vagrancy-0.0.4-linux-x86_64.tar.gz
tar xvf vagrancy-0.0.4-linux-x86_64.tar.gz
cp vagrancy-3-linux-x86_64/config.yml vagrancy-0.0.4-linux-x86_64/
cd vagrancy-0.0.4-linux-x86_64/
# Stop old instance of Vagrancy running before running the new one below
./vagrancy

If you did not rename config.sample.yml to config.yml and configure this file, Vagrancy would have stored your boxes in a data/ directory in the root of the untar-ed application. Move or copy this folder to the new install.

Publishing images

Via Packer

Add something like the following to your .json Packer file. For Packer versions <= 0.8.2, use server_address, not atlas_url.

  ...
  "post-processors": [                              
    {   
      "output": "box/{{.Provider}}/ubuntu1404-{{user `cm`}}{{user `cm_version`}}-{{user `version`}}.box",
      "type": "vagrant"
    },  
    {   
      "type": "atlas",
      "artifact": "myusername/ubuntu",
      "artifact_type": "vagrant.box",
      "atlas_url": "http://localhost:8099/",
      "metadata": {
        "provider": "virtualbox",
        "version": "1.0.0"
      }   
    }   
  ], 
  ...
Manually uploading

You can easily upload a box you have built locally using curl.

curl http://localhost:8099/myusername/ubuntu/1.0.0/virtualbox --upload-file ubuntu-precise.box

Using in Vagrant

Using Vagrancy requires a different Vagrant server URL. This can be set as an environment variable or as part of the Vagrantfile. Here is an example Vagrantfile with the server URL set.

ENV['VAGRANT_SERVER_URL'] = 'http://localhost:8099'
Vagrant.configure(2) do |config|
  config.vm.box = "myusername/ubuntu"
end

API

Operation Command
Deleting a box curl -XDELETE http://localhost:8099/myusername/ubuntu/1.0.0/virtualbox
Manually uploading a box curl http://localhost:8099/myusername/ubuntu/1.0.0/virtualbox --upload-file ubuntu-precise.box
Listing box versions curl http://localhost:8099/myusername/ubuntu
Deleting all box versions Each box must be specifically deleted

Security

Vagrancy is intending to be used in a trusted network and hence doesn't deal with authentication. As can be see in the above examples, reading, writing and modifying boxes is allowed without authentication.

vagrancy's People

Contributors

ryandoyle avatar scottatron avatar syntacticvexation avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

birdlex

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.