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
### Config for Vagrant using Puppet provisioning. Requires 0.9.5 or higher ### | |
# Configuration | |
hostname = "elmar-test-jero" | |
puppet_manifests = "~/Projects/Puppet/manifests/" | |
puppet_modules = "~/Projects/Puppet/modules/" | |
## ================================ | |
# Don't edit below unless you know what you're doing | |
## ================================ |
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
## Use template from module 'elmar' | |
class repo-nonfree { | |
file { "/etc/apt/sources.list.d/non-free.list": | |
ensure => present, | |
content => $operatingsystem ? { | |
"ubuntu" => template("elmar/apt/sources.list.d/ubuntu-partner.list.erb"), | |
"debian" => template("elmar/apt/sources.list.d/non-free.list.erb"), | |
default => template("elmar/apt/sources.list.d/non-free.list.erb"), | |
}, |
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
file { "/etc/apt/trusted.gpg.d/mozilla.gpg": | |
ensure => present, | |
source => $operatingsystem ? { | |
"ubuntu" => "puppet:///elmar/apt/trusted.gpg.d/mozilla_ubuntu.gpg", | |
"debian" => "puppet:///elmar/apt/trusted.gpg.d/mozilla_debian.gpg", | |
}, | |
notify => Exec["aptgetupdate"], | |
} |
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
namespace :deploy do | |
task :setup, :except => { :no_release => true } do | |
dirs = [deploy_to, releases_path, shared_path] | |
dirs += shared_children.map { |d| File.join(shared_path, d.split('/').last) } | |
run "mkdir -p #{dirs.join(' ')}" | |
run "chmod g+w #{dirs.join(' ')}" if fetch(:group_writable, true) | |
end | |
end |
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
### Elmar configuration file for Vagrant. Requires 0.9.5 or higher ### | |
## ================================ | |
# Don't edit below unless you know what you're doing | |
## ================================ | |
Vagrant::Config.run do |config| | |
config.vm.define :frontend do |frontend_config| | |
## Provisioning | |
frontend_config.vm.provision :puppet do |puppet| | |
puppet.module_path = "modules" |
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
require 'uuid' | |
module Vagrant | |
module Action | |
module VM | |
class Import | |
def initialize(app, env) | |
@app = app | |
end |
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
source :rubygems | |
gem 'rake', '0.8.7' | |
gem "retroactive_module_inclusion", "~> 1.2.5" |
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
namespace :deploy do | |
task :restart do | |
stop | |
sleep 1 | |
start | |
end | |
task :start do | |
targets = find_servers_for_task(current_task) |
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
load 'deploy/assets' |
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
set :deploy_to, "/usr/share/my-app" | |
namespace :play do | |
task :setup do | |
run "mkdir -p #{deploy_to}" | |
upload "my-app/start.sh", "#{deploy_to}/start.sh", :mode => '755', :via => :scp | |
upload "my-app/stop.sh", "#{deploy_to}/stop.sh", :mode => '755', :via => :scp | |
end | |
task :deploy do |
OlderNewer