Permalink
Browse files

Add support files.

  • Loading branch information...
1 parent 39c3eb6 commit ed66b4c80e1857ba7a5c677b3a1cc34af4fd89df @nanliu nanliu committed Jul 25, 2013
Showing with 129 additions and 0 deletions.
  1. +7 −0 .fixtures.yml
  2. +1 −0 .gitignore
  3. +28 −0 Gemfile
  4. +20 −0 Rakefile
  5. +73 −0 Vagrantfile
View
@@ -0,0 +1,7 @@
+fixtures:
+ repositories:
+ vmware_lib:
+ repo: 'git@github.com:nanliu/vmware-vmware_lib.git'
+ branch: 'upgrade'
+ symlinks:
+ 'vcsa': "#{source_dir}"
View
@@ -6,6 +6,7 @@ tests/data.pp
.bundle
.config
.bak
+Gemfile.lock
coverage
InstalledFiles
lib/bundler/man
View
@@ -0,0 +1,28 @@
+source 'https://rubygems.org'
+
+gem 'hashdiff'
+gem 'net-ssh'
+gem 'rbvmomi'
+
+group :development, :test do
+ gem 'rake'
+ gem 'rspec', "~> 2.11.0", :require => false
+ gem 'mocha', "~> 0.10.5", :require => false
+ gem 'puppetlabs_spec_helper', :require => false
+ gem 'rspec-puppet', :require => false
+ gem 'puppet-lint'
+end
+
+facterversion = ENV['GEM_FACTER_VERSION']
+if facterversion
+ gem 'facter', facterversion
+else
+ gem 'facter', :require => false
+end
+
+ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION']
+if puppetversion = ENV['GEM_PUPPET_VERSION']
+ gem 'puppet', puppetversion
+else
+ gem 'puppet', :require => false
+end
View
@@ -1,2 +1,22 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
+
+# Customize lint option
+task :lint do
+ PuppetLint.configuration.send("disable_80chars")
+ PuppetLint.configuration.send("disable_class_parameter_defaults")
+end
+
+# Initialize vagrant instance for testing
+task :vagrant do
+ Rake::Task["spec_prep"].execute
+ IO.popen('vagrant up --provider=vmware_fusion') do |io|
+ io.each{ |line| print line }
+ end
+end
+
+# Cleanup vagrant environment
+task :vagrant_clean do
+ `vagrant destroy`
+ Rake::Task["spec_clean"].execute
+end
View
@@ -0,0 +1,73 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure("2") do |config|
+ # All Vagrant configuration is done here. The most common configuration
+ # options are documented and commented below. For a complete reference,
+ # please see the online documentation at vagrantup.com.
+ config.vm.define :vcsa do |vcsa|
+ vcsa.vm.box = 'vcsa_51'
+ vcsa.vm.box_url = 'https://dl.dropbox.com/u/1075709/box/vcsa_51.box'
+ vcsa.ssh.username = 'root'
+
+ # TODO: This should disable shared folders.
+ vcsa.vm.synced_folder '.', '/vagrant', :id => 'vagrant-root', :disabled => true
+
+ vcsa.vm.provider :vmware_fusion do |v|
+ v.vmx['displayname'] = 'vCenter.lab'
+ end
+ end
+
+ config.vm.define :vshield do |vshield|
+ vshield.vm.box = 'vshield_51'
+ vshield.vm.box_url = 'https://dl.dropbox.com/u/1075709/box/vshield_51.box'
+ vshield.ssh.username = 'root'
+
+ # TODO: This should disable shared folders.
+ vshield.vm.synced_folder '.', '/vagrant', id: 'vagrant-root', disabled: true
+
+ vshield.vm.provider :vmware_fusion do |v|
+ v.vmx['displayname'] = 'vShield.lab'
+ end
+ end
+
+ # Currently does not support more than 1 due to generated address issue:
+ (1..4).each do |i|
+ config.vm.define "esx_#{i}" do |esx|
+ esx.vm.box = 'esx_51'
+ esx.vm.box_url = 'https://dl.dropbox.com/u/1075709/box/esx_51.box'
+ esx.ssh.username = 'root'
+
+ esx.vm.synced_folder '.', '/vagrant', :id => 'vagrant-root', :disabled => true
+
+ esx.vm.base_mac = '00:0c:29:60:83:07'
+ esx.vm.provider :vmware_fusion do |v|
+ v.vmx['displayName'] = "esx_#{i}.lab"
+ v.vmx['virtualHW.version'] = 9
+ v.vmx['ethernet0.virtualDev'] = 'e1000'
+ v.vmx['ethernet0.wakeOnPcktRcv'] = 'FALSE'
+ v.vmx['ethernet0.linkStatePropagation.enable'] = 'FALSE'
+ v.vmx['ethernet0.generatedAddress'] = '00:0c:29:60:83:07'
+ # Appears unecessary:
+ #v.vmx['ethernet0.vnet'] = 'vmnet2'
+ #v.vmx['ethernet0.bsdName'] = 'en0'
+ #v.vmx['ethernet0.displayName'] = 'Ethernet'
+ end
+ end
+ end
+
+ config.vm.define :management do |m|
+ m.vm.box = 'centos63'
+ m.vm.box_url = 'https://dl.dropbox.com/s/eqdrqnla4na8qax/centos63.box'
+
+ m.vm.provider :vmware_fusion do |v|
+ v.vmx['displayName'] = 'vAPI.lab'
+ end
+
+ m.vm.provision :puppet do |puppet|
+ puppet.manifests_path = 'manifests'
+ puppet.module_path = 'modules'
+ puppet.manifest_file = 'site.pp'
+ end
+ end
+end

0 comments on commit ed66b4c

Please sign in to comment.