digital ocean - Setting up a vagrant with a digitalocean image -


i dont know if should posted here or on stack community please let me know if wrong posting here.

how local (i.e. on laptop) vm identical droplet (ubuntu 14.04 - lamp etc) running?

does provide provisioner vagrant can replicate setup of droplet?

it's handy being able develop on machine, instead of on droplet in cloud.

it should possible, never tried myself (as switch ec2) saw there digital ocean plugin, can refer following page https://www.digitalocean.com/community/tutorials/how-to-use-digitalocean-as-your-provider-in-vagrant-on-an-ubuntu-12-10-vps

basically need following:

  1. install plugin , download base box

    vagrant plugin install vagrant-digitalocean vagrant box add digital_ocean https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box 
  2. create ssh keys needed authentication digitalocean. run following command generate ssh key pair:

    ssh-keygen -t rsa 

    you can accept defaults pressing enter. place ssh private , public keys path specify below in vagrantfile configuration.

  3. create vagrantfile following minimal configuration

    config.vm.box = "digital_ocean" config.ssh.private_key_path = "~/.ssh/id_rsa" config.vm.provider :digital_ocean |provider|     provider.client_id = "your client id"     provider.api_key = "your api key"     provider.image = "ubuntu 12.10 x64"     provider.region = "new york 2"   end 
  4. run vagrant

    vagrant --provider=digital_ocean 

you can refer above link additional parameters , fix issues face


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -