Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: novagile/kitchen
base: 632e0f8895
...
head fork: novagile/kitchen
compare: 496c632386
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
1  recipes/install.rb
@@ -7,6 +7,7 @@
policy :stack, :roles => :app do
requires :ruby
+ requires :nginx
end
deployment do
View
2  recipes/stack/curl.rb
@@ -1,5 +1,5 @@
package :curl do
- apt 'curl'
+ apt 'curl libcurl4-openssl-dev'
verify do
has_executable 'curl'
View
20 recipes/stack/nginx.rb
@@ -0,0 +1,20 @@
+package :nginx do
+ requires :pcre
+ requires :passenger
+
+ config_file "/etc/init.d/nginx"
+
+ push_text File.read(File.join(File.dirname(__FILE__), 'nginx', 'init.d')), config_file do
+
+ pre :install, "sudo touch #{config_file} && sudo chown novagile #{config_file} && sudo cat /dev/null > #{config_file}"
+
+ post :install, "sudo chmod +x #{config_file}"
+ post :install, "sudo /usr/sbin/update-rc.d -f nginx defaults"
+ post :install, "sudo #{config_file} start"
+
+ verify do
+ has_executable "/usr/local/nginx/sbin/nginx"
+ has_file config_file
+ end
+ end
+end
View
58 recipes/stack/nginx/init.d
@@ -0,0 +1,58 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: nginx
+# Required-Start: $all
+# Required-Stop: $all
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: starts the nginx web server
+# Description: starts nginx using start-stop-daemon
+### END INIT INFO
+
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/local/nginx/sbin/nginx
+NAME=nginx
+DESC=nginx
+
+test -x $DAEMON || exit 0
+
+# Include nginx defaults if available
+if [ -f /etc/default/nginx ] ; then
+ . /etc/default/nginx
+fi
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid --exec $DAEMON
+ echo "$NAME."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid --exec $DAEMON
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ reload)
+ echo -n "Reloading $DESC configuration: "
+ start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid --exec $DAEMON
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ exit 1
+ ;;
+ esac
+
+ exit 0
View
7 recipes/stack/passenger.rb
@@ -0,0 +1,7 @@
+package :passenger do
+ rbenv = 'RBENV_ROOT=/usr/local/rbenv /usr/local/rbenv/bin/rbenv'
+
+ runner "#{rbenv} exec gem install passenger" do
+ post :install, "#{rbenv} exec passenger-install-nginx-module --auto --auto-download --prefix=/usr/local/nginx"
+ end
+end
View
3  recipes/stack/pcre.rb
@@ -0,0 +1,3 @@
+package :pcre do
+ apt 'libpcre3 libpcre3-dev'
+end
View
3  recipes/stack/ruby.rb
@@ -5,8 +5,9 @@
requires :libreadline
requires :libxml
requires :libxslt
+ requires :curl
requires :rbenv
-
+
ruby_version = '1.9.3-p125'
rbenv = 'RBENV_ROOT=/usr/local/rbenv /usr/local/rbenv/bin/rbenv'

No commit comments for this range

Something went wrong with that request. Please try again.