From f5b3ba63a516465e3e16e316d599fe6162974252 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 20 May 2013 00:32:34 -0400 Subject: [PATCH 1/3] Basic Vagrantfile --- Vagrantfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Vagrantfile diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..b93fedd --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,24 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant::Config.run do |config| + config.vm.box = "precise32" + config.vm.box_url = "http://files.vagrantup.com/precise32.box" + config.vm.network :hostonly, "192.168.76.76" + + # # group { "puppet": + # # ensure => "present", + # # } + # # + # # File { owner => 0, group => 0, mode => 0644 } + # # + # # file { '/etc/motd': + # # content => "Welcome to your Vagrant-built virtual machine! + # # Managed by Puppet.\n" + # # } + # + # config.vm.provision :puppet do |puppet| + # puppet.manifests_path = "manifests" + # puppet.manifest_file = "precise32.pp" + # end +end From 6ce5ace6f47cbebf31ccf96ed6ab5e305b9ca8e6 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 20 May 2013 02:25:07 -0400 Subject: [PATCH 2/3] Make sure we do not accidentally commit unnecessary vagrant stuff --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index eb3489a..d38ab79 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ # Ignore all logfiles and tempfiles. /log/*.log /tmp + +# ignore vagrant vm state file? +.vagrant From fb772f68bd346860f6728e3b55ae948ce3157910 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 20 May 2013 02:25:36 -0400 Subject: [PATCH 3/3] Setup puppet provisioning for vagrant vm --- Vagrantfile | 21 ++++------------ puppet/files/krb5.conf | 16 ++++++++++++ puppet/manifests/default.pp | 50 +++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 puppet/files/krb5.conf create mode 100644 puppet/manifests/default.pp diff --git a/Vagrantfile b/Vagrantfile index b93fedd..3cb56b2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,21 +4,10 @@ Vagrant::Config.run do |config| config.vm.box = "precise32" config.vm.box_url = "http://files.vagrantup.com/precise32.box" - config.vm.network :hostonly, "192.168.76.76" + config.vm.network :hostonly, "192.168.3.76" - # # group { "puppet": - # # ensure => "present", - # # } - # # - # # File { owner => 0, group => 0, mode => 0644 } - # # - # # file { '/etc/motd': - # # content => "Welcome to your Vagrant-built virtual machine! - # # Managed by Puppet.\n" - # # } - # - # config.vm.provision :puppet do |puppet| - # puppet.manifests_path = "manifests" - # puppet.manifest_file = "precise32.pp" - # end + config.vm.provision :puppet do |puppet| + puppet.manifests_path = "puppet/manifests" + puppet.manifest_file = "default.pp" + end end diff --git a/puppet/files/krb5.conf b/puppet/files/krb5.conf new file mode 100644 index 0000000..8cb6dc2 --- /dev/null +++ b/puppet/files/krb5.conf @@ -0,0 +1,16 @@ +[libdefaults] + default_realm = MSU.EDU + dns_lookup_realm = true + dns_lookup_kdc = true + verify_ap_req_nofail = false + +[realms] + MSU.EDU = { + admin_server = kerberos-dev.idm.msu.edu + kpasswd_server = kerberos-dev.idm.msu.edu + } + +[domain_realm] + .msu.edu = MSU.EDU + msu.edu = MSU.EDU + diff --git a/puppet/manifests/default.pp b/puppet/manifests/default.pp new file mode 100644 index 0000000..ebf6c21 --- /dev/null +++ b/puppet/manifests/default.pp @@ -0,0 +1,50 @@ +# Misc +exec { 'apt-get update': + command => '/usr/bin/apt-get update', +} + +package { 'build-essential': + ensure => installed, +} + +# Database +package { ['sqlite3', 'libsqlite3-dev']: + ensure => installed, +} + +# Ruby and Rails +package { 'ruby1.9.3': + ensure => installed, + require => Exec['apt-get update'], +} + +package { 'rails': + ensure => installed, + provider => 'gem', + require => Package['ruby1.9.3'], +} + +# Kerberos stuff +package { 'libkrb5-dev': + ensure => installed, +} + +package { 'timfel-krb5-auth': + ensure => installed, + provider => 'gem', + require => [Package['build-essential'],Package['libkrb5-dev']] +} + +file { 'krb5.conf': + ensure => present, + name => '/etc/krb5.conf', + source => '/vagrant/puppet/files/krb5.conf', + owner => 'root', + group => 'root', + mode => 0644, +} + +# git +package { 'git': + ensure => installed, +}