syncwrap 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +8 -0
- data/Manifest.txt +2 -0
- data/Rakefile +10 -3
- data/etc/init.d/iyyov +22 -23
- data/lib/syncwrap/base.rb +1 -1
- data/lib/syncwrap/geminabox.rb +39 -0
- data/lib/syncwrap/iyyov.rb +1 -1
- data/lib/syncwrap/java.rb +1 -1
- data/lib/syncwrap/rhel.rb +2 -2
- data/lib/syncwrap/user_run.rb +1 -1
- data/test/test_syncwrap.rb +2 -0
- data/var/iyyov/jobs.rb +11 -0
- metadata +103 -96
data/History.rdoc
CHANGED
@@ -1,2 +1,10 @@
|
|
1
|
+
=== 1.1.0 (2012-9-13)
|
2
|
+
* Add (boxed-)geminabox provisions and deploy task
|
3
|
+
* Upgrade to (default) jdk-ora-1.7.0_05-x64
|
4
|
+
* RHEL version of test Rakefile, init.d/iyyov
|
5
|
+
* Fix RHEL yum args
|
6
|
+
* Silence user_exist? id command output
|
7
|
+
* iyyov_install_rundir as user_run
|
8
|
+
|
1
9
|
=== 1.0.0 (2012-7-15)
|
2
10
|
* Initial release.
|
data/Manifest.txt
CHANGED
@@ -15,6 +15,7 @@ lib/syncwrap.rb
|
|
15
15
|
lib/syncwrap/common.rb
|
16
16
|
lib/syncwrap/distro.rb
|
17
17
|
lib/syncwrap/ec2.rb
|
18
|
+
lib/syncwrap/geminabox.rb
|
18
19
|
lib/syncwrap/hashdot.rb
|
19
20
|
lib/syncwrap/iyyov.rb
|
20
21
|
lib/syncwrap/java.rb
|
@@ -26,3 +27,4 @@ lib/syncwrap/ubuntu.rb
|
|
26
27
|
lib/syncwrap/user_run.rb
|
27
28
|
test/test_syncwrap.rb
|
28
29
|
usr/local/bin/jgem
|
30
|
+
var/iyyov/jobs.rb
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ require 'syncwrap/java'
|
|
11
11
|
require 'syncwrap/hashdot'
|
12
12
|
require 'syncwrap/jruby'
|
13
13
|
require 'syncwrap/iyyov'
|
14
|
-
require 'syncwrap/
|
14
|
+
require 'syncwrap/rhel'
|
15
15
|
require 'syncwrap/postgresql'
|
16
16
|
require 'syncwrap/remote_task'
|
17
17
|
|
@@ -20,8 +20,8 @@ class SyncWrapper
|
|
20
20
|
include SyncWrap::Hashdot
|
21
21
|
include SyncWrap::JRuby
|
22
22
|
include SyncWrap::Iyyov
|
23
|
-
include SyncWrap::
|
24
|
-
include SyncWrap::PostgreSQL
|
23
|
+
include SyncWrap::RHEL
|
24
|
+
include SyncWrap::PostgreSQL
|
25
25
|
|
26
26
|
include SyncWrap::RemoteTask
|
27
27
|
|
@@ -48,6 +48,13 @@ class SyncWrapper
|
|
48
48
|
iyyov_install
|
49
49
|
end
|
50
50
|
|
51
|
+
desc "Deploy Geminabox Daemon"
|
52
|
+
remote_task :geminabox_deploy do
|
53
|
+
iyyov_install_jobs do
|
54
|
+
geminabox_install
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
51
58
|
desc "Deploy PostgreSQL"
|
52
59
|
remote_task :pg_deploy do
|
53
60
|
pg_install
|
data/etc/init.d/iyyov
CHANGED
@@ -1,19 +1,13 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/bin/bash
|
2
|
+
#
|
3
|
+
# iyyov Startup script for Iyyov monitoring daemon
|
4
|
+
#
|
5
|
+
# chkconfig: 2345 88 12
|
6
|
+
# description: Iyyov monitoring daemon
|
7
|
+
# processname: iyyov
|
8
|
+
# config: /opt/var/iyyov/jobs.rb
|
2
9
|
|
3
|
-
|
4
|
-
# Provides: iyyov
|
5
|
-
# Required-Start: $remote_fs $syslog
|
6
|
-
# Required-Stop: $remote_fs $syslog
|
7
|
-
# Should-Start: $named
|
8
|
-
# Default-Start: 2 3 4 5
|
9
|
-
# Default-Stop:
|
10
|
-
# Short-Description: Iyyov jruby monitor
|
11
|
-
# Description: Iyyov jruby monitoring and job control daemon
|
12
|
-
### END INIT INFO
|
13
|
-
|
14
|
-
set -e
|
15
|
-
|
16
|
-
. /lib/lsb/init-functions
|
10
|
+
. /etc/rc.d/init.d/functions
|
17
11
|
|
18
12
|
# Gem home directory
|
19
13
|
# Set to match system "jgem environment path"
|
@@ -28,6 +22,9 @@ user="runr"
|
|
28
22
|
# Running directory (for jobs.rb config, log, and pid file)
|
29
23
|
rundir="/var/local/runr/iyyov"
|
30
24
|
|
25
|
+
# Add PATH to jruby if non-standard
|
26
|
+
export PATH=$PATH:/usr/local/bin
|
27
|
+
|
31
28
|
prog="iyyov"
|
32
29
|
daemon="${gem_home}/gems/iyyov-${version}-java/init/${prog}"
|
33
30
|
config="${rundir}/jobs.rb"
|
@@ -40,16 +37,16 @@ start() {
|
|
40
37
|
[ -f "$config" ] || exit 6
|
41
38
|
[ -d "$rundir" ] || exit 7
|
42
39
|
|
43
|
-
|
44
|
-
|
40
|
+
echo -n $"Starting $prog: "
|
41
|
+
runuser -c "cd $rundir && $daemon $config" $user
|
45
42
|
RETVAL=$?
|
46
|
-
|
43
|
+
[ $RETVAL -eq 0 ] && success $"$prog startup" || failure $"$prog startup"
|
44
|
+
echo
|
47
45
|
}
|
48
46
|
|
49
47
|
status() {
|
50
48
|
if [ -f "$pidfile" ]; then
|
51
|
-
pid
|
52
|
-
echo "Status $prog: running pid $pid"
|
49
|
+
echo "Status $prog: running pid $(<$pidfile)"
|
53
50
|
else
|
54
51
|
echo "Status $prog: not running"
|
55
52
|
fi
|
@@ -62,10 +59,12 @@ reload() {
|
|
62
59
|
}
|
63
60
|
|
64
61
|
stop() {
|
65
|
-
|
66
|
-
|
62
|
+
echo -n $"Shutting down $prog: "
|
63
|
+
killproc -p $pidfile $prog
|
67
64
|
RETVAL=$?
|
68
|
-
|
65
|
+
[ $RETVAL -eq 0 ] && success || failure
|
66
|
+
echo
|
67
|
+
return $RETVAL
|
69
68
|
}
|
70
69
|
|
71
70
|
case "$1" in
|
data/lib/syncwrap/base.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2011-2012 David Kellum
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
|
+
# may not use this file except in compliance with the License. You may
|
6
|
+
# obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
13
|
+
# implied. See the License for the specific language governing
|
14
|
+
# permissions and limitations under the License.
|
15
|
+
#++
|
16
|
+
|
17
|
+
require 'syncwrap/user_run'
|
18
|
+
require 'syncwrap/jruby'
|
19
|
+
|
20
|
+
# Provisions the
|
21
|
+
# {boxed-geminabox}[https://github.com/dekellum/boxed-geminabox/]
|
22
|
+
# gem server.
|
23
|
+
module SyncWrap::Geminabox
|
24
|
+
include SyncWrap::UserRun
|
25
|
+
include SyncWrap::JRuby
|
26
|
+
|
27
|
+
attr_accessor :geminabox_version
|
28
|
+
|
29
|
+
def initialize
|
30
|
+
super
|
31
|
+
@geminabox_version = '1.0.0'
|
32
|
+
end
|
33
|
+
|
34
|
+
def geminabox_install
|
35
|
+
jruby_install_gem( 'boxed-geminabox', :version => "=#{geminabox_version}" )
|
36
|
+
user_run_service_dir_setup( 'boxed-geminabox' )
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/lib/syncwrap/iyyov.rb
CHANGED
@@ -85,7 +85,7 @@ module SyncWrap::Iyyov
|
|
85
85
|
# Create iyyov rundir and make sure there is at minimum an empty
|
86
86
|
# jobs file. Avoid touching it if already present
|
87
87
|
def iyyov_install_rundir
|
88
|
-
|
88
|
+
sudo( <<-"SH", :user => user_run )
|
89
89
|
mkdir -p #{iyyov_run_dir}
|
90
90
|
if [ ! -e #{iyyov_run_dir}/jobs.rb ]; then
|
91
91
|
touch #{iyyov_run_dir}/jobs.rb
|
data/lib/syncwrap/java.rb
CHANGED
data/lib/syncwrap/rhel.rb
CHANGED
@@ -36,12 +36,12 @@ module SyncWrap::RHEL
|
|
36
36
|
|
37
37
|
def dist_install( *pkgs )
|
38
38
|
pkgs = dist_map_packages( pkgs )
|
39
|
-
sudo "yum install -
|
39
|
+
sudo "yum install -q -y #{pkgs.join( ' ' )}"
|
40
40
|
end
|
41
41
|
|
42
42
|
def dist_uninstall( *pkgs )
|
43
43
|
pkgs = dist_map_packages( pkgs )
|
44
|
-
sudo "yum remove -
|
44
|
+
sudo "yum remove -q -y #{pkgs.join( ' ' )}"
|
45
45
|
end
|
46
46
|
|
47
47
|
def dist_install_init_service( name )
|
data/lib/syncwrap/user_run.rb
CHANGED
data/test/test_syncwrap.rb
CHANGED
@@ -27,6 +27,7 @@ require 'syncwrap/java'
|
|
27
27
|
require 'syncwrap/hashdot'
|
28
28
|
require 'syncwrap/jruby'
|
29
29
|
require 'syncwrap/iyyov'
|
30
|
+
require 'syncwrap/geminabox'
|
30
31
|
require 'syncwrap/ec2'
|
31
32
|
require 'syncwrap/ubuntu'
|
32
33
|
require 'syncwrap/rhel'
|
@@ -40,6 +41,7 @@ class TestSyncWrap < MiniTest::Unit::TestCase
|
|
40
41
|
include SyncWrap::Hashdot
|
41
42
|
include SyncWrap::JRuby
|
42
43
|
include SyncWrap::Iyyov
|
44
|
+
include SyncWrap::Geminabox
|
43
45
|
|
44
46
|
include SyncWrap::RHEL
|
45
47
|
include SyncWrap::Ubuntu # Not a recomendated combo
|
data/var/iyyov/jobs.rb
ADDED
metadata
CHANGED
@@ -1,111 +1,118 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: syncwrap
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.1.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
9
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- David Kellum
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
12
|
+
date: 2012-09-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: minitest
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 3.2.0
|
21
|
+
none: false
|
22
|
+
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
none: false
|
28
|
+
prerelease: false
|
29
|
+
type: :development
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rjack-tarpit
|
32
|
+
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ~>
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '2.0'
|
37
|
+
none: false
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.0'
|
43
|
+
none: false
|
44
|
+
prerelease: false
|
45
|
+
type: :development
|
37
46
|
description: A generalized and modular set of provisioning and deployment routines. The Rake-centric Vlad and not-actually-Rake Capistrano both suffer from lack of objects, e.g. the ability to customize and mix-in behavior. SyncWrap offers an Object/Module system that can be used with either. Known to work with Vlad/rake-remote_task but could also be integrated with Capistrano, or others.
|
38
|
-
email:
|
39
|
-
|
47
|
+
email:
|
48
|
+
- dek-oss@gravitext.com
|
40
49
|
executables: []
|
41
|
-
|
42
50
|
extensions: []
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
51
|
+
extra_rdoc_files:
|
52
|
+
- History.rdoc
|
53
|
+
- README.rdoc
|
54
|
+
files:
|
55
|
+
- History.rdoc
|
56
|
+
- Manifest.txt
|
57
|
+
- README.rdoc
|
58
|
+
- Rakefile
|
59
|
+
- etc/init.d/iyyov
|
60
|
+
- etc/postgresql/9.1/main/environment
|
61
|
+
- etc/postgresql/9.1/main/pg_ctl.conf
|
62
|
+
- etc/postgresql/9.1/main/pg_hba.conf
|
63
|
+
- etc/postgresql/9.1/main/pg_ident.conf
|
64
|
+
- etc/postgresql/9.1/main/postgresql.conf
|
65
|
+
- etc/postgresql/9.1/main/start.conf
|
66
|
+
- etc/sysctl.d/61-postgresql-shm.conf
|
67
|
+
- lib/syncwrap/base.rb
|
68
|
+
- lib/syncwrap.rb
|
69
|
+
- lib/syncwrap/common.rb
|
70
|
+
- lib/syncwrap/distro.rb
|
71
|
+
- lib/syncwrap/ec2.rb
|
72
|
+
- lib/syncwrap/geminabox.rb
|
73
|
+
- lib/syncwrap/hashdot.rb
|
74
|
+
- lib/syncwrap/iyyov.rb
|
75
|
+
- lib/syncwrap/java.rb
|
76
|
+
- lib/syncwrap/jruby.rb
|
77
|
+
- lib/syncwrap/postgresql.rb
|
78
|
+
- lib/syncwrap/remote_task.rb
|
79
|
+
- lib/syncwrap/rhel.rb
|
80
|
+
- lib/syncwrap/ubuntu.rb
|
81
|
+
- lib/syncwrap/user_run.rb
|
82
|
+
- test/test_syncwrap.rb
|
83
|
+
- usr/local/bin/jgem
|
84
|
+
- var/iyyov/jobs.rb
|
76
85
|
homepage: http://github.com/dekellum/syncwrap
|
77
86
|
licenses: []
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options:
|
89
|
+
- --main
|
90
|
+
- README.rdoc
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
hash: 2
|
86
101
|
none: false
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ! '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
hash: 2
|
95
110
|
none: false
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
hash: 2
|
100
|
-
segments:
|
101
|
-
- 0
|
102
|
-
version: "0"
|
103
111
|
requirements: []
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
signing_key:
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 1.8.24
|
114
|
+
signing_key:
|
108
115
|
specification_version: 3
|
109
116
|
summary: A generalized and modular set of provisioning and deployment routines. The Rake-centric Vlad and not-actually-Rake Capistrano both suffer from lack of objects, e.g. the ability to customize and mix-in behavior. SyncWrap offers an Object/Module system that can be used with either.
|
110
117
|
test_files: []
|
111
|
-
|
118
|
+
...
|