luban-nginx 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/luban-nginx.rb +0 -0
- data/lib/luban/deployment/packages/nginx.rb +7 -0
- data/lib/luban/deployment/packages/nginx/base.rb +54 -0
- data/lib/luban/deployment/packages/nginx/configurator.rb +47 -0
- data/lib/luban/deployment/packages/nginx/controller.rb +75 -0
- data/lib/luban/deployment/packages/nginx/installer.rb +52 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.conf.erb +20 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.http.conf +43 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.http.proxy.conf +46 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.logrotate.erb +18 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.main.conf +9 -0
- data/lib/luban/deployment/packages/nginx/templates/nginx.monitrc.erb +15 -0
- data/lib/luban/deployment/packages/nginx/version.rb +9 -0
- data/lib/luban/deployment/packages/pcre.rb +32 -0
- data/lib/luban/nginx.rb +1 -0
- data/luban-nginx.gemspec +28 -0
- metadata +125 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d56320d742c77de9f7c3f5940849211f958500de
|
4
|
+
data.tar.gz: 74ffd91524d3a5b4f8789d12bf16abbcabc43166
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a446438849629953e9d6cbc3f31fe566e28fe1d48084dcdb03fbf4ef9293b618729d9d97bfbe9430492a159a5d327e611aef3f0753ba612a6d6abbb4546acaff
|
7
|
+
data.tar.gz: d8f32737378e85caf57457340280bf81825660670e50002f7730bc3871f3a5a571f4f25eb292cbdb25c59aa1c18c9794e36c3267f5119fe56af331c63a03ce50
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Chi Man Lei
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Luban::Nginx
|
2
|
+
|
3
|
+
Luban deployment package to manage Nginx installation, deployment and control
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'luban-nginx'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install luban-nginx
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
|
+
|
29
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nginx. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
34
|
+
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
39
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "luban/nginx"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/luban-nginx.rb
ADDED
File without changes
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Luban
|
2
|
+
module Deployment
|
3
|
+
module Packages
|
4
|
+
class Nginx < Luban::Deployment::Service::Base
|
5
|
+
apply_to :all do
|
6
|
+
before_install do
|
7
|
+
depend_on 'pcre', version: '8.38'
|
8
|
+
depend_on 'openssl', version: '1.0.2h'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def default_templates_path
|
13
|
+
@default_templates_path ||= Pathname.new(File.join(File.dirname(__FILE__), 'templates')).realpath
|
14
|
+
end
|
15
|
+
|
16
|
+
%i(config_test quit_process reload_process reopen_logs).each do |action|
|
17
|
+
service_action action, dispatch_to: :controller
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def setup_install_tasks
|
23
|
+
super
|
24
|
+
commands[:install].option :pcre, "PCRE version"
|
25
|
+
commands[:install].option :openssl, "OpenSSL version"
|
26
|
+
end
|
27
|
+
|
28
|
+
def setup_control_tasks
|
29
|
+
super
|
30
|
+
|
31
|
+
task :config_test do
|
32
|
+
desc "Syntax check on config file"
|
33
|
+
action! :config_test
|
34
|
+
end
|
35
|
+
|
36
|
+
task :quit do
|
37
|
+
desc "Stop process gracefully"
|
38
|
+
action! :quit_process
|
39
|
+
end
|
40
|
+
|
41
|
+
task :reload do
|
42
|
+
desc "Reload process"
|
43
|
+
action! :reload_process
|
44
|
+
end
|
45
|
+
|
46
|
+
task :reopen do
|
47
|
+
desc "Reopen log files"
|
48
|
+
action! :reopen_logs
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Luban
|
2
|
+
module Deployment
|
3
|
+
module Packages
|
4
|
+
class Nginx
|
5
|
+
class Configurator < Luban::Deployment::Service::Configurator
|
6
|
+
module Paths
|
7
|
+
def bin_path
|
8
|
+
@bin_path ||= install_path.join('sbin')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
include Paths
|
13
|
+
|
14
|
+
def error_log_file_path
|
15
|
+
@error_log_file_path ||= log_path.join(error_log_file_name)
|
16
|
+
end
|
17
|
+
|
18
|
+
def error_log_file_name
|
19
|
+
@error_log_file_name ||= "#{service_name}.error.log"
|
20
|
+
end
|
21
|
+
|
22
|
+
def log_file_name
|
23
|
+
@log_file_name ||= "#{service_name}.access.log"
|
24
|
+
end
|
25
|
+
|
26
|
+
alias_method :access_log_file_path, :log_file_path
|
27
|
+
alias_method :access_log_file_name, :log_file_name
|
28
|
+
|
29
|
+
def mime_types_file_path
|
30
|
+
@mime_types_file_path ||=
|
31
|
+
if file?(stage_profile_path.join(mime_types_file_name))
|
32
|
+
profile_path.join(mime_types_file_name)
|
33
|
+
else
|
34
|
+
#Pathname.new('conf').join(mime_types_file_name)
|
35
|
+
current_path.join('conf').join(mime_types_file_name)
|
36
|
+
#install_path.join('conf').join(mime_types_file_name)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def mime_types_file_name
|
41
|
+
@mime_types_file_name ||= 'mime.types'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Luban
|
2
|
+
module Deployment
|
3
|
+
module Packages
|
4
|
+
class Nginx
|
5
|
+
class Controller < Luban::Deployment::Service::Controller
|
6
|
+
include Configurator::Paths
|
7
|
+
|
8
|
+
default_executable 'nginx'
|
9
|
+
|
10
|
+
def nginx_command
|
11
|
+
@nginx_command ||= "#{nginx_executable} -c #{control_file_path}"
|
12
|
+
end
|
13
|
+
alias_method :process_pattern, :nginx_command
|
14
|
+
|
15
|
+
def config_test
|
16
|
+
update_result config_test!
|
17
|
+
end
|
18
|
+
|
19
|
+
def quit_process
|
20
|
+
if process_stopped?
|
21
|
+
update_result "Skipped! Already stopped #{package_full_name}", status: :skipped
|
22
|
+
return
|
23
|
+
end
|
24
|
+
|
25
|
+
output = quit_process!
|
26
|
+
if check_until { process_stopped? }
|
27
|
+
unmonitor_process
|
28
|
+
update_result "Gracefully stop #{package_full_name}: [OK] #{output}"
|
29
|
+
else
|
30
|
+
remove_orphaned_pid_file
|
31
|
+
update_result "Gracefully stop #{package_full_name}: [FAILED] #{output}",
|
32
|
+
status: :failed, level: :error
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def before_quit; unmonitor_process; end
|
37
|
+
|
38
|
+
def reload_process
|
39
|
+
update_result reload_process!
|
40
|
+
end
|
41
|
+
|
42
|
+
def reopen_logs
|
43
|
+
update_result reopen_logs!
|
44
|
+
end
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
def config_test!
|
49
|
+
capture("#{nginx_command} -t 2>&1")
|
50
|
+
end
|
51
|
+
|
52
|
+
def start_process!
|
53
|
+
capture("#{nginx_command} 2>&1")
|
54
|
+
end
|
55
|
+
|
56
|
+
def quit_process!
|
57
|
+
capture("#{nginx_command} -s quit 2>&1")
|
58
|
+
end
|
59
|
+
|
60
|
+
def stop_process!
|
61
|
+
capture("#{nginx_command} -s stop 2>&1")
|
62
|
+
end
|
63
|
+
|
64
|
+
def reload_process!
|
65
|
+
capture("#{nginx_command} -s reload 2>&1")
|
66
|
+
end
|
67
|
+
|
68
|
+
def reopen_logs!
|
69
|
+
capture("#{nginx_command} -s reopen 2>&1")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Luban
|
2
|
+
module Deployment
|
3
|
+
module Packages
|
4
|
+
class Nginx
|
5
|
+
class Installer < Luban::Deployment::Service::Installer
|
6
|
+
include Configurator::Paths
|
7
|
+
|
8
|
+
default_executable 'nginx'
|
9
|
+
|
10
|
+
def source_repo
|
11
|
+
@source_repo ||= "http://nginx.org"
|
12
|
+
end
|
13
|
+
|
14
|
+
def source_url_root
|
15
|
+
@source_url_root ||= "download"
|
16
|
+
end
|
17
|
+
|
18
|
+
def installed?
|
19
|
+
return false unless file?(nginx_executable)
|
20
|
+
pattern = "nginx version: nginx/#{package_major_version}"
|
21
|
+
match?("#{nginx_executable} -v 2>&1", pattern)
|
22
|
+
end
|
23
|
+
|
24
|
+
def with_opt_dir(dir)
|
25
|
+
@cc_opts << "-I #{dir.join('include')}"
|
26
|
+
@ld_opts << "-L #{dir.join('lib')} -Wl,-rpath,#{dir.join('lib')}"
|
27
|
+
end
|
28
|
+
alias_method :with_pcre_dir, :with_opt_dir
|
29
|
+
alias_method :with_openssl_dir, :with_opt_dir
|
30
|
+
|
31
|
+
protected
|
32
|
+
|
33
|
+
def configure_build_options
|
34
|
+
super
|
35
|
+
@configure_opts.unshift('--with-http_stub_status_module')
|
36
|
+
@configure_opts.unshift('--with-stream')
|
37
|
+
@configure_opts.unshift('--with-http_ssl_module')
|
38
|
+
@configure_opts.unshift('--with-http_gzip_static_module')
|
39
|
+
@cc_opts = []
|
40
|
+
@ld_opts = []
|
41
|
+
end
|
42
|
+
|
43
|
+
def compose_build_options
|
44
|
+
@configure_opts << "--with-cc-opt=\"#{@cc_opts.join(' ')}\""
|
45
|
+
@configure_opts << "--with-ld-opt=\"#{@ld_opts.join(' ')}\""
|
46
|
+
super
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Nginx master configuration file
|
2
|
+
|
3
|
+
# Environment: <%= env_name %>
|
4
|
+
# Revision: <%= revision %>
|
5
|
+
# Created at <%= now %>
|
6
|
+
|
7
|
+
pid <%= pid_file_path %>;
|
8
|
+
error_log <%= error_log_file_path %> info;
|
9
|
+
|
10
|
+
include <%= profile_path.join('nginx.main.conf') %>;
|
11
|
+
|
12
|
+
http {
|
13
|
+
include <%= mime_types_file_path %>;
|
14
|
+
include <%= profile_path.join('nginx.http.conf') %>;
|
15
|
+
include <%= profile_path.join('nginx.http.*.conf') %>;
|
16
|
+
|
17
|
+
access_log <%= access_log_file_path %> main;
|
18
|
+
}
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# This section configures Nginx http context
|
2
|
+
|
3
|
+
# Basic Settings
|
4
|
+
# -------------------------------------
|
5
|
+
default_type application/octet-stream;
|
6
|
+
|
7
|
+
sendfile on;
|
8
|
+
client_max_body_size 5M;
|
9
|
+
|
10
|
+
# tcp_nopush causes nginx to attempt to send its HTTP response header
|
11
|
+
# in one package instead of using partial frames. This is useful for
|
12
|
+
# prepending headers before calling sendfile, or for throughput optimization
|
13
|
+
tcp_nopush on;
|
14
|
+
|
15
|
+
# Do not buffer data-sends (disable Nagle algorithm).
|
16
|
+
# Good for sending frequent small bursts of data in real time
|
17
|
+
tcp_nodelay on;
|
18
|
+
|
19
|
+
# Gzip Settings
|
20
|
+
# -------------------------------------
|
21
|
+
gzip on;
|
22
|
+
gzip_http_version 1.1;
|
23
|
+
gzip_proxied any;
|
24
|
+
gzip_min_length 500;
|
25
|
+
gzip_disable "MSIE [1-6]\.";
|
26
|
+
gzip_types text/plain text/xml text/css text/javascript
|
27
|
+
application/json application/xml
|
28
|
+
application/javascript application/x-javascript
|
29
|
+
application/rss+xml application/atom+xml;
|
30
|
+
|
31
|
+
# Proxy Settings
|
32
|
+
# -------------------------------------
|
33
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
34
|
+
proxy_set_header X-Real-IP $remote_addr;
|
35
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
36
|
+
proxy_set_header Host $http_host;
|
37
|
+
proxy_redirect off;
|
38
|
+
|
39
|
+
# Access Log Settings
|
40
|
+
# -------------------------------------
|
41
|
+
log_format main '$remote_addr - $remote_user [$time_local] $status '
|
42
|
+
'"$request" $body_bytes_sent "$http_referer" '
|
43
|
+
'"$http_user_agent" "$http_x_forwarded_for" "$request_time"';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Nginx reverse proxy configuration
|
2
|
+
|
3
|
+
# Environment: <%= env_name %>
|
4
|
+
# Revision: <%= revision %>
|
5
|
+
# Created at <%= now %>
|
6
|
+
|
7
|
+
upstream <%= serivce_entry %> {
|
8
|
+
# fail_timeout=0 means we always retry an upstream even if it failed
|
9
|
+
# to return a good HTTP response (in case the Puma master nukes a
|
10
|
+
# single worker for timing out).
|
11
|
+
|
12
|
+
# for UNIX domain socket setups:
|
13
|
+
# server unix:<%= ruby_socket_file %> fail_timeout=0;
|
14
|
+
|
15
|
+
# for TCP setups, point these to the backend servers
|
16
|
+
# server 192.168.0.7:<%= tcp_port %> fail_timeout=0;
|
17
|
+
# server 192.168.0.8:<%= tcp_port %> fail_timeout=0;
|
18
|
+
# server 192.168.0.9:<%= tcp_port %> fail_timeout=0;
|
19
|
+
}
|
20
|
+
|
21
|
+
server {
|
22
|
+
# listen <%= tcp_port %>;
|
23
|
+
# server_name <%= virtual_host %>;
|
24
|
+
|
25
|
+
# ~2 seconds is often enough for most cases to parse HTML/CSS and
|
26
|
+
# retrieve needed images/icons/frames, connections are cheap in
|
27
|
+
# nginx so increasing this is generally safe...
|
28
|
+
keepalive_timeout 5;
|
29
|
+
|
30
|
+
# path for static files
|
31
|
+
# root <%= current_path %>/public;
|
32
|
+
|
33
|
+
location ~ ^/assets/ {
|
34
|
+
gzip_static on; # to serve pre-gizpped version
|
35
|
+
expires 1y;
|
36
|
+
add_header Cache-Control public;
|
37
|
+
add_header ETag "";
|
38
|
+
break;
|
39
|
+
}
|
40
|
+
|
41
|
+
try_files $uri/index.html $uri.html $uri @app;
|
42
|
+
|
43
|
+
location @app {
|
44
|
+
proxy_pass http://<%= service_entry %>;
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Nginx logrotate configuration
|
2
|
+
|
3
|
+
# Environment: <%= env_name %>
|
4
|
+
# Revision: <%= revision %>
|
5
|
+
# Created at <%= now %>
|
6
|
+
|
7
|
+
<%= log_path.join('*.log') %> {
|
8
|
+
daily
|
9
|
+
missingok
|
10
|
+
rotate 14
|
11
|
+
compress
|
12
|
+
dateext
|
13
|
+
notifempty
|
14
|
+
sharedscripts
|
15
|
+
postrotate
|
16
|
+
[ ! -f <%= pid_file_path %> ] || kill -USR1 $(cat <%= pid_file_path %>) 2>/dev/null || true
|
17
|
+
endscript
|
18
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Monit control file for Nginx
|
2
|
+
|
3
|
+
# Environment: <%= env_name %>
|
4
|
+
# Revision: <%= revision %>
|
5
|
+
# Created at <%= now %>
|
6
|
+
|
7
|
+
<% nginx_command = "#{bin_path.join('nginx')} -c #{control_file_path}" %>
|
8
|
+
check process <%= service_entry %>
|
9
|
+
with pidfile <%= pid_file_path %>
|
10
|
+
start program = "/bin/bash -c 'sleep 1; <%= nginx_command %>'"
|
11
|
+
stop program = "/bin/bash -c '<%= "#{nginx_command} -s stop" %>'"
|
12
|
+
if totalmem is greater than 10.0 MB for 40 cycles then restart
|
13
|
+
if failed port 8080 for 3 times within 6 cycles then restart
|
14
|
+
if cpu is greater than 80% for 20 cycles then alert
|
15
|
+
if loadavg(5min) greater than 10 for 40 cycles then restart
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'luban'
|
2
|
+
|
3
|
+
module Luban
|
4
|
+
module Deployment
|
5
|
+
module Packages
|
6
|
+
class Pcre < Luban::Deployment::Package::Base
|
7
|
+
class Installer < Luban::Deployment::Package::Installer
|
8
|
+
def pcre_executable
|
9
|
+
@default_executable ||= bin_path.join('pcre-config')
|
10
|
+
end
|
11
|
+
|
12
|
+
def source_repo
|
13
|
+
@source_repo ||= "http://sourceforge.net"
|
14
|
+
end
|
15
|
+
|
16
|
+
def source_url_root
|
17
|
+
@source_url_root ||= "projects/pcre/files/pcre/#{@package_major_version}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def installed?
|
21
|
+
return false unless file?(pcre_executable)
|
22
|
+
match?("#{pcre_executable} --version", package_major_version)
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def update_binstubs!; end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/luban/nginx.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative "deployment/packages/nginx"
|
data/luban-nginx.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'luban/deployment/packages/nginx/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "luban-nginx"
|
8
|
+
spec.version = Luban::Deployment::Packages::Nginx::VERSION
|
9
|
+
spec.authors = ["Rubyist Chi"]
|
10
|
+
spec.email = ["rubyist.chi@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Monit support for Luban}
|
13
|
+
spec.description = %q{Luban::Nginx is a Luban package to manage Nginx installation, deployment and control}
|
14
|
+
spec.homepage = "https://github.com/lubanrb/monit"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.required_ruby_version = ">= 2.1.0"
|
23
|
+
spec.add_dependency 'luban'
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: luban-nginx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rubyist Chi
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: luban
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
description: Luban::Nginx is a Luban package to manage Nginx installation, deployment
|
70
|
+
and control
|
71
|
+
email:
|
72
|
+
- rubyist.chi@gmail.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- CHANGELOG.md
|
79
|
+
- Gemfile
|
80
|
+
- LICENSE.txt
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- bin/console
|
84
|
+
- bin/setup
|
85
|
+
- lib/luban-nginx.rb
|
86
|
+
- lib/luban/deployment/packages/nginx.rb
|
87
|
+
- lib/luban/deployment/packages/nginx/base.rb
|
88
|
+
- lib/luban/deployment/packages/nginx/configurator.rb
|
89
|
+
- lib/luban/deployment/packages/nginx/controller.rb
|
90
|
+
- lib/luban/deployment/packages/nginx/installer.rb
|
91
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.conf.erb
|
92
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.http.conf
|
93
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.http.proxy.conf
|
94
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.logrotate.erb
|
95
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.main.conf
|
96
|
+
- lib/luban/deployment/packages/nginx/templates/nginx.monitrc.erb
|
97
|
+
- lib/luban/deployment/packages/nginx/version.rb
|
98
|
+
- lib/luban/deployment/packages/pcre.rb
|
99
|
+
- lib/luban/nginx.rb
|
100
|
+
- luban-nginx.gemspec
|
101
|
+
homepage: https://github.com/lubanrb/monit
|
102
|
+
licenses:
|
103
|
+
- MIT
|
104
|
+
metadata: {}
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 2.1.0
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 2.5.1
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Monit support for Luban
|
125
|
+
test_files: []
|