from-scratch 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Berksfile +2 -1
- data/Berksfile.lock +20 -1
- data/cookbooks/bluepill/CHANGELOG.md +93 -0
- data/cookbooks/bluepill/README.md +91 -0
- data/cookbooks/bluepill/attributes/default.rb +44 -0
- data/cookbooks/bluepill/metadata.json +1 -0
- data/cookbooks/bluepill/providers/service.rb +172 -0
- data/cookbooks/bluepill/recipes/default.rb +48 -0
- data/cookbooks/bluepill/recipes/rsyslog.rb +28 -0
- data/cookbooks/bluepill/resources/service.rb +27 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.fedora.erb +34 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.freebsd.erb +32 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.lsb.erb +37 -0
- data/cookbooks/bluepill/templates/default/bluepill_init.rhel.erb +34 -0
- data/cookbooks/bluepill/templates/default/bluepill_rsyslog.conf.erb +1 -0
- data/cookbooks/nginx/CHANGELOG.md +435 -0
- data/cookbooks/nginx/README.md +521 -0
- data/cookbooks/nginx/attributes/auth_request.rb +23 -0
- data/cookbooks/nginx/attributes/default.rb +131 -0
- data/cookbooks/nginx/attributes/devel.rb +24 -0
- data/cookbooks/nginx/attributes/echo.rb +24 -0
- data/cookbooks/nginx/attributes/geoip.rb +31 -0
- data/cookbooks/nginx/attributes/headers_more.rb +24 -0
- data/cookbooks/nginx/attributes/lua.rb +28 -0
- data/cookbooks/nginx/attributes/naxsi.rb +24 -0
- data/cookbooks/nginx/attributes/openssl_source.rb +23 -0
- data/cookbooks/nginx/attributes/pagespeed.rb +9 -0
- data/cookbooks/nginx/attributes/passenger.rb +58 -0
- data/cookbooks/nginx/attributes/rate_limiting.rb +23 -0
- data/cookbooks/nginx/attributes/repo.rb +35 -0
- data/cookbooks/nginx/attributes/set_misc.rb +8 -0
- data/cookbooks/nginx/attributes/socketproxy.rb +13 -0
- data/cookbooks/nginx/attributes/source.rb +42 -0
- data/cookbooks/nginx/attributes/status.rb +22 -0
- data/cookbooks/nginx/attributes/syslog.rb +24 -0
- data/cookbooks/nginx/attributes/upload_progress.rb +26 -0
- data/cookbooks/nginx/definitions/nginx_site.rb +50 -0
- data/cookbooks/nginx/files/default/mime.types +78 -0
- data/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
- data/cookbooks/nginx/libraries/matchers.rb +20 -0
- data/cookbooks/nginx/metadata.json +351 -0
- data/cookbooks/nginx/recipes/authorized_ips.rb +32 -0
- data/cookbooks/nginx/recipes/commons.rb +24 -0
- data/cookbooks/nginx/recipes/commons_conf.rb +42 -0
- data/cookbooks/nginx/recipes/commons_dir.rb +57 -0
- data/cookbooks/nginx/recipes/commons_script.rb +29 -0
- data/cookbooks/nginx/recipes/default.rb +31 -0
- data/cookbooks/nginx/recipes/headers_more_module.rb +50 -0
- data/cookbooks/nginx/recipes/http_auth_request_module.rb +52 -0
- data/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
- data/cookbooks/nginx/recipes/http_geoip_module.rb +113 -0
- data/cookbooks/nginx/recipes/http_gzip_static_module.rb +30 -0
- data/cookbooks/nginx/recipes/http_mp4_module.rb +2 -0
- data/cookbooks/nginx/recipes/http_perl_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_realip_module.rb +38 -0
- data/cookbooks/nginx/recipes/http_spdy_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
- data/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
- data/cookbooks/nginx/recipes/ipv6.rb +23 -0
- data/cookbooks/nginx/recipes/lua.rb +47 -0
- data/cookbooks/nginx/recipes/naxsi_module.rb +52 -0
- data/cookbooks/nginx/recipes/ngx_devel_module.rb +44 -0
- data/cookbooks/nginx/recipes/ngx_lua_module.rb +47 -0
- data/cookbooks/nginx/recipes/ohai_plugin.rb +35 -0
- data/cookbooks/nginx/recipes/openssl_source.rb +45 -0
- data/cookbooks/nginx/recipes/package.rb +52 -0
- data/cookbooks/nginx/recipes/pagespeed_module.rb +62 -0
- data/cookbooks/nginx/recipes/passenger.rb +56 -0
- data/cookbooks/nginx/recipes/repo.rb +41 -0
- data/cookbooks/nginx/recipes/repo_passenger.rb +39 -0
- data/cookbooks/nginx/recipes/set_misc.rb +30 -0
- data/cookbooks/nginx/recipes/socketproxy.rb +26 -0
- data/cookbooks/nginx/recipes/source.rb +205 -0
- data/cookbooks/nginx/recipes/syslog_module.rb +69 -0
- data/cookbooks/nginx/recipes/upload_progress_module.rb +53 -0
- data/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
- data/cookbooks/nginx/templates/default/default-site.erb +11 -0
- data/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
- data/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
- data/cookbooks/nginx/templates/default/modules/http_gzip_static.conf.erb +1 -0
- data/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +7 -0
- data/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
- data/cookbooks/nginx/templates/default/modules/passenger.conf.erb +13 -0
- data/cookbooks/nginx/templates/default/modules/socketproxy.conf.erb +89 -0
- data/cookbooks/nginx/templates/default/modules/upload_progress.erb +4 -0
- data/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +39 -0
- data/cookbooks/nginx/templates/default/nginx.conf.erb +103 -0
- data/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
- data/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
- data/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
- data/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
- data/cookbooks/nginx/templates/default/nxensite.erb +38 -0
- data/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
- data/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
- data/cookbooks/nginx/templates/default/sv-nginx-run.erb +4 -0
- data/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
- data/cookbooks/nginx/templates/suse/nginx.init.erb +115 -0
- data/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
- data/cookbooks/ohai/CHANGELOG.md +69 -0
- data/cookbooks/ohai/README.md +89 -0
- data/cookbooks/ohai/attributes/default.rb +31 -0
- data/cookbooks/ohai/files/default/plugins/README +1 -0
- data/cookbooks/ohai/libraries/matchers.rb +14 -0
- data/cookbooks/ohai/metadata.json +1 -0
- data/cookbooks/ohai/providers/hint.rb +38 -0
- data/cookbooks/ohai/recipes/default.rb +52 -0
- data/cookbooks/ohai/resources/hint.rb +5 -0
- data/cookbooks/packagecloud/CHANGELOG.md +12 -0
- data/cookbooks/packagecloud/README.md +80 -0
- data/cookbooks/packagecloud/attributes/default.rb +8 -0
- data/cookbooks/packagecloud/libraries/helper.rb +43 -0
- data/cookbooks/packagecloud/libraries/matcher.rb +7 -0
- data/cookbooks/packagecloud/metadata.json +1 -0
- data/cookbooks/packagecloud/providers/repo.rb +212 -0
- data/cookbooks/packagecloud/resources/repo.rb +10 -0
- data/cookbooks/packagecloud/templates/.kitchen/logs/kitchen.log +29 -0
- data/cookbooks/packagecloud/templates/default/apt.erb +2 -0
- data/cookbooks/packagecloud/templates/default/yum.erb +15 -0
- data/cookbooks/rsyslog/CHANGELOG.md +193 -0
- data/cookbooks/rsyslog/README.md +276 -0
- data/cookbooks/rsyslog/attributes/default.rb +131 -0
- data/cookbooks/rsyslog/libraries/helpers.rb +25 -0
- data/cookbooks/rsyslog/metadata.json +1 -0
- data/cookbooks/rsyslog/providers/file_input.rb +44 -0
- data/cookbooks/rsyslog/recipes/client.rb +87 -0
- data/cookbooks/rsyslog/recipes/default.rb +89 -0
- data/cookbooks/rsyslog/recipes/server.rb +44 -0
- data/cookbooks/rsyslog/resources/file_input.rb +28 -0
- data/cookbooks/rsyslog/templates/default/35-server-per-host.conf.erb +62 -0
- data/cookbooks/rsyslog/templates/default/49-relp.conf.erb +10 -0
- data/cookbooks/rsyslog/templates/default/49-remote.conf.erb +30 -0
- data/cookbooks/rsyslog/templates/default/50-default.conf.erb +6 -0
- data/cookbooks/rsyslog/templates/default/file-input.conf.erb +15 -0
- data/cookbooks/rsyslog/templates/default/omnios-manifest.xml.erb +30 -0
- data/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +117 -0
- data/cookbooks/rsyslog/templates/smartos/50-default.conf.erb +18 -0
- data/cookbooks/runit/.kitchen.cloud.yml +103 -0
- data/cookbooks/runit/.kitchen.yml +38 -0
- data/cookbooks/runit/.rspec +3 -0
- data/cookbooks/runit/.rubocop.yml +45 -0
- data/cookbooks/runit/Berksfile.disabled +11 -0
- data/cookbooks/runit/CHANGELOG.md +226 -0
- data/cookbooks/runit/CONTRIBUTING.md +266 -0
- data/cookbooks/runit/Cheffile +11 -0
- data/cookbooks/runit/Gemfile +17 -0
- data/cookbooks/runit/LICENSE +201 -0
- data/cookbooks/runit/README.md +435 -0
- data/cookbooks/runit/Rakefile +23 -0
- data/cookbooks/runit/TESTING.md +26 -0
- data/cookbooks/runit/attributes/default.rb +62 -0
- data/cookbooks/runit/files/default/runit.seed +1 -0
- data/cookbooks/runit/files/default/runsvdir +0 -0
- data/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/cookbooks/runit/libraries/default.rb +0 -0
- data/cookbooks/runit/libraries/helpers.rb +190 -0
- data/cookbooks/runit/libraries/matchers.rb +69 -0
- data/cookbooks/runit/libraries/provider_runit_service.rb +326 -0
- data/cookbooks/runit/libraries/resource_runit_service.rb +267 -0
- data/cookbooks/runit/metadata.json +50 -0
- data/cookbooks/runit/recipes/default.rb +91 -0
- data/cookbooks/runit/templates/debian/init.d.erb +66 -0
- data/cookbooks/runit/templates/default/log-config.erb +24 -0
- data/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/cookbooks/scratchify/Berksfile +2 -1
- data/cookbooks/scratchify/Berksfile.lock +20 -1
- data/cookbooks/scratchify/lib/from-scratch.rb +1 -4
- data/cookbooks/scratchify/lib/from-scratch/version.rb +1 -1
- data/cookbooks/scratchify/metadata.json +5 -2
- data/cookbooks/scratchify/recipes/default.rb +15 -1
- data/cookbooks/scratchify/recipes/nginx_site.rb +4 -0
- data/cookbooks/scratchify/recipes/pre_rvm.rb +5 -0
- data/cookbooks/scratchify/templates/nginx.erb +31 -0
- data/cookbooks/scratchify/templates/node.json.erb +21 -6
- data/cookbooks/yum-epel/CHANGELOG.md +84 -0
- data/cookbooks/yum-epel/README.md +172 -0
- data/cookbooks/yum-epel/attributes/default.rb +1 -0
- data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-source.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing-source.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel-testing.rb +28 -0
- data/cookbooks/yum-epel/attributes/epel.rb +28 -0
- data/cookbooks/yum-epel/metadata.json +1 -0
- data/cookbooks/yum-epel/recipes/default.rb +61 -0
- data/cookbooks/yum/CHANGELOG.md +294 -0
- data/cookbooks/yum/README.md +285 -0
- data/cookbooks/yum/attributes/main.rb +100 -0
- data/cookbooks/yum/libraries/matchers.rb +27 -0
- data/cookbooks/yum/metadata.json +1 -0
- data/cookbooks/yum/providers/globalconfig.rb +41 -0
- data/cookbooks/yum/providers/repository.rb +106 -0
- data/cookbooks/yum/recipes/default.rb +26 -0
- data/cookbooks/yum/resources/globalconfig.rb +109 -0
- data/cookbooks/yum/resources/repository.rb +69 -0
- data/cookbooks/yum/templates/default/main.erb +276 -0
- data/cookbooks/yum/templates/default/repo.erb +125 -0
- data/lib/from-scratch.rb +1 -0
- data/lib/from-scratch/version.rb +1 -1
- data/metadata.rb +5 -1
- data/recipes/default.rb +15 -1
- data/recipes/nginx_site.rb +4 -0
- data/recipes/pre_rvm.rb +5 -0
- data/templates/nginx.erb +31 -0
- data/templates/node.json.erb +21 -6
- metadata +194 -1
@@ -0,0 +1,125 @@
|
|
1
|
+
# This file was generated by Chef
|
2
|
+
# Do NOT modify this file by hand.
|
3
|
+
|
4
|
+
[<%= @config.repositoryid %>]
|
5
|
+
name=<%= @config.description %>
|
6
|
+
<% if @config.baseurl %>
|
7
|
+
baseurl=<%= @config.baseurl %>
|
8
|
+
<% end %>
|
9
|
+
<% if @config.cost %>
|
10
|
+
cost=<%= @config.cost %>
|
11
|
+
<% end %>
|
12
|
+
<% if @config.enabled %>
|
13
|
+
enabled=1
|
14
|
+
<% else %>
|
15
|
+
enabled=0
|
16
|
+
<% end %>
|
17
|
+
<% if @config.enablegroups %>
|
18
|
+
enablegroups=1
|
19
|
+
<% end %>
|
20
|
+
<% if @config.exclude %>
|
21
|
+
exclude=<%= @config.exclude %>
|
22
|
+
<% end %>
|
23
|
+
<% if @config.failovermethod %>
|
24
|
+
failovermethod=<%= @config.failovermethod %>
|
25
|
+
<% end %>
|
26
|
+
<% if @config.fastestmirror_enabled %>
|
27
|
+
fastestmirror_enabled=<%= @config.fastestmirror_enabled %>
|
28
|
+
<% end %>
|
29
|
+
<% if @config.gpgcheck %>
|
30
|
+
gpgcheck=1
|
31
|
+
<% else %>
|
32
|
+
gpgcheck=0
|
33
|
+
<% end %>
|
34
|
+
<% if @config.gpgkey %>
|
35
|
+
gpgkey=<%= case @config.gpgkey
|
36
|
+
when Array
|
37
|
+
@config.gpgkey.join("\n ")
|
38
|
+
else
|
39
|
+
@config.gpgkey
|
40
|
+
end %>
|
41
|
+
<% end -%>
|
42
|
+
<% if @config.http_caching %>
|
43
|
+
http_caching=<%= @config.http_caching %>
|
44
|
+
<% end %>
|
45
|
+
<% if @config.include_config %>
|
46
|
+
include=<%= @config.include_config %>
|
47
|
+
<% end %>
|
48
|
+
<% if @config.includepkgs %>
|
49
|
+
includepkgs=<%= @config.includepkgs %>
|
50
|
+
<% end %>
|
51
|
+
<% if @config.keepalive %>
|
52
|
+
keepalive=1
|
53
|
+
<% end %>
|
54
|
+
<% if @config.metadata_expire %>
|
55
|
+
metadata_expire=<%= @config.metadata_expire %>
|
56
|
+
<% end %>
|
57
|
+
<% if @config.mirrorlist %>
|
58
|
+
mirrorlist=<%= @config.mirrorlist %>
|
59
|
+
<% end %>
|
60
|
+
<% if @config.mirror_expire %>
|
61
|
+
mirror_expire=<%= @config.mirror_expire %>
|
62
|
+
<% end %>
|
63
|
+
<% if @config.mirrorlist_expire %>
|
64
|
+
mirrorlist_expire=<%= @config.mirrorlist_expire %>
|
65
|
+
<% end %>
|
66
|
+
<% if @config.priority %>
|
67
|
+
priority=<%= @config.priority %>
|
68
|
+
<% end %>
|
69
|
+
<% if @config.proxy %>
|
70
|
+
proxy=<%= @config.proxy %>
|
71
|
+
<% end %>
|
72
|
+
<% if @config.proxy_username %>
|
73
|
+
proxy_username=<%= @config.proxy_username %>
|
74
|
+
<% end %>
|
75
|
+
<% if @config.proxy_password %>
|
76
|
+
proxy_password=<%= @config.proxy_password %>
|
77
|
+
<% end %>
|
78
|
+
<% if @config.username %>
|
79
|
+
username=<%= @config.username %>
|
80
|
+
<% end %>
|
81
|
+
<% if @config.password %>
|
82
|
+
password=<%= @config.password %>
|
83
|
+
<% end %>
|
84
|
+
<% if @config.repo_gpgcheck %>
|
85
|
+
repo_gpgcheck=1
|
86
|
+
<% end %>
|
87
|
+
<% if @config.max_retries %>
|
88
|
+
retries=<%= @config.max_retries %>
|
89
|
+
<% end %>
|
90
|
+
<% if @config.report_instanceid %>
|
91
|
+
report_instanceid=<%= @config.report_instanceid %>
|
92
|
+
<% end %>
|
93
|
+
<% if @config.skip_if_unavailable %>
|
94
|
+
skip_if_unavailable=1
|
95
|
+
<% end %>
|
96
|
+
<% if @config.sslcacert %>
|
97
|
+
sslcacert=<%= @config.sslcacert %>
|
98
|
+
<% end %>
|
99
|
+
<% if @config.sslclientcert %>
|
100
|
+
sslclientcert=<%= @config.sslclientcert %>
|
101
|
+
<% end %>
|
102
|
+
<% if @config.sslclientkey %>
|
103
|
+
sslclientkey=<%= @config.sslclientkey %>
|
104
|
+
<% end %>
|
105
|
+
<% unless @config.sslverify.nil? %>
|
106
|
+
sslverify=<%= ( @config.sslverify ) ? 'true' : 'false' %>
|
107
|
+
<% end %>
|
108
|
+
<% if @config.timeout %>
|
109
|
+
timeout=<%= @config.timeout %>
|
110
|
+
<% end %>
|
111
|
+
<% if @config.options -%>
|
112
|
+
<% @config.options.each do |key, value| -%>
|
113
|
+
<%= key %>=<%=
|
114
|
+
case value
|
115
|
+
when Array
|
116
|
+
value.join("\n ")
|
117
|
+
when TrueClass
|
118
|
+
'1'
|
119
|
+
when FalseClass
|
120
|
+
'0'
|
121
|
+
else
|
122
|
+
value
|
123
|
+
end %>
|
124
|
+
<% end -%>
|
125
|
+
<% end -%>
|
data/lib/from-scratch.rb
CHANGED
@@ -7,6 +7,7 @@ module FromScratch
|
|
7
7
|
app_name, host = ARGV
|
8
8
|
ssh_pub_key = `cat ~/.ssh/id_rsa.pub`.strip
|
9
9
|
postgresql_admin_password = `echo -n '#{SecureRandom.base64(16)}''postgres' | openssl md5 | sed -e 's/.* /md5/'`.strip
|
10
|
+
postgresql_user_password = SecureRandom.base64(16)
|
10
11
|
|
11
12
|
{ node: ['nodes', host], user: ['data_bags/users', 'deploy'] }.each do |from, to|
|
12
13
|
FileUtils.mkdir_p File.expand_path("../../tmp/#{to[0]}", __FILE__)
|
data/lib/from-scratch/version.rb
CHANGED
data/metadata.rb
CHANGED
@@ -5,7 +5,10 @@ license "MIT"
|
|
5
5
|
description "Cookbook for FromScratch gem"
|
6
6
|
version "0.1.0"
|
7
7
|
|
8
|
-
recipe "scratchify", "
|
8
|
+
recipe "scratchify", "sets up some user directories and files"
|
9
|
+
recipe "scratchify::pre_rvm", "workaround for RVM recipe bug"
|
10
|
+
recipe "scratchify::nginx_site", "loads nginx site config"
|
11
|
+
|
9
12
|
|
10
13
|
supports 'ubuntu'
|
11
14
|
supports 'debian'
|
@@ -13,3 +16,4 @@ supports 'debian'
|
|
13
16
|
depends 'user'
|
14
17
|
depends 'rvm'
|
15
18
|
depends 'postgresql'
|
19
|
+
depends 'nginx'
|
data/recipes/default.rb
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
|
1
|
+
["#{node['scratchify']['app_name']}", "#{node['scratchify']['app_name']}/shared", "#{node['scratchify']['app_name']}/shared/config", "#{node['scratchify']['app_name']}/shared/log"].each do |path|
|
2
|
+
directory "/home/deploy/#{path}" do
|
3
|
+
owner 'deploy'
|
4
|
+
group 'deploy'
|
5
|
+
mode '0755'
|
6
|
+
recursive true
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
directory "/home/deploy/#{node['scratchify']['app_name']}/shared/log" do
|
2
11
|
owner 'deploy'
|
3
12
|
group 'deploy'
|
4
13
|
mode '0755'
|
@@ -18,3 +27,8 @@ template "/home/deploy/#{node['scratchify']['app_name']}/shared/config/secrets.y
|
|
18
27
|
group 'deploy'
|
19
28
|
mode '0600'
|
20
29
|
end
|
30
|
+
|
31
|
+
# required for json gem
|
32
|
+
if node['platform_family'] == 'debian'
|
33
|
+
package 'libgmp-dev'
|
34
|
+
end
|
data/recipes/pre_rvm.rb
ADDED
data/templates/nginx.erb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
upstream <%= node['scratchify']['app_name'] %>_upstream {
|
2
|
+
server unix:/home/deploy/<%= node['scratchify']['app_name'] %>/shared/tmp/sockets/application.sock fail_timeout=0;
|
3
|
+
}
|
4
|
+
|
5
|
+
server {
|
6
|
+
listen 80 default_server;
|
7
|
+
server_name localhost;
|
8
|
+
|
9
|
+
client_max_body_size 10M;
|
10
|
+
keepalive_timeout 10;
|
11
|
+
|
12
|
+
root /home/deploy/<%= node['scratchify']['app_name'] %>/current/public;
|
13
|
+
error_page 500 503 502 504 /500.html;
|
14
|
+
try_files $uri/index.html $uri @<%= node['scratchify']['app_name'] %>_location;
|
15
|
+
|
16
|
+
location @<%= node['scratchify']['app_name'] %>_location {
|
17
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
18
|
+
proxy_set_header Host $http_host;
|
19
|
+
proxy_redirect off;
|
20
|
+
|
21
|
+
proxy_pass http://<%= node['scratchify']['app_name'] %>_upstream;
|
22
|
+
access_log /home/deploy/<%= node['scratchify']['app_name'] %>/shared/log/nginx.access.log;
|
23
|
+
error_log /home/deploy/<%= node['scratchify']['app_name'] %>/shared/log/nginx.error.log;
|
24
|
+
}
|
25
|
+
|
26
|
+
location ^~ /assets/ {
|
27
|
+
gzip_static on;
|
28
|
+
expires max;
|
29
|
+
add_header Cache-Control public;
|
30
|
+
}
|
31
|
+
}
|
data/templates/node.json.erb
CHANGED
@@ -1,20 +1,30 @@
|
|
1
1
|
{
|
2
2
|
"run_list": [
|
3
|
-
"recipe[
|
3
|
+
"recipe[user::data_bag]",
|
4
|
+
"recipe[scratchify::pre_rvm]",
|
5
|
+
"recipe[rvm::user]",
|
4
6
|
"recipe[postgresql::server]",
|
5
7
|
"recipe[postgresql::config_pgtune]",
|
6
8
|
"recipe[postgresql::setup_users]",
|
7
9
|
"recipe[postgresql::setup_databases]",
|
8
|
-
"recipe[
|
9
|
-
"recipe[
|
10
|
+
"recipe[scratchify]",
|
11
|
+
"recipe[nginx]",
|
12
|
+
"recipe[scratchify::nginx_site]"
|
10
13
|
],
|
11
14
|
|
12
15
|
"users": ["deploy"],
|
13
16
|
|
14
17
|
"rvm": {
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"
|
18
|
+
"user_default_ruby": "2.2.3",
|
19
|
+
"user_install_rubies": true,
|
20
|
+
"installs": {
|
21
|
+
"deploy": true
|
22
|
+
},
|
23
|
+
"user_installs": [
|
24
|
+
{
|
25
|
+
"user": "deploy"
|
26
|
+
}
|
27
|
+
],
|
18
28
|
"gpg": {}
|
19
29
|
},
|
20
30
|
|
@@ -65,6 +75,11 @@
|
|
65
75
|
"app_name": "<%= app_name %>"
|
66
76
|
},
|
67
77
|
|
78
|
+
"nginx": {
|
79
|
+
"default_site_enabled": false,
|
80
|
+
"pid": "/var/run/nginx.pid"
|
81
|
+
},
|
82
|
+
|
68
83
|
"automatic": {
|
69
84
|
"ipaddress": "<%= host %>"
|
70
85
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: from-scratch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Shaydurov
|
@@ -168,6 +168,19 @@ files:
|
|
168
168
|
- cookbooks/apt/templates/default/acng.conf.erb
|
169
169
|
- cookbooks/apt/templates/default/unattended-upgrades.seed.erb
|
170
170
|
- cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb
|
171
|
+
- cookbooks/bluepill/CHANGELOG.md
|
172
|
+
- cookbooks/bluepill/README.md
|
173
|
+
- cookbooks/bluepill/attributes/default.rb
|
174
|
+
- cookbooks/bluepill/metadata.json
|
175
|
+
- cookbooks/bluepill/providers/service.rb
|
176
|
+
- cookbooks/bluepill/recipes/default.rb
|
177
|
+
- cookbooks/bluepill/recipes/rsyslog.rb
|
178
|
+
- cookbooks/bluepill/resources/service.rb
|
179
|
+
- cookbooks/bluepill/templates/default/bluepill_init.fedora.erb
|
180
|
+
- cookbooks/bluepill/templates/default/bluepill_init.freebsd.erb
|
181
|
+
- cookbooks/bluepill/templates/default/bluepill_init.lsb.erb
|
182
|
+
- cookbooks/bluepill/templates/default/bluepill_init.rhel.erb
|
183
|
+
- cookbooks/bluepill/templates/default/bluepill_rsyslog.conf.erb
|
171
184
|
- cookbooks/build-essential/CHANGELOG.md
|
172
185
|
- cookbooks/build-essential/README.md
|
173
186
|
- cookbooks/build-essential/attributes/default.rb
|
@@ -231,6 +244,98 @@ files:
|
|
231
244
|
- cookbooks/java/resources/ark.rb
|
232
245
|
- cookbooks/java/templates/default/ibm_jdk.installer.properties.erb
|
233
246
|
- cookbooks/java/templates/default/oracle.jinfo.erb
|
247
|
+
- cookbooks/nginx/CHANGELOG.md
|
248
|
+
- cookbooks/nginx/README.md
|
249
|
+
- cookbooks/nginx/attributes/auth_request.rb
|
250
|
+
- cookbooks/nginx/attributes/default.rb
|
251
|
+
- cookbooks/nginx/attributes/devel.rb
|
252
|
+
- cookbooks/nginx/attributes/echo.rb
|
253
|
+
- cookbooks/nginx/attributes/geoip.rb
|
254
|
+
- cookbooks/nginx/attributes/headers_more.rb
|
255
|
+
- cookbooks/nginx/attributes/lua.rb
|
256
|
+
- cookbooks/nginx/attributes/naxsi.rb
|
257
|
+
- cookbooks/nginx/attributes/openssl_source.rb
|
258
|
+
- cookbooks/nginx/attributes/pagespeed.rb
|
259
|
+
- cookbooks/nginx/attributes/passenger.rb
|
260
|
+
- cookbooks/nginx/attributes/rate_limiting.rb
|
261
|
+
- cookbooks/nginx/attributes/repo.rb
|
262
|
+
- cookbooks/nginx/attributes/set_misc.rb
|
263
|
+
- cookbooks/nginx/attributes/socketproxy.rb
|
264
|
+
- cookbooks/nginx/attributes/source.rb
|
265
|
+
- cookbooks/nginx/attributes/status.rb
|
266
|
+
- cookbooks/nginx/attributes/syslog.rb
|
267
|
+
- cookbooks/nginx/attributes/upload_progress.rb
|
268
|
+
- cookbooks/nginx/definitions/nginx_site.rb
|
269
|
+
- cookbooks/nginx/files/default/mime.types
|
270
|
+
- cookbooks/nginx/files/default/naxsi_core.rules
|
271
|
+
- cookbooks/nginx/libraries/matchers.rb
|
272
|
+
- cookbooks/nginx/metadata.json
|
273
|
+
- cookbooks/nginx/recipes/authorized_ips.rb
|
274
|
+
- cookbooks/nginx/recipes/commons.rb
|
275
|
+
- cookbooks/nginx/recipes/commons_conf.rb
|
276
|
+
- cookbooks/nginx/recipes/commons_dir.rb
|
277
|
+
- cookbooks/nginx/recipes/commons_script.rb
|
278
|
+
- cookbooks/nginx/recipes/default.rb
|
279
|
+
- cookbooks/nginx/recipes/headers_more_module.rb
|
280
|
+
- cookbooks/nginx/recipes/http_auth_request_module.rb
|
281
|
+
- cookbooks/nginx/recipes/http_echo_module.rb
|
282
|
+
- cookbooks/nginx/recipes/http_geoip_module.rb
|
283
|
+
- cookbooks/nginx/recipes/http_gzip_static_module.rb
|
284
|
+
- cookbooks/nginx/recipes/http_mp4_module.rb
|
285
|
+
- cookbooks/nginx/recipes/http_perl_module.rb
|
286
|
+
- cookbooks/nginx/recipes/http_realip_module.rb
|
287
|
+
- cookbooks/nginx/recipes/http_spdy_module.rb
|
288
|
+
- cookbooks/nginx/recipes/http_ssl_module.rb
|
289
|
+
- cookbooks/nginx/recipes/http_stub_status_module.rb
|
290
|
+
- cookbooks/nginx/recipes/ipv6.rb
|
291
|
+
- cookbooks/nginx/recipes/lua.rb
|
292
|
+
- cookbooks/nginx/recipes/naxsi_module.rb
|
293
|
+
- cookbooks/nginx/recipes/ngx_devel_module.rb
|
294
|
+
- cookbooks/nginx/recipes/ngx_lua_module.rb
|
295
|
+
- cookbooks/nginx/recipes/ohai_plugin.rb
|
296
|
+
- cookbooks/nginx/recipes/openssl_source.rb
|
297
|
+
- cookbooks/nginx/recipes/package.rb
|
298
|
+
- cookbooks/nginx/recipes/pagespeed_module.rb
|
299
|
+
- cookbooks/nginx/recipes/passenger.rb
|
300
|
+
- cookbooks/nginx/recipes/repo.rb
|
301
|
+
- cookbooks/nginx/recipes/repo_passenger.rb
|
302
|
+
- cookbooks/nginx/recipes/set_misc.rb
|
303
|
+
- cookbooks/nginx/recipes/socketproxy.rb
|
304
|
+
- cookbooks/nginx/recipes/source.rb
|
305
|
+
- cookbooks/nginx/recipes/syslog_module.rb
|
306
|
+
- cookbooks/nginx/recipes/upload_progress_module.rb
|
307
|
+
- cookbooks/nginx/templates/debian/nginx.init.erb
|
308
|
+
- cookbooks/nginx/templates/default/default-site.erb
|
309
|
+
- cookbooks/nginx/templates/default/modules/authorized_ip.erb
|
310
|
+
- cookbooks/nginx/templates/default/modules/http_geoip.conf.erb
|
311
|
+
- cookbooks/nginx/templates/default/modules/http_gzip_static.conf.erb
|
312
|
+
- cookbooks/nginx/templates/default/modules/http_realip.conf.erb
|
313
|
+
- cookbooks/nginx/templates/default/modules/nginx_status.erb
|
314
|
+
- cookbooks/nginx/templates/default/modules/passenger.conf.erb
|
315
|
+
- cookbooks/nginx/templates/default/modules/socketproxy.conf.erb
|
316
|
+
- cookbooks/nginx/templates/default/modules/upload_progress.erb
|
317
|
+
- cookbooks/nginx/templates/default/nginx-upstart.conf.erb
|
318
|
+
- cookbooks/nginx/templates/default/nginx.conf.erb
|
319
|
+
- cookbooks/nginx/templates/default/nginx.init.erb
|
320
|
+
- cookbooks/nginx/templates/default/nginx.pill.erb
|
321
|
+
- cookbooks/nginx/templates/default/nginx.sysconfig.erb
|
322
|
+
- cookbooks/nginx/templates/default/nxdissite.erb
|
323
|
+
- cookbooks/nginx/templates/default/nxensite.erb
|
324
|
+
- cookbooks/nginx/templates/default/plugins/nginx.rb.erb
|
325
|
+
- cookbooks/nginx/templates/default/sv-nginx-log-run.erb
|
326
|
+
- cookbooks/nginx/templates/default/sv-nginx-run.erb
|
327
|
+
- cookbooks/nginx/templates/gentoo/nginx.init.erb
|
328
|
+
- cookbooks/nginx/templates/suse/nginx.init.erb
|
329
|
+
- cookbooks/nginx/templates/ubuntu/nginx.init.erb
|
330
|
+
- cookbooks/ohai/CHANGELOG.md
|
331
|
+
- cookbooks/ohai/README.md
|
332
|
+
- cookbooks/ohai/attributes/default.rb
|
333
|
+
- cookbooks/ohai/files/default/plugins/README
|
334
|
+
- cookbooks/ohai/libraries/matchers.rb
|
335
|
+
- cookbooks/ohai/metadata.json
|
336
|
+
- cookbooks/ohai/providers/hint.rb
|
337
|
+
- cookbooks/ohai/recipes/default.rb
|
338
|
+
- cookbooks/ohai/resources/hint.rb
|
234
339
|
- cookbooks/openssl/CHANGELOG.md
|
235
340
|
- cookbooks/openssl/README.md
|
236
341
|
- cookbooks/openssl/attributes/default.rb
|
@@ -247,6 +352,17 @@ files:
|
|
247
352
|
- cookbooks/openssl/resources/dhparam.rb
|
248
353
|
- cookbooks/openssl/resources/rsa_key.rb
|
249
354
|
- cookbooks/openssl/resources/x509.rb
|
355
|
+
- cookbooks/packagecloud/CHANGELOG.md
|
356
|
+
- cookbooks/packagecloud/README.md
|
357
|
+
- cookbooks/packagecloud/attributes/default.rb
|
358
|
+
- cookbooks/packagecloud/libraries/helper.rb
|
359
|
+
- cookbooks/packagecloud/libraries/matcher.rb
|
360
|
+
- cookbooks/packagecloud/metadata.json
|
361
|
+
- cookbooks/packagecloud/providers/repo.rb
|
362
|
+
- cookbooks/packagecloud/resources/repo.rb
|
363
|
+
- cookbooks/packagecloud/templates/.kitchen/logs/kitchen.log
|
364
|
+
- cookbooks/packagecloud/templates/default/apt.erb
|
365
|
+
- cookbooks/packagecloud/templates/default/yum.erb
|
250
366
|
- cookbooks/postgresql/.gitignore
|
251
367
|
- cookbooks/postgresql/.kitchen.yml
|
252
368
|
- cookbooks/postgresql/.rspec
|
@@ -291,6 +407,54 @@ files:
|
|
291
407
|
- cookbooks/postgresql/test/unit/default_spec.rb
|
292
408
|
- cookbooks/postgresql/test/unit/server_spec.rb
|
293
409
|
- cookbooks/postgresql/test/unit/spec_helper.rb
|
410
|
+
- cookbooks/rsyslog/CHANGELOG.md
|
411
|
+
- cookbooks/rsyslog/README.md
|
412
|
+
- cookbooks/rsyslog/attributes/default.rb
|
413
|
+
- cookbooks/rsyslog/libraries/helpers.rb
|
414
|
+
- cookbooks/rsyslog/metadata.json
|
415
|
+
- cookbooks/rsyslog/providers/file_input.rb
|
416
|
+
- cookbooks/rsyslog/recipes/client.rb
|
417
|
+
- cookbooks/rsyslog/recipes/default.rb
|
418
|
+
- cookbooks/rsyslog/recipes/server.rb
|
419
|
+
- cookbooks/rsyslog/resources/file_input.rb
|
420
|
+
- cookbooks/rsyslog/templates/default/35-server-per-host.conf.erb
|
421
|
+
- cookbooks/rsyslog/templates/default/49-relp.conf.erb
|
422
|
+
- cookbooks/rsyslog/templates/default/49-remote.conf.erb
|
423
|
+
- cookbooks/rsyslog/templates/default/50-default.conf.erb
|
424
|
+
- cookbooks/rsyslog/templates/default/file-input.conf.erb
|
425
|
+
- cookbooks/rsyslog/templates/default/omnios-manifest.xml.erb
|
426
|
+
- cookbooks/rsyslog/templates/default/rsyslog.conf.erb
|
427
|
+
- cookbooks/rsyslog/templates/smartos/50-default.conf.erb
|
428
|
+
- cookbooks/runit/.kitchen.cloud.yml
|
429
|
+
- cookbooks/runit/.kitchen.yml
|
430
|
+
- cookbooks/runit/.rspec
|
431
|
+
- cookbooks/runit/.rubocop.yml
|
432
|
+
- cookbooks/runit/Berksfile.disabled
|
433
|
+
- cookbooks/runit/CHANGELOG.md
|
434
|
+
- cookbooks/runit/CONTRIBUTING.md
|
435
|
+
- cookbooks/runit/Cheffile
|
436
|
+
- cookbooks/runit/Gemfile
|
437
|
+
- cookbooks/runit/LICENSE
|
438
|
+
- cookbooks/runit/README.md
|
439
|
+
- cookbooks/runit/Rakefile
|
440
|
+
- cookbooks/runit/TESTING.md
|
441
|
+
- cookbooks/runit/attributes/default.rb
|
442
|
+
- cookbooks/runit/files/default/runit.seed
|
443
|
+
- cookbooks/runit/files/default/runsvdir
|
444
|
+
- cookbooks/runit/files/ubuntu-6.10/runsvdir
|
445
|
+
- cookbooks/runit/files/ubuntu-7.04/runsvdir
|
446
|
+
- cookbooks/runit/files/ubuntu-7.10/runsvdir
|
447
|
+
- cookbooks/runit/files/ubuntu-8.04/runsvdir
|
448
|
+
- cookbooks/runit/libraries/default.rb
|
449
|
+
- cookbooks/runit/libraries/helpers.rb
|
450
|
+
- cookbooks/runit/libraries/matchers.rb
|
451
|
+
- cookbooks/runit/libraries/provider_runit_service.rb
|
452
|
+
- cookbooks/runit/libraries/resource_runit_service.rb
|
453
|
+
- cookbooks/runit/metadata.json
|
454
|
+
- cookbooks/runit/recipes/default.rb
|
455
|
+
- cookbooks/runit/templates/debian/init.d.erb
|
456
|
+
- cookbooks/runit/templates/default/log-config.erb
|
457
|
+
- cookbooks/runit/templates/gentoo/runit-start.sh.erb
|
294
458
|
- cookbooks/rvm/.foodcritic
|
295
459
|
- cookbooks/rvm/.gitignore
|
296
460
|
- cookbooks/rvm/.kitchen.yml
|
@@ -376,9 +540,12 @@ files:
|
|
376
540
|
- cookbooks/scratchify/lib/from-scratch/version.rb
|
377
541
|
- cookbooks/scratchify/metadata.json
|
378
542
|
- cookbooks/scratchify/recipes/default.rb
|
543
|
+
- cookbooks/scratchify/recipes/nginx_site.rb
|
544
|
+
- cookbooks/scratchify/recipes/pre_rvm.rb
|
379
545
|
- cookbooks/scratchify/spec/from/scratch_spec.rb
|
380
546
|
- cookbooks/scratchify/spec/spec_helper.rb
|
381
547
|
- cookbooks/scratchify/templates/database.yml.erb
|
548
|
+
- cookbooks/scratchify/templates/nginx.erb
|
382
549
|
- cookbooks/scratchify/templates/node.json.erb
|
383
550
|
- cookbooks/scratchify/templates/secrets.yml.erb
|
384
551
|
- cookbooks/scratchify/templates/user.json.erb
|
@@ -398,12 +565,38 @@ files:
|
|
398
565
|
- cookbooks/user/recipes/default.rb
|
399
566
|
- cookbooks/user/resources/account.rb
|
400
567
|
- cookbooks/user/templates/default/authorized_keys.erb
|
568
|
+
- cookbooks/yum-epel/CHANGELOG.md
|
569
|
+
- cookbooks/yum-epel/README.md
|
570
|
+
- cookbooks/yum-epel/attributes/default.rb
|
571
|
+
- cookbooks/yum-epel/attributes/epel-debuginfo.rb
|
572
|
+
- cookbooks/yum-epel/attributes/epel-source.rb
|
573
|
+
- cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb
|
574
|
+
- cookbooks/yum-epel/attributes/epel-testing-source.rb
|
575
|
+
- cookbooks/yum-epel/attributes/epel-testing.rb
|
576
|
+
- cookbooks/yum-epel/attributes/epel.rb
|
577
|
+
- cookbooks/yum-epel/metadata.json
|
578
|
+
- cookbooks/yum-epel/recipes/default.rb
|
579
|
+
- cookbooks/yum/CHANGELOG.md
|
580
|
+
- cookbooks/yum/README.md
|
581
|
+
- cookbooks/yum/attributes/main.rb
|
582
|
+
- cookbooks/yum/libraries/matchers.rb
|
583
|
+
- cookbooks/yum/metadata.json
|
584
|
+
- cookbooks/yum/providers/globalconfig.rb
|
585
|
+
- cookbooks/yum/providers/repository.rb
|
586
|
+
- cookbooks/yum/recipes/default.rb
|
587
|
+
- cookbooks/yum/resources/globalconfig.rb
|
588
|
+
- cookbooks/yum/resources/repository.rb
|
589
|
+
- cookbooks/yum/templates/default/main.erb
|
590
|
+
- cookbooks/yum/templates/default/repo.erb
|
401
591
|
- from-scratch.gemspec
|
402
592
|
- lib/from-scratch.rb
|
403
593
|
- lib/from-scratch/version.rb
|
404
594
|
- metadata.rb
|
405
595
|
- recipes/default.rb
|
596
|
+
- recipes/nginx_site.rb
|
597
|
+
- recipes/pre_rvm.rb
|
406
598
|
- templates/database.yml.erb
|
599
|
+
- templates/nginx.erb
|
407
600
|
- templates/node.json.erb
|
408
601
|
- templates/secrets.yml.erb
|
409
602
|
- templates/user.json.erb
|