salted-rails 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/README.md +7 -0
  2. data/lib/salted-rails/config.rb +71 -55
  3. data/lib/salted-rails/helper_base.rb +15 -0
  4. data/lib/salted-rails/vagrant_helper.rb +15 -9
  5. data/lib/salted-rails/version.rb +1 -1
  6. data/pillar/capistrano/top.sls +1 -1
  7. data/pillar/common.sls +1 -8
  8. data/pillar/vagrant/top.sls +1 -1
  9. data/salt/apt/load_packages.sls +5 -0
  10. data/salt/apt/update_packages.sls +5 -0
  11. data/salt/bin/change_mirror.sh +10 -6
  12. data/salt/bin/misc_fixes.sh +26 -0
  13. data/salt/bin/provision +40 -3
  14. data/salt/ci/cruisecontrolrb.sls +17 -11
  15. data/salt/ci/teamcity/etc/init.d/teamcity +4 -4
  16. data/salt/ci/teamcity/init.sls +18 -18
  17. data/salt/crons/init.sls +2 -2
  18. data/salt/databases/init.sls +45 -14
  19. data/salt/databases/mysql/client.sls +1 -1
  20. data/salt/databases/mysql/common.sls +3 -3
  21. data/salt/databases/mysql/server.sls +1 -1
  22. data/salt/databases/packages.sls +47 -0
  23. data/salt/databases/phpmyadmin/etc/nginx/admin.d/phpmyadmin.conf +10 -7
  24. data/salt/databases/postgresql/client.sls +5 -0
  25. data/salt/databases/postgresql/init.sls +10 -0
  26. data/salt/databases/sqlite3.sls +6 -0
  27. data/salt/databases/sqlitebrowser.sls +4 -0
  28. data/salt/editors/gvim.sls +5 -1
  29. data/salt/editors/rubymine.sls +16 -16
  30. data/salt/editors/vim/init.sls +71 -2
  31. data/salt/editors/vim/vimrc +8 -1
  32. data/salt/gui/desktop.sls +9 -0
  33. data/salt/gui/x2go.sls +5 -0
  34. data/salt/lang/jenv.sls +64 -0
  35. data/salt/lang/php/etc/php5/fpm/pool.d/www.conf +2 -2
  36. data/salt/lang/phpenv.sls +82 -0
  37. data/salt/lang/rbenv.sls +115 -0
  38. data/salt/lang/ruby.sls +24 -37
  39. data/salt/munin/nginx.sls +3 -1
  40. data/salt/munin/node.sls +2 -1
  41. data/salt/munin/php5-fpm.sls +3 -1
  42. data/salt/net/hosts.sls +9 -0
  43. data/salt/net/ntp.sls +6 -0
  44. data/salt/net/ufw.sls +8 -0
  45. data/salt/railsapp/gems.sls +5 -3
  46. data/salt/railsapp/init.sls +6 -2
  47. data/salt/scm/bazaar.sls +10 -0
  48. data/salt/scm/git/gitconfig +42 -0
  49. data/salt/scm/git/init.sls +21 -0
  50. data/salt/scm/init.sls +5 -0
  51. data/salt/scm/mercurial.sls +10 -0
  52. data/salt/scm/subversion.sls +6 -0
  53. data/salt/{vagrant/top.sls → top.sls} +24 -9
  54. data/salt/utils/file.sls +19 -0
  55. data/salt/utils/html.sls +5 -0
  56. data/salt/utils/init.sls +6 -0
  57. data/salt/{sysutils → utils}/net.sls +4 -0
  58. data/salt/{sysutils → utils}/status.sls +0 -0
  59. data/salt/utils/tmux/home/tmux-dev +7 -0
  60. data/salt/utils/tmux/home/tmux.conf +89 -0
  61. data/salt/utils/tmux/init.sls +32 -0
  62. data/salt/vagrant/minion.sls +1 -1
  63. data/salt/www/chromium.sls +5 -0
  64. data/salt/www/nginx/etc/nginx/admin.d/doc.conf +7 -0
  65. data/salt/www/nginx/etc/nginx/admin.d/nginx_status.conf +7 -0
  66. data/salt/www/nginx/etc/nginx/sites-available/.gitignore +3 -0
  67. data/salt/www/nginx/etc/nginx/sites-available/admin.conf +47 -0
  68. data/salt/www/nginx/init.sls +102 -16
  69. data/salt/www/nginx/srv/www/admin/favicon.ico +0 -0
  70. data/salt/www/nginx/srv/www/admin/favicon.png +0 -0
  71. data/salt/www/nginx/srv/www/admin/index.php +67 -0
  72. data/salt/www/nginx/srv/www/admin/phpinfo.php +3 -0
  73. data/salt/www/nginx/srv/www/admin/robots.txt +2 -0
  74. data/salt/www/users.sls +0 -9
  75. metadata +41 -20
  76. data/salt/bin/fix_hostname.sh +0 -6
  77. data/salt/capistrano/deploy_requirements.sls +0 -5
  78. data/salt/capistrano/top.sls +0 -4
  79. data/salt/databases/client.sls +0 -18
  80. data/salt/databases/server.sls +0 -19
  81. data/salt/gui/init.sls +0 -3
  82. data/salt/lang/ruby.sls.bak +0 -106
  83. data/salt/lang/system_ruby.sls +0 -43
  84. data/salt/sysutils/file.sls +0 -8
  85. data/salt/sysutils/init.sls +0 -5
  86. data/salt/sysutils/tmux.sls +0 -3
  87. data/salt/www/admin/etc/nginx/nginx.conf +0 -53
  88. data/salt/www/admin/etc/nginx/sites-available/.gitignore +0 -3
  89. data/salt/www/admin/etc/nginx/sites-available/phpmyadmin.conf +0 -7
  90. data/salt/www/admin/init.sls +0 -31
