Question

How to install/setup vagrant

Hi, greetings to all

Can anyone please tell me how to install/setup vagrant on droplet or just tell me how to enable AMD-v virtualization for ubuntu linux

Thanks Ankit


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 23, 2022

Hi there,

You should take a look at the Vagrant DigitalOcean plugin. It allows you to deploy directly to a DigitalOcean Droplet using Vagrant. Though you’ll need to make changes to the provider section of that Vagrantfile.

This will allow you to do the following:

  • Create and destroy Droplets
  • Power on and off Droplets
  • Rebuild a Droplet
  • Provision a Droplet with shell
  • Setup a SSH public key for authentication
  • Create a new user account during Droplet creation

Here’s an example provider configuration for deploying to DO:

  config.vm.provider :digital_ocean do |provider, override|
    override.ssh.private_key_path = '~/.ssh/id_rsa'
    override.vm.box = 'digital_ocean'
    override.vm.box_url = "https://github.com/devopsgroup-io/vagrant-digitalocean/raw/master/box/digital_ocean.box"

    provider.token = 'YOUR TOKEN'
    provider.image = 'ubuntu-14-04-x64'
    provider.region = 'nyc2'
    provider.size = '512mb'
  end

That way you don’t have to set up Vagrant itself on your Droplets directly, but instead use your local Vagrant installation to manage your infrastructure.

Let me know if you have any questions.

Best,

Bobby