This commit is contained in:
Matthew Scragg 2013-09-25 15:27:25 -05:00
commit 7b39666270
10 changed files with 136 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.vagrant
.idea
*.pyc

15
Vagrantfile vendored Normal file
View file

@ -0,0 +1,15 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.synced_folder "srv/", "/srv/"
config.vm.provision :salt do |salt|
salt.minion_config = "srv/minion"
salt.run_highstate = true
end
end
Vagrant::Config.run do |config|
config.vm.forward_port 80, 8000
config.vm.forward_port 10001, 10001
end

2
srv/minion Normal file
View file

@ -0,0 +1,2 @@
master: localhost
file_client: local

19
srv/salt/common/init.sls Normal file
View file

@ -0,0 +1,19 @@
common-pkgs:
pkg.installed:
- pkgs:
- python
- vim
- build-essential
- screen
- htop
- git
- ntp
- libpcre3-dev
- libevent-dev
- iptraf
- python-software-properties
- python-pip
- python-virtualenv
- python-dev
- pkg-config
- curl

20
srv/salt/gollum/init.sls Normal file
View file

@ -0,0 +1,20 @@
ruby-repos:
pkgrepo.managed:
- ppa: brightbox/ruby-ng-experimental
ruby1.9.3:
pkg.installed:
- require:
- pkgrepo.managed: ruby-repos
asciidoc:
pkg.installed
{% for gem in ['gollum', 'creole', 'redcarpet', 'github-markdown', 'org-ruby', 'RedCloth', 'wikicloth'] %}
{{ gem }}-gem:
gem:
- installed
- name: {{ gem }}
- require:
- pkg.installed: ruby1.9.3
{% endfor %}

15
srv/salt/redis/init.sls Normal file
View file

@ -0,0 +1,15 @@
redis-repos:
pkgrepo.managed:
- ppa: chris-lea/python-redis
- ppa: brianmercer/redis
redis-server:
pkg:
- installed
service:
- running
- enable: True
- reload: True
- require:
- pkg: redis-server
- pkgrepo.managed: redis-repos

View file

@ -0,0 +1,28 @@
rethink-repo:
pkgrepo.managed:
- ppa: rethinkdb/ppa
rethinkdb:
pkg:
- installed
service:
- running
- enable: True
- reload: True
- require:
- pkg: rethinkdb
python-pip:
pkg.installed
build-essential:
pkg.installed
rethinkdb-pip:
pip:
- name: rethinkdb
- installed
- require:
- pkg: python-pip
- pkg: rethinkdb
- pkg: build-essential

7
srv/salt/top.sls Normal file
View file

@ -0,0 +1,7 @@
base:
'*':
- common
- users
- redis
- rethinkdb
- gollum

25
srv/salt/users/init.sls Normal file
View file

@ -0,0 +1,25 @@
deploy:
user.present:
- shell: /bin/bash
- home: /home/deploy
- fullname: Deploy
scragg:
user.present:
- fullname: Matthew Scragg
- shell: /bin/bash
- home: /home/scragg
sudo:
pkg:
- installed
/etc/sudoes.d/mysudoers:
file:
- managed
- source: salt://users/mysudoers
- mode: 440
- user: root
- group: root
- require:
- pkg: sudo

2
srv/salt/users/mysudoers Normal file
View file

@ -0,0 +1,2 @@
deploy ALL=(ALL) NOPASSWD:ALL
mrobinson ALL=(ALL) NOPASSWD:ALL