@@ -1,19 +0,0 @@
1
-
2
- include:
3
- # MySQL
4
- {%- if ('mysql' in pillar['gems']) or ('mysql2' in pillar['gems']) %}
5
- - databases.mysql.server
6
- - databases.phpmyadmin
7
- {%- endif %}
8
- # PostgreSQL - TODO main alternative to mysql
9
- # MongoDB - TODO Document database
10
- # CouchDB - TODO json web distributed db
11
- # Redis - TODO key value store
12
- # Riak - TODO Distributed fault tolerant DB
13
- # RabbitMQ - TODO message broker software
14
- # Memcached - TODO Memory cache
15
- # Cassandra - TODO distributed database management system
16
- # Neo4J - TODO Graph database
17
- # ElasticSearch - TODO search and analytics engine
18
- # Kestrel - TODO light-weight persistent message queue
19
- # SQLite3 - Included by default
@@ -1,3 +0,0 @@
1
- include:
2
- - gui.lxde
3
- - gui.x2go
@@ -1,106 +0,0 @@
1
- #
2
- # ruby deps
3
- #
4
-
5
- rbenv_deps:
6
- pkg.installed:
7
- - names:
8
- - git
9
- - build-essential
10
- - openssl
11
- - curl
12
- - zlib1g
13
- - zlib1g-dev
14
- - libssl-dev
15
- - libyaml-dev
16
- - libsqlite3-0
17
- - libsqlite3-dev
18
- - sqlite3
19
- - libxml2-dev
20
- - libxslt1-dev
21
- - autoconf
22
- - libc6-dev
23
- - libncurses5-dev
24
- - automake
25
- - libtool
26
- - bison
27
- - subversion
28
-
29
- #
30
- # rbenv and ruby-build installation
31
- #
32
-
33
- {{ pillar['homedir'] }}/.rbenv:
34
- file.directory:
35
- - user: {{ pillar['username'] }}
36
- - group: {{ pillar['username'] }}
37
- - makedirs: True
38
-
39
- https://github.com/sstephenson/rbenv.git:
40
- git.latest:
41
- - runas: {{ pillar['username'] }}
42
- - rev: master
43
- - target: {{ pillar['homedir'] }}/.rbenv
44
- - force: True
45
- - require:
46
- - pkg: rbenv_deps
47
- - file: {{ pillar['homedir'] }}/.rbenv
48
-
49
- https://github.com/sstephenson/ruby-build.git:
50
- git.latest:
51
- - runas: {{ pillar['username'] }}
52
- - rev: master
53
- - target: {{ pillar['homedir'] }}/.rbenv/plugins
54
- - force: True
55
- - require:
56
- - git: https://github.com/sstephenson/rbenv.git
57
- - file: {{ pillar['homedir'] }}/.rbenv
58
-
59
- adjust_profile:
60
- file.append:
61
- - name: {{ pillar['homedir'] }}/.profile
62
- - user: {{ pillar['username'] }}
63
- - group: {{ pillar['username'] }}
64
- - text:
65
- - export PATH="$HOME/.rbenv/bin:$PATH"
66
- - eval "$(rbenv init -)"
67
- - require:
68
- - git: https://github.com/sstephenson/rbenv.git
69
-
70
-
71
- #
72
- # ruby installation
73
- #
74
-
75
- # this is currently not working
76
- # ruby-{{ pillar['ruby_version'] }}:
77
- # rbenv.installed:
78
- # - default: True
79
- # - require:
80
- # - git: https://github.com/sstephenson/ruby-build.git
81
-
82
- install_ruby:
83
- cmd.run:
84
- - name: {{ pillar['homedir'] }}/.rbenv/bin/rbenv install {{ pillar['ruby_version'] }}
85
- - user: {{ pillar['username'] }}
86
- - group: {{ pillar['username'] }}
87
- - require:
88
- - git: https://github.com/sstephenson/ruby-build.git
89
-
90
- rehash:
91
- cmd.run:
92
- - name: {{ pillar['homedir'] }}/.rbenv/bin/rbenv rehash
93
- - user: {{ pillar['username'] }}
94
- - group: {{ pillar['username'] }}
95
- - require:
96
- - cmd: install_rbenv
97
-
98
- set-global:
99
- cmd.run:
100
- - name: {{ pillar['homedir'] }}/.rbenv/bin/rbenv global {{ pillar['ruby_version'] }}
101
- - user: {{ pillar['username'] }}
102
- - group: {{ pillar['username'] }}
103
- - require:
104
- - cmd: rehash
105
-
106
-
@@ -1,43 +0,0 @@
1
- ruby-deps:
2
- pkg:
3
- - installed
4
- - names:
5
- - build-essential
6
- - openssl
7
- - libreadline6
8
- - libreadline6-dev
9
- - curl
10
- - git
11
- - zlib1g
12
- - zlib1g-dev
13
- - libssl-dev
14
- - libyaml-dev
15
- - libsqlite3-0
16
- - libsqlite3-dev
17
- - sqlite3
18
- - libxml2-dev
19
- - libxslt1-dev
20
- - autoconf
21
- - libc6-dev
22
- - libncurses5-dev
23
- - automake
24
- - libtool
25
- - bison
26
- - subversion
27
-
28
- ruby:
29
- pkg.installed:
30
- - names:
31
- - ruby
32
- - rubygems
33
- - require:
34
- - ruby-deps
35
-
36
- gems:
37
- gem.installed:
38
- - names:
39
- - bundler
40
- - rake
41
- - require:
42
- - ruby
43
-
@@ -1,8 +0,0 @@
1
- # Optional packages
2
- file:
3
- pkg.installed:
4
- - pkgs:
5
- - gzip
6
- - unzip
7
- - saidar
8
- - less
@@ -1,5 +0,0 @@
1
- include:
2
- - sysutils.file
3
- - sysutils.net
4
- - sysutils.status
5
- - sysutils.tmux
@@ -1,3 +0,0 @@
1
- tmux:
2
- pkg:
3
- - installed
@@ -1,53 +0,0 @@
1
- user www-data www-data;
2
- worker_processes 4;
3
- pid /var/run/nginx.pid;
4
-
5
- events {
6
- worker_connections 768;
7
- # multi_accept on;
8
- }
9
-
10
- http {
11
- sendfile on;
12
- tcp_nopush on;
13
- tcp_nodelay on;
14
- types_hash_max_size 2048;
15
- server_tokens off;
16
-
17
- # Headers
18
- add_header X-Server-ID $hostname;
19
-
20
- # Size Limits & Buffer Overflows
21
- # One of the most important things to tweak
22
- client_body_buffer_size 128k;
23
- client_header_buffer_size 1k;
24
- client_max_body_size 20m;
25
- large_client_header_buffers 4 16k;
26
-
27
- # Timeouts
28
- client_body_timeout 10;
29
- client_header_timeout 20;
30
- keepalive_timeout 15 15;
31
- send_timeout 10;
32
-
33
- # SSL settings
34
- ssl_session_cache shared:SSL:10m;
35
- ssl_session_timeout 10m;
36
-
37
- # server_names_hash_bucket_size 64;
38
- # server_name_in_redirect off;
39
-
40
- ##
41
- # Gzip Settings
42
- ##
43
-
44
- gzip on;
45
- gzip_disable "msie6";
46
-
47
- include mime.types;
48
- default_type application/octet-stream;
49
-
50
- # include /etc/nginx/naxsi_core.rules;
51
- include conf.d/*.autoload.conf;
52
- include sites-enabled/*.conf;
53
- }
@@ -1,3 +0,0 @@
1
- *
2
- !.gitignore
3
- !phpmyadmin.conf
@@ -1,7 +0,0 @@
1
- server {
2
- listen 880;
3
- server_name admin.artabase.test;
4
- client_max_body_size 20M;
5
-
6
- include /etc/nginx/admin.d/*.conf;
7
- }
@@ -1,31 +0,0 @@
1
- nginx:
2
- pkg.installed:
3
- - name: nginx-full
4
- service:
5
- - running
6
- - enable: True
7
- - reload: True
8
- - watch:
9
- #- file: {{ pillar['etc_dir'] }}nginx/nginx.conf
10
- #- file: {{ pillar['etc_dir'] }}nginx/sites-enabled/*
11
- - file: {{ pillar['etc_dir'] }}nginx/*
12
- require:
13
- - file: {{ pillar['etc_dir'] }}nginx/nginx.conf
14
-
15
- admin-site:
16
- file.managed:
17
- - source: salt://www/nginx/etc/nginx/admin.d/phpmyadmin.conf
18
- - name: {{ pillar['etc_dir'] }}nginx/admin.d/phpmyadmin.conf
19
- - user: root
20
- - group: root
21
- - template: jinja
22
- - mode: 644
23
-
24
- admin_conf:
25
-
26
- #{{ pillar['etc_dir'] }}nginx/nginx.conf:
27
- # file.managed:
28
- # - source: salt://www/nginx/etc/nginx/nginx.conf
29
- # - user: root
30
- # - group: root
31
- # - mode: 644