Created
June 7, 2016 14:20
-
-
Save leogsilva/2fbd115491b816228b29d3ecb8f27f49 to your computer and use it in GitHub Desktop.
Vagrant file for bosh-lite and bare metal installation
This file contains hidden or 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
| abort("No SERVER_IP specified, cannot continue") unless ENV["SERVER_IP"] | |
| abort("No SSH_KEY specified, cannot continue") unless ENV["SSH_KEY"] | |
| Vagrant.configure('2') do |config| | |
| config.vm.box = 'cloudfoundry/bosh-lite' | |
| config.vm.provider :virtualbox do |v, override| | |
| override.vm.box_version = '9000.126.0' # ci:replace | |
| # To use a different IP address for the bosh-lite director, uncomment this line: | |
| # override.vm.network :private_network, ip: '192.168.59.4', id: :local | |
| end | |
| config.vm.provider :aws do |v, override| | |
| override.vm.box_version = '9000.126.0' # ci:replace | |
| # To turn off public IP echoing, uncomment this line: | |
| # override.vm.provision :shell, id: "public_ip", run: "always", inline: "/bin/true" | |
| # To turn off CF port forwarding, uncomment this line: | |
| # override.vm.provision :shell, id: "port_forwarding", run: "always", inline: "/bin/true" | |
| # Following minimal config is for Vagrant 1.7 since it loads this file before downloading the box. | |
| # (Must not fail due to missing ENV variables because this file is loaded for all providers) | |
| v.access_key_id = ENV['BOSH_AWS_ACCESS_KEY_ID'] || '' | |
| v.secret_access_key = ENV['BOSH_AWS_SECRET_ACCESS_KEY'] || '' | |
| v.ami = '' | |
| end | |
| config.vm.provider :vmware_fusion do |v, override| | |
| override.vm.box = 'cloudfoundry/no-support-for-bosh-lite-on-fusion' | |
| #we no longer build current boxes for vmware_fusion | |
| #ensure that this fails. otherwise the user gets an old box | |
| end | |
| config.vm.provider :vmware_workstation do |v, override| | |
| override.vm.box = 'cloudfoundry/no-support-for-bosh-lite-on-workstation' | |
| #we no longer build current boxes for vmware_workstation | |
| #ensure that this fails. otherwise the user gets an old box | |
| end | |
| config.vm.provider :managed do |managed, override| | |
| managed.server = ENV["SERVER_IP"] | |
| override.vm.box = "tknerr/managed-server-dummy" | |
| override.ssh.username = "vcap" | |
| override.ssh.private_key_path = ENV["SSH_KEY"] | |
| end | |
| config.vm.provision "bosh" do |c| | |
| bosh_version = 256.2 | |
| warden_cpi_version = 29 | |
| garden_version = '0.337.0' | |
| releases = [{'name' => 'bosh','version' => bosh_version, | |
| 'url' => "http://bosh.io/d/github.com/cloudfoundry/bosh?v=#{bosh_version}"}, | |
| {'name' => 'bosh-warden-cpi', 'version' => warden_cpi_version, | |
| 'url' => "http://bosh.io/d/github.com/cppforlife/bosh-warden-cpi-release?v=#{warden_cpi_version}"}, | |
| {'name' => 'garden-linux', 'version' => garden_version, | |
| 'url' => "http://bosh.io/d/github.com/cloudfoundry-incubator/garden-linux-release?v=#{garden_version}"}] | |
| manifest = YAML.load_file('packer/templates/bosh_lite_manifest_template.yml') | |
| manifest['releases'] = releases | |
| c.manifest = manifest.to_yaml | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment