Giter Site home page Giter Site logo

vagrant-vultr's Introduction

vagrant-vultr Gem Version

Vagrant plugin that allows to use Vultr as provider.

For now, basic operations like vagrant up/halt/reload/destroy/provision are supported.

Installation

$ vagrant plugin install vagrant-vultr

Usage

Create simple Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.provider :vultr do |vultr, override|
    override.ssh.private_key_path = '~/.ssh/id_rsa'
    override.vm.box = 'vultr'
    override.vm.box_url = 'https://github.com/p0deje/vagrant-vultr/raw/master/box/vultr.box'

    vultr.token = 'YOUR_TOKEN'  # You can also use VULTR_TOKEN environment variable
    vultr.region = 'Seattle'
    vultr.plan = '768 MB RAM,15 GB SSD,1.00 TB BW'

    # Use either OS name or Snapshot identifier
    vultr.os = 'Ubuntu 14.04 x64'
    vultr.snapshot = '524557af2439b'

    # Optional parameters
    vultr.label    = 'My Label'
    vultr.tag      = 'My Tag'
    vultr.hostname = 'myhostname'
  end
end

Now start vagrant box:

$ vagrant up --provider=vultr

Notes

  1. You have to specify override.ssh.private_key_path. Public key will be uploaded to Vultr as "vagrant" SSH key and will be used when servers are created.
  2. Currently, servers are created with "root" user.
  3. If you hit API rate limit, you can set VULTR_RATE_LIMIT_INTERVAL_MS environment variable to introduce delay between API requests.

Testing

First of all, add the box that is used for testing:

$ bundle exec rake box:add

Since the tests involve actual calls to Vultr, you have to provide a valid API token:

$ export VULTR_TOKEN="token"

Now you can run tests:

$ bundle exec rake cucumber

Note that Vultr is not very stable, so tests sometimes may fail due to timeout or 404 API requests.

In the end, remove the box:

$ bundle exec rake box:remove

Contributing

  • Fork the project.
  • Make your feature addition or bug fix.
  • Commit, do not mess with Rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull.
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2015 Alex Rodionov. See LICENSE.md for details.

vagrant-vultr's People

Contributors

artemave avatar chanlvh avatar nopdotcom avatar p0deje avatar pastcompute avatar triacta-aa avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

toyg

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.