kompanee-recipes 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
33
33
|
set :rvm_gemdir, "#{user_home}/.rvm/gems/#{app_ruby_version}"
|
|
34
34
|
|
|
35
35
|
virutal_host_config = <<-VHOST
|
|
36
|
-
<VirtualHost #{web_server_ip}:
|
|
36
|
+
<VirtualHost #{web_server_ip}:443>
|
|
37
37
|
ServerName #{deploy_name}
|
|
38
38
|
DocumentRoot #{deploy_to}/current/public
|
|
39
39
|
|
|
@@ -41,6 +41,10 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
41
41
|
SetEnv GEM_PATH #{rvm_gemdir}@#{application_safe}:#{rvm_gemdir}@global:#{rvm_gemdir}
|
|
42
42
|
SetEnv BUNDLE_PATH #{rvm_gemdir}@#{application_safe}
|
|
43
43
|
|
|
44
|
+
SSLEngine on
|
|
45
|
+
SSLCertificateFile /etc/ssl/certs/thekompanee.crt
|
|
46
|
+
SSLCertificateKeyFile /etc/ssl/certs/thekompanee.key
|
|
47
|
+
|
|
44
48
|
<Directory "#{deploy_to}/current/public">
|
|
45
49
|
Options FollowSymLinks -MultiViews
|
|
46
50
|
AllowOverride all
|
|
@@ -57,6 +61,12 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
57
61
|
CustomLog /var/log/apache2/#{application}-access.log combined
|
|
58
62
|
ServerSignature On
|
|
59
63
|
</VirtualHost>
|
|
64
|
+
|
|
65
|
+
<VirtualHost 174.143.210.66:80>
|
|
66
|
+
ServerName #{deploy_name}
|
|
67
|
+
|
|
68
|
+
Redirect permanent/https://#{deploy_name}
|
|
69
|
+
</VirtualHost>
|
|
60
70
|
VHOST
|
|
61
71
|
|
|
62
72
|
sudo "a2enmod rewrite"
|
|
@@ -25,6 +25,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
25
25
|
ubuntu.package_manager.update
|
|
26
26
|
ubuntu.development_tools.install_common
|
|
27
27
|
ubuntu.apache.install
|
|
28
|
+
ubuntu.apache.modules.ssl.install
|
|
28
29
|
ubuntu.development_tools.install_php5
|
|
29
30
|
ubuntu.vc.install_subversion
|
|
30
31
|
ubuntu.vc.install_git
|
|
@@ -122,12 +123,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
122
123
|
|
|
123
124
|
desc "Install phpMyAdmin"
|
|
124
125
|
task :install_phpmyadmin, :roles => [:ubuntu, :db] do
|
|
126
|
+
set(:phpmyadmin_password) {Capistrano::CLI.password_prompt("Password For phpMyAdmin: ")}
|
|
127
|
+
|
|
125
128
|
phpmyadmin_install_answers = <<-INSTALLANSWERS
|
|
126
|
-
phpmyadmin phpmyadmin/app-password-confirm select
|
|
129
|
+
phpmyadmin phpmyadmin/app-password-confirm select #{phpmyadmin_password}
|
|
127
130
|
phpmyadmin phpmyadmin/mysql/admin-pass select #{db_root_password}
|
|
128
|
-
phpmyadmin phpmyadmin/password-confirm select
|
|
129
|
-
phpmyadmin phpmyadmin/setup-password select
|
|
130
|
-
phpmyadmin phpmyadmin/mysql/app-pass select
|
|
131
|
+
phpmyadmin phpmyadmin/password-confirm select #{phpmyadmin_password}
|
|
132
|
+
phpmyadmin phpmyadmin/setup-password select #{phpmyadmin_password}
|
|
133
|
+
phpmyadmin phpmyadmin/mysql/app-pass select #{phpmyadmin_password}
|
|
131
134
|
phpmyadmin phpmyadmin/reconfigure-webserver select apache2
|
|
132
135
|
phpmyadmin phpmyadmin/dbconfig-install boolean true
|
|
133
136
|
INSTALLANSWERS
|
|
@@ -213,6 +216,20 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
213
216
|
end
|
|
214
217
|
|
|
215
218
|
namespace :modules do
|
|
219
|
+
namespace :ssl do
|
|
220
|
+
desc "Install SSL Module"
|
|
221
|
+
task :install, :roles => [:ubuntu, :web, :apache] do
|
|
222
|
+
certs_dir = "/etc/ssl/certs"
|
|
223
|
+
|
|
224
|
+
sudo "a2enmod ssl"
|
|
225
|
+
sudo %Q{bash -c "openssl genrsa 2048 > #{certs_dir}/thekompanee.key"}
|
|
226
|
+
sudo %Q{bash -c "openssl req -new -x509 -days 3650 -subj '/C=US/ST=Tennessee/L=Nashville/O=The Kompanee/CN=*.thekompanee.com/emailAddress=webmaster@thekompanee.com' -key #{certs_dir}/thekompanee.key > #{certs_dir}/thekompanee.crt"}
|
|
227
|
+
sudo %Q{bash -c "openssl x509 -noout -fingerprint -text < #{certs_dir}/thekompanee.crt > #{certs_dir}/thekompanee.info"}
|
|
228
|
+
sudo %Q{bash -c "cat #{certs_dir}/thekompanee.crt #{certs_dir}/thekompanee.key > #{certs_dir}/thekompanee.pem"}
|
|
229
|
+
sudo "chmod 400 #{certs_dir}/thekompanee.pem #{certs_dir}/thekompanee.key"
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
216
233
|
namespace :passenger do
|
|
217
234
|
desc "Install Passenger Module"
|
|
218
235
|
task :install, :roles => [:ubuntu, :web, :apache] do
|
data/lib/kompanee-recipes.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kompanee-recipes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 15
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 8
|
|
10
|
+
version: 0.0.8
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- The Kompanee
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-06-
|
|
18
|
+
date: 2010-06-30 00:00:00 -05:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|