commit 7b39666270efec681959f3654498f8f29dbe3466 Author: Matthew Scragg Date: Wed Sep 25 15:27:25 2013 -0500 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24dbdf8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vagrant +.idea +*.pyc diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..b5b0d91 --- /dev/null +++ b/Vagrantfile @@ -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 diff --git a/srv/minion b/srv/minion new file mode 100644 index 0000000..995d6f7 --- /dev/null +++ b/srv/minion @@ -0,0 +1,2 @@ +master: localhost +file_client: local diff --git a/srv/salt/common/init.sls b/srv/salt/common/init.sls new file mode 100644 index 0000000..1f1b887 --- /dev/null +++ b/srv/salt/common/init.sls @@ -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 diff --git a/srv/salt/gollum/init.sls b/srv/salt/gollum/init.sls new file mode 100644 index 0000000..8964332 --- /dev/null +++ b/srv/salt/gollum/init.sls @@ -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 %} diff --git a/srv/salt/redis/init.sls b/srv/salt/redis/init.sls new file mode 100644 index 0000000..2150269 --- /dev/null +++ b/srv/salt/redis/init.sls @@ -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 diff --git a/srv/salt/rethinkdb/init.sls b/srv/salt/rethinkdb/init.sls new file mode 100644 index 0000000..1584c86 --- /dev/null +++ b/srv/salt/rethinkdb/init.sls @@ -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 diff --git a/srv/salt/top.sls b/srv/salt/top.sls new file mode 100644 index 0000000..8721f83 --- /dev/null +++ b/srv/salt/top.sls @@ -0,0 +1,7 @@ +base: + '*': + - common + - users + - redis + - rethinkdb + - gollum diff --git a/srv/salt/users/init.sls b/srv/salt/users/init.sls new file mode 100644 index 0000000..3cb71ee --- /dev/null +++ b/srv/salt/users/init.sls @@ -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 diff --git a/srv/salt/users/mysudoers b/srv/salt/users/mysudoers new file mode 100644 index 0000000..95c3936 --- /dev/null +++ b/srv/salt/users/mysudoers @@ -0,0 +1,2 @@ +deploy ALL=(ALL) NOPASSWD:ALL +mrobinson ALL=(ALL) NOPASSWD:ALL