Created
August 24, 2016 09:38
-
-
Save ioggstream/f7e3e280a686cf2028095f3fcf39733c to your computer and use it in GitHub Desktop.
DigitalOcean Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# | |
# Define machine specs | |
boxes = [ | |
{ :name => "e1" }, | |
{ :name => "e2" }, | |
] | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at | |
# https://docs.vagrantup.com. | |
# | |
# Provision my servers on digital_ocean using the given pk. | |
config.vm.box = "digital_ocean" | |
config.ssh.private_key_path = "~/.ssh/id_rsa_do" | |
# the path on the host to the actual folder. The second argument is | |
# the path on the guest to mount the folder. And the optional third | |
# argument is a set of non-required options. | |
# config.vm.synced_folder "../data", "/vagrant_data" | |
# Get the token from digitalocean web panel, then | |
# gather image, region and size names using: | |
# vagrant -list [images|regions|sizes] $TOKEN | |
config.vm.provider "digital_ocean" do |ocean| | |
ocean.token = "YOUR_TOKEN_HERE" | |
ocean.image = "centos-7-x64" | |
ocean.region = "fra1" | |
ocean.size = "512mb" | |
end | |
# Create multiple machines using the boxes definition. | |
boxes.each do |opts| | |
config.vm.define opts[:name] do |config| | |
config.vm.hostname = opts[:name] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment