|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
| 5 | +VAGRANTFILE_API_VERSION = '2' |
| 6 | + |
| 7 | +Vagrant.require_version '>= 1.5.0' |
| 8 | + |
| 9 | +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
| 10 | + |
| 11 | + config.vm.synced_folder ".", "/vagrant", disabled: true, type: 'rsync' # if Vagrant::Util::Platform.windows? |
| 12 | + config.vm.box = ENV['LINUX_TEMPLATE_NAME'] |
| 13 | + |
| 14 | + config.vm.provider :cloudstack do |cloudstack, override| |
| 15 | + cloudstack.display_name = ENV['TEST_NAME'] |
| 16 | + |
| 17 | + cloudstack.host = ENV['CLOUDSTACK_HOST'] |
| 18 | + cloudstack.path = '/client/api' |
| 19 | + cloudstack.port = '8080' |
| 20 | + cloudstack.scheme = 'http' |
| 21 | + cloudstack.api_key = ENV['CLOUDSTACK_API_KEY'] |
| 22 | + cloudstack.secret_key = ENV['CLOUDSTACK_SECRET_KEY'] |
| 23 | + |
| 24 | + cloudstack.zone_name = ENV['ZONE_NAME'] |
| 25 | + cloudstack.network_name = ENV['NETWORK_NAME'] |
| 26 | + cloudstack.service_offering_name = ENV['SERVICE_OFFERING_NAME'] |
| 27 | + |
| 28 | + |
| 29 | + cloudstack.expunge_on_destroy = ENV['CS_EXPUNGE'] == "true" |
| 30 | + cloudstack.network_type = "Ignored" |
| 31 | + cloudstack.ssh_key = ENV['SSH_KEY'] unless ENV['SSH_KEY'].nil? |
| 32 | + cloudstack.ssh_user = ENV['SSH_USER'] unless ENV['SSH_USER'].nil? |
| 33 | + |
| 34 | + cloudstack.security_groups = [{ |
| 35 | + :name => "Awesome_security_group1", |
| 36 | + :description => "Created from the Vagrantfile", |
| 37 | + :rules => [{:type => "ingress", :protocol => "TCP", :startport => 23, :endport => 23, :cidrlist => "0.0.0.0/0"}] |
| 38 | + }, |
| 39 | + { |
| 40 | + :name => "Awesome_security_group2", |
| 41 | + :description => "Created from the Vagrantfile", |
| 42 | + :rules => [{:type => "ingress", :protocol => "TCP", :startport => 22, :endport => 22, :cidrlist => "0.0.0.0/0"}] |
| 43 | + }] |
| 44 | + end |
| 45 | +end |
0 commit comments