capistrano-exfel 0.0.11 → 0.0.12
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/capistrano-exfel.gemspec +2 -2
- data/lib/capistrano/exfel/version.rb +1 -1
- data/lib/capistrano/recipes/apache_ssl.conf +1 -1
- data/lib/capistrano/recipes/config/secrets_example.yml +9 -12
- data/lib/capistrano/tasks/apache.rake +3 -0
- data/lib/capistrano/tasks/app_home.rake +3 -3
- data/lib/capistrano/tasks/application.rake +3 -2
- data/lib/capistrano/tasks/secrets.rake +5 -0
- data/lib/capistrano/tasks/util.rake +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0aeb56d864c2efec5a15953a2e03ab05cf58d5d
|
4
|
+
data.tar.gz: b1cdba8f0060048df9888c6ce8f0a6a4e14a4db6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97969e02f112478c14c8dcc2c64b7bdae59dc6298bf8e27d51c1ab797f43600966a96a2f48c828c507edbb86fab2d28fcfe3e2c304a3b53fe7da90d610e13944
|
7
|
+
data.tar.gz: a8a33bc5d7db59f500662c6a30a1951b067af03c7ffaa6a61b151c9dcbbd822a3cc8277ce7d711f5d43f3cd1b480daac64c31ed03f524f68632da5325ced0ed6
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Add these lines to your application's Gemfile:
|
|
12
12
|
gem 'capistrano', '~> 3.4.0'
|
13
13
|
gem 'capistrano-rails', '~> 1.1.2'
|
14
14
|
gem 'capistrano-rvm', '~> 0.1.2'
|
15
|
-
gem 'capistrano-exfel', '~> 0.0.
|
15
|
+
gem 'capistrano-exfel', '~> 0.0.12'
|
16
16
|
|
17
17
|
And then execute:
|
18
18
|
|
@@ -75,7 +75,7 @@ The most important configurable options and their defaults:options can be added
|
|
75
75
|
set :app_name, 'my_app_name' # If not specified will ask for it
|
76
76
|
|
77
77
|
# Set application related information
|
78
|
-
# set :app_domain, 'https://
|
78
|
+
# set :app_domain, 'https://domain.com/'
|
79
79
|
# set :app_name_uri, 'my_app_uri'
|
80
80
|
|
81
81
|
# Set git repository information
|
data/capistrano-exfel.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Capistrano::Exfel::VERSION
|
9
9
|
spec.authors = ['Luis Maia']
|
10
10
|
spec.email = ['luisgoncalo.maia@gmail.com']
|
11
|
-
spec.summary = 'Deploy Ruby on Rails 4 Applications in
|
12
|
-
spec.description = 'Deployment of Ruby on Rails 4 Applications in
|
11
|
+
spec.summary = 'Deploy Ruby on Rails 4 Applications in EXFEL Virtual Machines'
|
12
|
+
spec.description = 'Deployment of Ruby on Rails 4 Applications in EXFEL Virtual Machines ' \
|
13
13
|
'(Scientific Linux + Apache + RVM + Phusion Passenger) using Capistrano3 and Kerberos'
|
14
14
|
spec.homepage = ''
|
15
15
|
spec.license = 'MIT'
|
@@ -75,7 +75,7 @@ SSLCryptoDevice builtin
|
|
75
75
|
|
76
76
|
# General setup for the virtual host, inherited from global configuration
|
77
77
|
DocumentRoot "/var/www/html"
|
78
|
-
ServerName
|
78
|
+
ServerName <<SERVER_NAME>>
|
79
79
|
|
80
80
|
# Use separate log files for the SSL virtual host; note that LogLevel
|
81
81
|
# is not inherited from httpd.conf.
|
@@ -15,32 +15,29 @@ defaults: &defaults
|
|
15
15
|
secret_key_base: '___secret_that_must_be_replaced_after_deploy___'
|
16
16
|
|
17
17
|
# Application name
|
18
|
-
app_name: '
|
18
|
+
app_name: '<<APP_NAME>>'
|
19
19
|
|
20
|
-
# Domain where the application is available including the http(s) protocol (e.g.
|
20
|
+
# Domain where the application is available including the http(s) protocol (e.g. <<APP_DOMAIN>>)
|
21
21
|
# Note that the final '/' character is mandatory
|
22
22
|
# Examples:
|
23
23
|
# * 'http://localhost:3000/' - The application is available under 'localhost'
|
24
|
-
# * 'https://
|
25
|
-
site_domain: '
|
26
|
-
#site_domain: 'https://in.xfel.eu/'
|
24
|
+
# * 'https://example.com/' - The application is available under a server RackBaseURI
|
25
|
+
site_domain: '<<APP_DOMAIN>>'
|
27
26
|
|
28
27
|
# Sub domain where the application is available (e.g. my_app)
|
29
28
|
# Examples:
|
30
29
|
# * "" - The application is available under '/' (the server root)
|
31
30
|
# * '/my_app' - The application is available under '/my_app'
|
32
|
-
app_sub_domain_uri: '
|
33
|
-
#app_sub_domain_uri: ""
|
31
|
+
app_sub_domain_uri: '/<<APP_NAME_URI>>' # guarantee that the leading slash is there if value isn't an empty String
|
34
32
|
|
35
33
|
# Sub domain to be applied to the Router
|
36
34
|
# Examples:
|
37
35
|
# * "" - The application URI routing is done via HTTP Server (e.g. Apache or NGINX)
|
38
36
|
# * 'my_app' - The application URI routing must be done via code
|
39
|
-
routes_base_uri: '
|
40
|
-
#routes_base_uri: ""
|
37
|
+
routes_base_uri: '<<APP_NAME_URI>>'
|
41
38
|
|
42
|
-
# Application full url to be used as config.action_mailer.default_url_options (e.g. https://
|
43
|
-
app_full_url: '
|
39
|
+
# Application full url to be used as config.action_mailer.default_url_options (e.g. https://example.com/my_app)
|
40
|
+
app_full_url: '<<APP_FULL_URL>>'
|
44
41
|
|
45
42
|
# Google Analytics code
|
46
43
|
google_analytics_code: 'UA-XXXXXXXX-Y'
|
@@ -92,7 +89,7 @@ defaults: &defaults
|
|
92
89
|
facebook_app_secret: ""
|
93
90
|
github_app_id: ""
|
94
91
|
github_app_secret: ""
|
95
|
-
kerberos_title: '
|
92
|
+
kerberos_title: 'XFEL'
|
96
93
|
|
97
94
|
#
|
98
95
|
development:
|
@@ -131,6 +131,9 @@ namespace :apache do
|
|
131
131
|
debug "chmod g+w #{fetch(:shared_apache_conf_ssl_file)}"
|
132
132
|
execute "chmod g+w #{fetch(:shared_apache_conf_ssl_file)}"
|
133
133
|
|
134
|
+
server_name = string_between_markers(fetch(:app_domain), '://', '/')
|
135
|
+
|
136
|
+
execute "sed -i 's/<<SERVER_NAME>>/#{server_name}/g' #{fetch(:shared_apache_conf_ssl_file)}"
|
134
137
|
execute "sed -i 's/<<APPLICATION_NAME>>/#{fetch(:app_name_uri)}/g' #{fetch(:shared_apache_conf_ssl_file)}"
|
135
138
|
execute "sed -i 's/<<ENVIRONMENT>>/#{fetch(:environment)}/g' #{fetch(:shared_apache_conf_ssl_file)}"
|
136
139
|
|
@@ -131,8 +131,8 @@ namespace :app_home do
|
|
131
131
|
task :reload_server_cache do
|
132
132
|
on roles(:app), in: :sequence, wait: 5 do
|
133
133
|
debug '#' * 100
|
134
|
-
debug "wget -v -p --spider
|
135
|
-
execute :wget, "-v -p --spider
|
134
|
+
debug "wget -v -p --spider #{fetch(:app_domain)}#{fetch(:app_name_uri)}"
|
135
|
+
execute :wget, "-v -p --spider #{fetch(:app_domain)}#{fetch(:app_name_uri)}"
|
136
136
|
debug 'Application visited successfully...'
|
137
137
|
debug '#' * 100
|
138
138
|
end
|
@@ -143,7 +143,7 @@ namespace :app_home do
|
|
143
143
|
info '#' * 100
|
144
144
|
info '#' * 10 + ' => Application Successfully deployed...'
|
145
145
|
info '#' * 100
|
146
|
-
info '#' * 10 + " => visit:
|
146
|
+
info '#' * 10 + " => visit: #{fetch(:app_domain)}#{fetch(:app_name_uri)}"
|
147
147
|
info '#' * 100
|
148
148
|
end
|
149
149
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# EXFEL application specific tasks
|
2
2
|
namespace :application do
|
3
3
|
# Task 'application:deploy_first_time' deploys an application for the first time in the configured server(s).
|
4
4
|
# This task besides deploying the application also make all the necessary configurations
|
@@ -97,7 +97,8 @@ namespace :load do
|
|
97
97
|
|
98
98
|
# Set application related information
|
99
99
|
set :app_domain, -> do
|
100
|
-
ask('Please specify the application domain (i.e. https://
|
100
|
+
ask('Please specify the application domain with an "/" at the end (i.e. https://example.com/)',
|
101
|
+
'https://example.com/')
|
101
102
|
end
|
102
103
|
|
103
104
|
# Build default application URI
|
@@ -35,6 +35,11 @@ namespace :secrets do
|
|
35
35
|
upload! StringIO.new(File.read("#{fetch(:secrets_original_file_path)}")), "#{fetch(:secrets_file_path)}"
|
36
36
|
end
|
37
37
|
|
38
|
+
execute "sed -i 's/<<APP_NAME>>/#{fetch(:app_name)}/g' #{fetch(:secrets_file_path)}"
|
39
|
+
execute "sed -i 's/<<APP_DOMAIN>>/#{fetch(:app_domain)}/g' #{fetch(:secrets_file_path)}"
|
40
|
+
execute "sed -i 's/<<APP_NAME_URI>>/#{fetch(:app_name_uri)}/g' #{fetch(:secrets_file_path)}"
|
41
|
+
execute "sed -i 's/<<APP_FULL_URL>>/#{fetch(:app_full_url)}/g' #{fetch(:secrets_file_path)}"
|
42
|
+
|
38
43
|
debug '#' * 50
|
39
44
|
end
|
40
45
|
end
|
@@ -39,6 +39,10 @@ def execute_rake_command(task)
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
def string_between_markers(complete_str, marker1, marker2)
|
43
|
+
complete_str[/#{Regexp.escape(marker1)}(.*?)#{Regexp.escape(marker2)}/m, 1]
|
44
|
+
end
|
45
|
+
|
42
46
|
namespace :util do
|
43
47
|
desc 'Report Server Uptimes'
|
44
48
|
task :uptime do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-exfel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis Maia
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
description: Deployment of Ruby on Rails 4 Applications in
|
41
|
+
description: Deployment of Ruby on Rails 4 Applications in EXFEL Virtual Machines
|
42
42
|
(Scientific Linux + Apache + RVM + Phusion Passenger) using Capistrano3 and Kerberos
|
43
43
|
email:
|
44
44
|
- luisgoncalo.maia@gmail.com
|
@@ -91,5 +91,5 @@ rubyforge_project:
|
|
91
91
|
rubygems_version: 2.4.6
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
|
-
summary: Deploy Ruby on Rails 4 Applications in
|
94
|
+
summary: Deploy Ruby on Rails 4 Applications in EXFEL Virtual Machines
|
95
95
|
test_files: []
|