capitomcat 0.0.2 → 0.0.3
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 +8 -0
- data/capitomcat.gemspec +2 -2
- data/examples/multistage/Capfile +6 -5
- data/examples/singlestage/Capfile +8 -7
- data/lib/capitomcat.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 460283b08a3d25fe8c961e9916697ab59642bf16
|
|
4
|
+
data.tar.gz: 00f4e1a87866891dac1dae87a6598adc738d958f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cdafda575dcf154b73f551c165e631768d67207d3873fb8693aee9ceabe25d0aef2a77e0da1467a8f532236dbf1a28b8e488f291f58fcc2a4a92564c44798c01
|
|
7
|
+
data.tar.gz: f524e15d3483dcbf0e99745d9484e9819939873aa9e9acee4a0df97107596e9d5ad6e8abd0b368dba7e091dfded7496757b3bd8a042f67beb0b31b72b25686c1
|
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Capistrano Recipe for Tomcat
|
|
2
2
|
========================
|
|
3
3
|
|
|
4
|
+
https://rubygems.org/gems/capitomcat
|
|
5
|
+
|
|
4
6
|
##Installation
|
|
5
7
|
To use Capitomcat in your Capistrano script, you need install as RubyGem
|
|
6
8
|
|
|
@@ -14,6 +16,12 @@ $ gem install capistrano
|
|
|
14
16
|
$ gem install capistrano-ext
|
|
15
17
|
</pre>
|
|
16
18
|
###Install Capitomcat
|
|
19
|
+
####Install from RubyGems
|
|
20
|
+
<pre>
|
|
21
|
+
$ gem install capitomcat
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
####Install manually
|
|
17
25
|
* Check-out the source code
|
|
18
26
|
<pre>
|
|
19
27
|
$ git clone git@github.com:sunggun-yu/capitomcat.git
|
data/capitomcat.gemspec
CHANGED
|
@@ -6,13 +6,13 @@ $:.push File.expand_path("lib", __FILE__)
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "capitomcat"
|
|
9
|
-
s.version = "0.0.
|
|
9
|
+
s.version = "0.0.3"
|
|
10
10
|
|
|
11
11
|
s.authors = ["Sunggun Yu"]
|
|
12
12
|
s.email = ["sunggun.dev@gmail.com"]
|
|
13
13
|
s.licenses = ['Apache 2.0']
|
|
14
14
|
s.date = %q{2013-12-27}
|
|
15
|
-
s.homepage = "
|
|
15
|
+
s.homepage = "http://sunggun-yu.github.io/capitomcat/"
|
|
16
16
|
s.summary = %q{Capistrano Recipe for Tomcat}
|
|
17
17
|
s.description = %q{You can deploy your war file to multiple remote tomcat servers through this Capistrano recipe.}
|
|
18
18
|
|
data/examples/multistage/Capfile
CHANGED
|
@@ -11,14 +11,15 @@ set :user, "deploy"
|
|
|
11
11
|
set :password, "#{password}" #Set password from parameter.
|
|
12
12
|
set :tomcat_user, "tomcat"
|
|
13
13
|
set :tomcat_cmd_user, "root"
|
|
14
|
+
set :tomcat_port, "8080"
|
|
14
15
|
|
|
15
16
|
# Local file section
|
|
16
|
-
set :local_war_file, "/
|
|
17
|
+
set :local_war_file, "/your-local-directory/app.war"
|
|
17
18
|
set :context_template_file, "./template/context.xml.erb"
|
|
18
19
|
|
|
19
20
|
# Remote setting section
|
|
20
21
|
set :context_name, "app"
|
|
21
|
-
set
|
|
22
|
-
set :remote_context_file, "/
|
|
23
|
-
set :remote_tomcat_cmd, "/
|
|
24
|
-
set :remote_tomcat_work_dir, "/
|
|
22
|
+
set( :remote_docBase) {"/your-remote-directory-to-save-war-file/"+File.basename(local_war_file)} unless exists?(:remote_docBase)
|
|
23
|
+
set :remote_context_file, "/var/lib/tomcat7/conf/Catalina/localhost/app.xml"
|
|
24
|
+
set :remote_tomcat_cmd, "/etc/init.d/tomcat7"
|
|
25
|
+
set :remote_tomcat_work_dir, "/var/lib/tomcat7/work/Catalina/localhost/app"
|
|
@@ -6,18 +6,19 @@ load 'config/deploy.rb'
|
|
|
6
6
|
role :app, "dev01"
|
|
7
7
|
|
|
8
8
|
# User section
|
|
9
|
-
set :user, "
|
|
9
|
+
set :user, "user"
|
|
10
10
|
set :password, "#{password}" #Set password from parameter.
|
|
11
|
-
set :tomcat_user, "
|
|
11
|
+
set :tomcat_user, "root"
|
|
12
12
|
set :tomcat_cmd_user, "root"
|
|
13
|
+
set :tomcat_port, "8080"
|
|
13
14
|
|
|
14
15
|
# Local file section
|
|
15
|
-
set :local_war_file, "/
|
|
16
|
+
set :local_war_file, "/your-local-directory/app.war"
|
|
16
17
|
set :context_template_file, "./template/context.xml.erb"
|
|
17
18
|
|
|
18
19
|
# Remote setting section
|
|
19
20
|
set :context_name, "app"
|
|
20
|
-
set
|
|
21
|
-
set :remote_context_file, "/
|
|
22
|
-
set :remote_tomcat_cmd, "/
|
|
23
|
-
set :remote_tomcat_work_dir, "/
|
|
21
|
+
set( :remote_docBase) {"/your-remote-directory-to-save-war-file/"+File.basename(local_war_file)} unless exists?(:remote_docBase)
|
|
22
|
+
set :remote_context_file, "/var/lib/tomcat7/conf/Catalina/localhost/app.xml"
|
|
23
|
+
set :remote_tomcat_cmd, "/etc/init.d/tomcat7"
|
|
24
|
+
set :remote_tomcat_work_dir, "/var/lib/tomcat7/work/Catalina/localhost/app"
|
data/lib/capitomcat.rb
CHANGED
|
@@ -21,7 +21,7 @@ configuration.load do
|
|
|
21
21
|
desc "Start Tomcat"
|
|
22
22
|
task :start, :roles => :app do
|
|
23
23
|
run "echo `nohup #{sudo :as => tomcat_cmd_user} #{remote_tomcat_cmd} start&` && sleep 1", :pty => true
|
|
24
|
-
run("for i in {0..
|
|
24
|
+
run("for i in {0..180}; do echo \"Waiting for Tomcat to start\"; if [ \"\" != \"$\(netstat -an | grep #{tomcat_port}\)\" ]; then break; fi; sleep 30; done")
|
|
25
25
|
run("netstat -an | grep #{tomcat_port}")
|
|
26
26
|
end
|
|
27
27
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capitomcat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sunggun Yu
|
|
@@ -62,7 +62,7 @@ files:
|
|
|
62
62
|
- examples/singlestage/config/deploy.rb
|
|
63
63
|
- examples/singlestage/template/context.xml.erb
|
|
64
64
|
- lib/capitomcat.rb
|
|
65
|
-
homepage:
|
|
65
|
+
homepage: http://sunggun-yu.github.io/capitomcat/
|
|
66
66
|
licenses:
|
|
67
67
|
- Apache 2.0
|
|
68
68
|
metadata: {}
|