Skip to content

Commit

Permalink
Merge pull request #2415 from jeff1evesque/feature-2414
Browse files Browse the repository at this point in the history
#2414: Adjust 'Vagrantfile' to correspond to #2349
  • Loading branch information
jeff1evesque committed Mar 17, 2016
2 parents 1ec88d6 + 6f49c38 commit e8d557a
Showing 1 changed file with 71 additions and 52 deletions.
123 changes: 71 additions & 52 deletions Vagrantfile
Expand Up @@ -11,7 +11,7 @@ Vagrant.configure(2) do |config|
# https://docs.vagrantup.com.

## Variables (ruby syntax)
required_plugins = %w(vagrant-r10k vagrant-vbguest vagrant-triggers)
required_plugins = %w(vagrant-r10k vagrant-vbguest vagrant-triggers vagrant-puppet-install)
plugin_installed = false

## Install Vagrant Plugins
Expand All @@ -35,90 +35,109 @@ Vagrant.configure(2) do |config|

## Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
## Update latest version of puppet
config.vm.provision :shell, :path => "puppet/environment/development/scripts/puppet_updater.sh"
config.vm.box = 'ubuntu/trusty64'

## Ensure puppet installed within guest
config.puppet_install.puppet_version = '4.3.2'

## Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 5000, host: 8080
config.vm.network "forwarded_port", guest: 443, host: 8585
config.vm.network 'forwarded_port', guest: 5000, host: 8080
config.vm.network 'forwarded_port', guest: 443, host: 8585

## Run r10k
config.r10k.puppet_dir = 'puppet/environment/development'
config.r10k.puppet_dir = 'puppet/environment/development'
config.r10k.puppetfile_path = 'puppet/environment/development/Puppetfile'

## Custom Manifest: install needed packages
#
# Note: future parser allow array iteration in the puppet manifest
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "install_packages.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.options = ["--parser", "future"]
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'install_packages.pp'
end

## Custom Manifest: build scikit-learn
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "install_sklearn.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'install_sklearn.pp'
end

## Custom Manifest: ensure vagrant-mounted event
#
# Note: future parser allow heredoc syntax in the puppet manifest (since puppet 3.5)
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "vagrant_mounted.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.options = ["--parser", "future"]
end

## Custom Manifest: install, and configure SQL database
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "setup_database.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
end
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'vagrant_mounted.pp'

## Custom Manifest: install redis client / server
#
# Note: future parser allow heredoc syntax in the puppet manifest (since puppet 3.5)
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "configure_redis.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'configure_redis.pp'
end

## Custom Manifest: start webserver
#
# Note: future parser allow heredoc syntax in the puppet manifest (since puppet 3.5)
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "start_webserver.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.options = ["--parser", "future"]
## Custom Manifest: configure webserver
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'configure_webserver.pp'
end

## Custom Manifest: configure system (i.e. system timezone)
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "configure_system.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
end
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'configure_system.pp'

## Custom Manifest: define webcompilers
#
# Note: future parser allow heredoc sytnax (since puppet 3.5), and allows array
# iteration in the puppet manifest.
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "puppet/environment/development/manifests"
puppet.manifest_file = "compile_asset.pp"
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.options = ["--parser", "future"]
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'compile_asset.pp'
end

## Custom Manifest: install, and configure SQL database
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'setup_database.pp'
end

## Custom Manifest: start webserver
#
# Note: future parser allow heredoc syntax in the puppet manifest (since puppet 3.5)
config.vm.provision 'puppet' do |puppet|
puppet.environment_path = 'puppet/environment'
puppet.environment = 'development'
puppet.manifests_path = 'puppet/environment/development/manifests'
puppet.module_path = ['puppet/environment/development/modules_contrib', 'puppet/environment/development/modules']
puppet.manifest_file = 'start_webserver.pp'
end

# clean up files on the host after 'vagrant destroy'
Expand Down

0 comments on commit e8d557a

Please sign in to comment.