capitate 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Capfile +3 -2
- data/History.txt +6 -0
- data/Manifest.txt +28 -11
- data/bin/capitate +13 -61
- data/config/hoe.rb +2 -2
- data/docs/nginx.README +12 -0
- data/docs/recipes/centos.txt +33 -0
- data/docs/recipes/deploy-pending.txt +25 -0
- data/docs/recipes/deploy-web.txt +33 -0
- data/docs/recipes/deploy.txt +159 -0
- data/docs/recipes/docs.txt +26 -0
- data/docs/recipes/imagemagick-centos.txt +20 -0
- data/docs/recipes/imagemagick.txt +8 -0
- data/docs/recipes/index.txt +26 -0
- data/docs/recipes/memcached-centos.txt +32 -0
- data/docs/recipes/memcached.txt +35 -0
- data/docs/recipes/mongrel_cluster-centos.txt +27 -0
- data/docs/recipes/mongrel_cluster.txt +40 -0
- data/docs/recipes/monit-centos.txt +32 -0
- data/docs/recipes/monit.txt +8 -0
- data/docs/recipes/mysql-centos.txt +22 -0
- data/docs/recipes/mysql.txt +58 -0
- data/docs/recipes/nginx-centos.txt +43 -0
- data/docs/recipes/nginx.txt +51 -0
- data/docs/recipes/rails.txt +58 -0
- data/docs/recipes/ruby-centos.txt +22 -0
- data/docs/recipes/ruby.txt +8 -0
- data/docs/recipes/sphinx-centos.txt +35 -0
- data/docs/recipes/sphinx.txt +89 -0
- data/lib/capitate/cap_ext/run_via.rb +14 -0
- data/lib/capitate/plugins/gem.rb +2 -3
- data/lib/capitate/plugins/prompt.rb +24 -0
- data/lib/capitate/plugins/script.rb +29 -15
- data/lib/capitate/plugins/templates.rb +45 -40
- data/lib/capitate/plugins/yum.rb +12 -22
- data/lib/capitate/task_node.rb +28 -9
- data/lib/capitate/version.rb +2 -2
- data/lib/capitate.rb +4 -5
- data/lib/deployment/deploy.rb +42 -0
- data/lib/deployment/install-centos-rubyweb.rb +131 -0
- data/lib/recipes/centos/centos.rb +30 -21
- data/lib/recipes/centos/imagemagick.rb +9 -8
- data/lib/recipes/centos/memcached.rb +11 -21
- data/lib/recipes/centos/mongrel_cluster.rb +7 -11
- data/lib/recipes/centos/monit.rb +13 -18
- data/lib/recipes/centos/mysql.rb +6 -9
- data/lib/recipes/centos/nginx.rb +17 -30
- data/lib/recipes/centos/ruby.rb +14 -19
- data/lib/recipes/centos/sphinx.rb +14 -28
- data/lib/recipes/docs.rb +22 -6
- data/lib/recipes/memcached.rb +14 -8
- data/lib/recipes/mongrel_cluster.rb +11 -14
- data/lib/recipes/mysql.rb +22 -40
- data/lib/recipes/nginx.rb +9 -4
- data/lib/recipes/rails.rb +53 -6
- data/lib/recipes/sphinx.rb +86 -17
- data/lib/templates/capistrano/Capfile +2 -6
- data/lib/templates/monit/cert.sh +1 -1
- data/lib/templates/mysql/install_db.sql.erb +2 -2
- data/lib/templates/sphinx/sphinx.conf.erb +28 -399
- data/lib/templates/sphinx/sphinx_app.initd.centos.erb +1 -1
- data/website/index.html +20 -34
- data/website/index.txt +12 -22
- data/website/stylesheets/screen.css +22 -11
- data/website/template.rhtml +7 -5
- data/website/template_recipe.rhtml +7 -3
- metadata +55 -15
- data/lib/capitate/plugins/package.rb +0 -30
- data/lib/capitate/plugins/profiles.rb +0 -33
- data/lib/capitate/plugins/wget.rb +0 -23
- data/lib/profiles/centos-sick.rb +0 -116
- data/lib/recipes/README +0 -5
- data/lib/recipes/centos/README +0 -3
- data/lib/recipes/gems.rb +0 -20
- data/lib/recipes/packages.rb +0 -39
- data/lib/recipes/recipes.rb +0 -30
- data/lib/templates/centos/setup_for_web.sh +0 -17
- data/lib/templates/centos/sudoers +0 -95
data/lib/recipes/gems.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
namespace :gems do
|
2
|
-
|
3
|
-
desc <<-DESC
|
4
|
-
Install gems.
|
5
|
-
|
6
|
-
set :gem_list, [
|
7
|
-
"rake",
|
8
|
-
"mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config",
|
9
|
-
"raspell"
|
10
|
-
]
|
11
|
-
|
12
|
-
DESC
|
13
|
-
task :install do
|
14
|
-
# Settings
|
15
|
-
fetch(:gem_list)
|
16
|
-
|
17
|
-
gemc.install(gem_list)
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
data/lib/recipes/packages.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
namespace :packages do
|
2
|
-
|
3
|
-
desc <<-DESC
|
4
|
-
Remove, update and install packages.
|
5
|
-
|
6
|
-
packages_type: Package manager type. Currently can only be :yum. \n\nTODO: Support more package managers.
|
7
|
-
|
8
|
-
set :packages_type, :yum
|
9
|
-
|
10
|
-
packages_remove: Packages to remove.
|
11
|
-
|
12
|
-
set :packages_remove, [ "openoffice.org-*", "ImageMagick" ]
|
13
|
-
|
14
|
-
packages_add: Packages to add.
|
15
|
-
|
16
|
-
set :packages_add, [ "gcc", "kernel-devel", "libevent-devel", "libxml2-devel" ]
|
17
|
-
|
18
|
-
DESC
|
19
|
-
task :install do
|
20
|
-
|
21
|
-
# Settings
|
22
|
-
fetch(:packages_type)
|
23
|
-
fetch(:packages_add)
|
24
|
-
fetch(:packages_remove)
|
25
|
-
|
26
|
-
# Set package type
|
27
|
-
package.type = packages_type
|
28
|
-
|
29
|
-
# Remove packages
|
30
|
-
package.remove(packages_remove) unless packages_remove.blank?
|
31
|
-
|
32
|
-
# Update all existing packages
|
33
|
-
package.update
|
34
|
-
|
35
|
-
# Install packages
|
36
|
-
package.install(packages_add) unless packages_add.blank?
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
data/lib/recipes/recipes.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
namespace :recipes do
|
2
|
-
|
3
|
-
desc <<-DESC
|
4
|
-
Run recipes, as user.
|
5
|
-
|
6
|
-
*recipes_run*: Recipes to run.
|
7
|
-
|
8
|
-
set :recipes, [ "centos:setup_for_web", "packages:install", "ruby:centos:install" ]
|
9
|
-
|
10
|
-
*recipes_user*: The user to run as for these recipes. Defaults to root.
|
11
|
-
|
12
|
-
set :recipes_user, "root"
|
13
|
-
|
14
|
-
DESC
|
15
|
-
task :run do
|
16
|
-
|
17
|
-
# Settings
|
18
|
-
fetch(:recipes_run)
|
19
|
-
fetch_or_default(:recipes_user, "root")
|
20
|
-
|
21
|
-
# Change user to install user for this recipes run
|
22
|
-
set_user(recipes_user)
|
23
|
-
|
24
|
-
# These run after install task and install all the apps
|
25
|
-
recipes_run.each do |task_name|
|
26
|
-
after "recipes:run", task_name
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
set -e
|
4
|
-
trap ERROR ERR
|
5
|
-
|
6
|
-
# Add admin group
|
7
|
-
cat /etc/group | grep admin || /usr/sbin/groupadd admin
|
8
|
-
|
9
|
-
# Install sudoers
|
10
|
-
install -o root -m 440 /tmp/sudoers /etc/sudoers
|
11
|
-
rm -f /tmp/sudoers
|
12
|
-
|
13
|
-
# Change inittab to runlevel 3
|
14
|
-
sed -i -e 's/^id:5:initdefault:/id:3:initdefault:/g' /etc/inittab
|
15
|
-
|
16
|
-
# Create web apps directory
|
17
|
-
mkdir -p /var/www/apps
|
@@ -1,95 +0,0 @@
|
|
1
|
-
## Sudoers allows particular users to run various commands as
|
2
|
-
## the root user, without needing the root password.
|
3
|
-
##
|
4
|
-
## Examples are provided at the bottom of the file for collections
|
5
|
-
## of related commands, which can then be delegated out to particular
|
6
|
-
## users or groups.
|
7
|
-
##
|
8
|
-
## This file must be edited with the 'visudo' command.
|
9
|
-
|
10
|
-
## Host Aliases
|
11
|
-
## Groups of machines. You may prefer to use hostnames (perhap using
|
12
|
-
## wildcards for entire domains) or IP addresses instead.
|
13
|
-
# Host_Alias FILESERVERS = fs1, fs2
|
14
|
-
# Host_Alias MAILSERVERS = smtp, smtp2
|
15
|
-
|
16
|
-
## User Aliases
|
17
|
-
## These aren't often necessary, as you can use regular groups
|
18
|
-
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
|
19
|
-
## rather than USERALIAS
|
20
|
-
# User_Alias ADMINS = jsmith, mikem
|
21
|
-
|
22
|
-
|
23
|
-
## Command Aliases
|
24
|
-
## These are groups of related commands...
|
25
|
-
|
26
|
-
## Networking
|
27
|
-
Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
|
28
|
-
|
29
|
-
## Installation and management of software
|
30
|
-
Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
|
31
|
-
|
32
|
-
## Services
|
33
|
-
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
|
34
|
-
|
35
|
-
## Updating the locate database
|
36
|
-
Cmnd_Alias LOCATE = /usr/sbin/updatedb
|
37
|
-
|
38
|
-
## Storage
|
39
|
-
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
|
40
|
-
|
41
|
-
## Delegating permissions
|
42
|
-
Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
|
43
|
-
|
44
|
-
## Processes
|
45
|
-
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
|
46
|
-
|
47
|
-
## Drivers
|
48
|
-
Cmnd_Alias DRIVERS = /sbin/modprobe
|
49
|
-
|
50
|
-
# Defaults specification
|
51
|
-
|
52
|
-
#
|
53
|
-
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
|
54
|
-
# You have to run "ssh -t hostname sudo <cmd>".
|
55
|
-
#
|
56
|
-
#Defaults requiretty
|
57
|
-
|
58
|
-
Defaults env_reset
|
59
|
-
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
|
60
|
-
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
|
61
|
-
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
|
62
|
-
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
|
63
|
-
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
|
64
|
-
_XKB_CHARSET XAUTHORITY"
|
65
|
-
|
66
|
-
## Next comes the main part: which users can run what software on
|
67
|
-
## which machines (the sudoers file can be shared between multiple
|
68
|
-
## systems).
|
69
|
-
## Syntax:
|
70
|
-
##
|
71
|
-
## user MACHINE=COMMANDS
|
72
|
-
##
|
73
|
-
## The COMMANDS section may have other options added to it.
|
74
|
-
##
|
75
|
-
## Allow root to run any commands anywhere
|
76
|
-
root ALL=(ALL) ALL
|
77
|
-
%admin ALL=(ALL) ALL
|
78
|
-
|
79
|
-
## Allows members of the 'sys' group to run networking, software,
|
80
|
-
## service management apps and more.
|
81
|
-
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
|
82
|
-
|
83
|
-
## Allows people in group wheel to run all commands
|
84
|
-
# %wheel ALL=(ALL) ALL
|
85
|
-
|
86
|
-
## Same thing without a password
|
87
|
-
# %wheel ALL=(ALL) NOPASSWD: ALL
|
88
|
-
|
89
|
-
## Allows members of the users group to mount and unmount the
|
90
|
-
## cdrom as root
|
91
|
-
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
|
92
|
-
|
93
|
-
## Allows members of the users group to shutdown this system
|
94
|
-
# %users localhost=/sbin/shutdown -h now
|
95
|
-
|