Skip to content
Snippets Groups Projects
Commit 2d61fd4d authored by Vasco Grossmann's avatar Vasco Grossmann
Browse files

BabsiWeb development environment: Vagrant and Salt files

parent aab6686c
No related branches found
No related tags found
No related merge requests found
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) 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.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024", "--cpus", "2", "--name", "BabsiWeb Development"]
end
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# 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: 8080, host: 8080
config.vm.synced_folder "salt/roots/", "/srv/salt/"
config.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
salt.run_highstate = true
end
end
file_client: local
grails 2.2.4 installation:
cmd.run:
- name: |
wget http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.2.4.zip -O tmp.zip
unzip tmp.zip
rm tmp.zip
- cwd: /opt
- require:
- pkg: unzip
- pkg: wget
- unless: test -d /opt/grails-2.2.4
/etc/profile.d/grails.sh:
file.touch
set_grails_path:
file.append:
- name: /etc/profile.d/grails.sh
- text: export PATH=$PATH:/opt/grails-2.2.4/bin
- onlyif: test /etc/profile.d/grails.sh
wget:
pkg.installed
unzip:
pkg.installed
openjdk-7-jdk:
pkg.installed
/etc/profile.d/java.sh:
file.touch
set_java_home:
file.append:
- name: /etc/profile.d/java.sh
- text: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
- onlyif: test /etc/profile.d/java.sh
base:
'*':
- java
- grails
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment