Skip to content

Instantly share code, notes, and snippets.

@wolstena
Last active August 29, 2015 14:01
Show Gist options
  • Save wolstena/d00449badeb5030fd53a to your computer and use it in GitHub Desktop.
Save wolstena/d00449badeb5030fd53a to your computer and use it in GitHub Desktop.
Smartos Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# Does not support multiple zones yet.
zones = [
{ :name => :node, :image => 'dc0688b2-c677-11e3-90ac-13373101c543', :memory => 1024, :ssh_port => 2221, :cpus => 1, :memory => 512, :disk_size => 5 },
{ :name => :redis, :image => 'dc0688b2-c677-11e3-90ac-13373101c543', :memory => 1024, :ssh_port => 2221, :cpus => 1, :memory => 512, :disk_size => 5 },
]
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
unless Vagrant.has_plugin?('vagrant-smartos-zones')
puts "vagrant-smartos-zones plugin is missing. Installing..."
%x(set -x; vagrant plugin install vagrant-smartos-zones)
puts "Now try again."
exit
end
config.vm.provider "virtualbox" do |v|
v.memory = 3072
end
# See https://vagrantcloud.com/livinginthepast for SmartOS boxes
config.vm.box = "wolstena/smartos"
config.vm.synced_folder ".", "/vagrant", disabled: true
#config.vm.network "private_network", ip: "192.168.50.4"
#config.vm.synced_folder ".", "/vagrant", type: "nfs"
#config.vm.synced_folder ".", "/zones/vagrant", type: "rsync"
# Requires vagrant plugin at https://github.com/sax/vagrant-smartos-zones
config.global_zone.platform_image = '20140321T062644Z'
config.zone.name = 'redis01'
config.zone.brand = 'joyent'
config.zone.image = 'dc0688b2-c677-11e3-90ac-13373101c543'
config.zone.memory = 1024
config.zone.disk_size = 5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment