capistrano-exfel 0.2.2 → 0.3.0

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +0 -6
  3. data/Gemfile +3 -1
  4. data/README.md +2 -2
  5. data/Rakefile +2 -0
  6. data/capistrano-exfel.gemspec +5 -3
  7. data/capistrano.graph +86 -56
  8. data/capistrano.png +0 -0
  9. data/lib/capistrano/exfel.rb +2 -0
  10. data/lib/capistrano/exfel/co7.rb +3 -3
  11. data/lib/capistrano/exfel/version.rb +3 -1
  12. data/lib/capistrano/recipes/{co7 → apache}/00-passenger.conf +0 -0
  13. data/lib/capistrano/recipes/{ub14/apache.conf → apache/app_ssl.conf} +11 -4
  14. data/lib/capistrano/recipes/{co7 → apache}/httpd.conf +6 -0
  15. data/lib/capistrano/recipes/apache/ssl.conf +49 -0
  16. data/lib/capistrano/tasks/apache.rake +268 -0
  17. data/lib/capistrano/tasks/app_home.rake +2 -0
  18. data/lib/capistrano/tasks/application.rake +2 -0
  19. data/lib/capistrano/tasks/assets.rake +2 -0
  20. data/lib/capistrano/tasks/database.rake +2 -0
  21. data/lib/capistrano/tasks/secrets.rake +2 -0
  22. data/lib/capistrano/tasks/util.rake +2 -0
  23. metadata +14 -26
  24. data/lib/capistrano/exfel/sl6.rb +0 -21
  25. data/lib/capistrano/exfel/ub14.rb +0 -20
  26. data/lib/capistrano/recipes/apache_http.conf +0 -46
  27. data/lib/capistrano/recipes/apache_ssl.conf +0 -252
  28. data/lib/capistrano/recipes/co7/apache_http.conf +0 -7
  29. data/lib/capistrano/recipes/co7/apache_ssl.conf +0 -66
  30. data/lib/capistrano/recipes/ub14/passenger.conf +0 -6
  31. data/lib/capistrano/tasks/apache_co7.rake +0 -133
  32. data/lib/capistrano/tasks/apache_common.rake +0 -75
  33. data/lib/capistrano/tasks/apache_rpm.rake +0 -50
  34. data/lib/capistrano/tasks/apache_sl6.rake +0 -241
  35. data/lib/capistrano/tasks/apache_ub14.rake +0 -116
@@ -1,116 +0,0 @@
1
- # apache tasks specific to Ubuntu 14
2
-
3
- namespace :apache do
4
- desc 'Configure Apache (httpd) and restart it'
5
- task :configure_and_start do
6
- invoke 'apache:configure'
7
- # invoke 'apache:restart'
8
- # invoke 'apache:secure_apache' # This should go to Puppet
9
- invoke 'apache:create_symbolic_link'
10
- end
11
-
12
- desc 'Restart Apache (apache2) service'
13
- task :restart do
14
- on roles(:web) do
15
- sudo_cmd = "echo #{fetch(:password)} | sudo -S"
16
-
17
- debug '#' * 50
18
-
19
- debug 'service apache2 stop'
20
- execute "#{sudo_cmd} service apache2 stop"
21
-
22
- debug 'pkill -9 apache2 || true'
23
- execute "#{sudo_cmd} pkill -9 apache2 || true"
24
-
25
- debug 'service apache2 start'
26
- execute "#{sudo_cmd} service apache2 start"
27
-
28
- info 'Restarted Apache (apache2) service'
29
- debug '#' * 50
30
- end
31
- end
32
-
33
- desc 'Configure Apache configuration files'
34
- task :configure do
35
- invoke 'apache:create_apache_shared_folder'
36
- invoke 'apache:configure_apache_modules'
37
- invoke 'apache:configure_app_conf_file'
38
- end
39
-
40
- desc 'Configure (HTTP) Apache modules'
41
- task :configure_apache_modules do
42
- on roles(:app) do
43
- sudo_cmd = "echo #{fetch(:password)} | sudo -S"
44
-
45
- debug '#' * 50
46
- debug 'Configure (HTTP) Apache Passenger module'
47
-
48
- set :shared_passenger_file, "#{fetch(:shared_apache_path)}/passenger.conf"
49
- passenger_file = File.expand_path('../recipes/ub14/passenger.conf', __dir__)
50
-
51
- upload! StringIO.new(File.read(passenger_file)), fetch(:shared_passenger_file).to_s
52
-
53
- debug "chmod g+w #{fetch(:shared_passenger_file)}"
54
- execute "chmod g+w #{fetch(:shared_passenger_file)}"
55
-
56
- passenger_root = get_command_output('/usr/local/rvm/bin/rvm default do passenger-config --root')
57
- ruby_path = "/#{passenger_root.split('/')[1..5].join('/')}/wrappers/ruby"
58
-
59
- debug "sed -i 's|<<PASSENGER_ROOT>>|#{passenger_root}|g' #{fetch(:shared_passenger_file)}"
60
- execute "sed -i 's|<<PASSENGER_ROOT>>|#{passenger_root}|g' #{fetch(:shared_passenger_file)}"
61
- execute "sed -i 's|<<RUBY_PATH>>|#{ruby_path}|g' #{fetch(:shared_passenger_file)}"
62
-
63
- execute "#{sudo_cmd} ln -sfn #{fetch(:shared_passenger_file)} /etc/apache2/mods-enabled/"
64
-
65
- debug '#' * 50
66
- end
67
- end
68
-
69
- # desc 'Configure (HTTP) Apache Application configuration files'
70
- task :configure_app_conf_file do
71
- on roles(:app), in: :sequence do
72
- sudo_cmd = "echo #{fetch(:password)} | sudo -S"
73
-
74
- debug '#' * 50
75
- debug 'Configure (HTTP) Apache Application configuration files'
76
-
77
- set :shared_apache_conf_file, "#{fetch(:shared_apache_path)}/app_#{fetch(:app_name_uri)}.conf"
78
- http_file = File.expand_path('../recipes/ub14/apache.conf', __dir__)
79
- upload! StringIO.new(File.read(http_file)), fetch(:shared_apache_conf_file).to_s
80
-
81
- debug "chmod g+w #{fetch(:shared_apache_conf_file)}"
82
- execute "chmod g+w #{fetch(:shared_apache_conf_file)}"
83
-
84
- execute "sed -i 's|<<APPLICATION_NAME>>|#{fetch(:app_name_uri)}|g' #{fetch(:shared_apache_conf_file)}"
85
- execute "sed -i 's/<<ENVIRONMENT>>/#{fetch(:environment)}/g' #{fetch(:shared_apache_conf_file)}"
86
-
87
- execute "#{sudo_cmd} ln -sfn #{fetch(:shared_apache_conf_file)} /etc/apache2/sites-enabled/"
88
-
89
- debug '#' * 50
90
- end
91
- end
92
-
93
- # desc 'Configure (HTTPS) Apache Application configuration files'
94
- # task :configure_app_ssl_conf_file do
95
- # on roles(:app), in: :sequence do
96
- # sudo_cmd = "echo #{fetch(:password)} | sudo -S"
97
- #
98
- # debug '#' * 50
99
- # debug 'Configure (HTTPS) Apache Application configuration files'
100
- #
101
- # set :shared_apache_conf_ssl_file, "#{fetch(:shared_apache_path)}/app_#{fetch(:app_name_uri)}_ssl.conf"
102
- # http_ssl_file = File.expand_path('../recipes/co7/apache_ssl.conf', __dir__)
103
- # upload! StringIO.new(File.read(http_ssl_file)), fetch(:shared_apache_conf_ssl_file).to_s
104
- #
105
- # debug "chmod g+w #{fetch(:shared_apache_conf_ssl_file)}"
106
- # execute "chmod g+w #{fetch(:shared_apache_conf_ssl_file)}"
107
- #
108
- # execute "sed -i 's/<<APPLICATION_NAME>>/#{fetch(:app_name_uri)}/g' #{fetch(:shared_apache_conf_ssl_file)}"
109
- # execute "sed -i 's/<<ENVIRONMENT>>/#{fetch(:environment)}/g' #{fetch(:shared_apache_conf_ssl_file)}"
110
- #
111
- # execute "#{sudo_cmd} ln -sfn #{fetch(:shared_apache_conf_ssl_file)} /etc/httpd/conf.d/"
112
- #
113
- # debug '#' * 50
114
- # end
115
- # end
116
- end