standup 0.5.0 → 0.5.1

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.
@@ -1,5 +1,5 @@
1
1
  module Standup
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -2,6 +2,8 @@ Standup.script :node do
2
2
  self.description = 'Run remote Rails application console'
3
3
 
4
4
  def run
5
- scripts.shell.make_shell "cd #{scripts.webapp.app_path} && sudo -u www-data rails console #{scripts.webapp.params.rails_env}"
5
+ scripts.webapp.with_environment do
6
+ exec 'rails console'
7
+ end
6
8
  end
7
9
  end
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
16
- DAEMON=/usr/bin/redis-server
16
+ DAEMON=/usr/local/bin/redis-server
17
17
  DAEMON_ARGS=/etc/redis.conf
18
18
  NAME=redis-server
19
19
  DESC=redis-server
@@ -21,6 +21,7 @@ daemonize yes
21
21
  pidfile /var/run/redis.pid
22
22
 
23
23
  # Accept connections on the specified port, default is 6379.
24
+ # If port 0 is specified Redis will not listen on a TCP socket.
24
25
  port 6379
25
26
 
26
27
  # If you want you can bind a single interface, if the bind option is not
@@ -291,31 +292,77 @@ appendfsync everysec
291
292
  # "no" that is the safest pick from the point of view of durability.
292
293
  no-appendfsync-on-rewrite no
293
294
 
294
- #################################### DISK STORE ###############################
295
-
296
- # When disk store is active Redis works as an on-disk database, where memory
297
- # is only used as a object cache.
298
- #
299
- # This mode is good for datasets that are bigger than memory, and in general
300
- # when you want to trade speed for:
301
- #
302
- # - less memory used
303
- # - immediate server restart
304
- # - per key durability, without need for backgrond savig
305
- #
306
- # On the other hand, with disk store enabled MULTI/EXEC are no longer
307
- # transactional from the point of view of the persistence on disk, that is,
308
- # Redis transactions will still guarantee that commands are either processed
309
- # all or nothing, but there is no guarantee that all the keys are flushed
310
- # on disk in an atomic way.
311
- #
312
- # Of course with disk store enabled Redis is not as fast as it is when
313
- # working with just the memory back end.
314
-
315
- diskstore-enabled no
316
- diskstore-path redis.ds
317
- cache-max-memory 0
318
- cache-flush-delay 0
295
+ ################################ VIRTUAL MEMORY ###############################
296
+
297
+ # Virtual Memory allows Redis to work with datasets bigger than the actual
298
+ # amount of RAM needed to hold the whole dataset in memory.
299
+ # In order to do so very used keys are taken in memory while the other keys
300
+ # are swapped into a swap file, similarly to what operating systems do
301
+ # with memory pages.
302
+ #
303
+ # To enable VM just set 'vm-enabled' to yes, and set the following three
304
+ # VM parameters accordingly to your needs.
305
+
306
+ vm-enabled no
307
+ # vm-enabled yes
308
+
309
+ # This is the path of the Redis swap file. As you can guess, swap files
310
+ # can't be shared by different Redis instances, so make sure to use a swap
311
+ # file for every redis process you are running. Redis will complain if the
312
+ # swap file is already in use.
313
+ #
314
+ # The best kind of storage for the Redis swap file (that's accessed at random)
315
+ # is a Solid State Disk (SSD).
316
+ #
317
+ # *** WARNING *** if you are using a shared hosting the default of putting
318
+ # the swap file under /tmp is not secure. Create a dir with access granted
319
+ # only to Redis user and configure Redis to create the swap file there.
320
+ vm-swap-file /tmp/redis.swap
321
+
322
+ # vm-max-memory configures the VM to use at max the specified amount of
323
+ # RAM. Everything that deos not fit will be swapped on disk *if* possible, that
324
+ # is, if there is still enough contiguous space in the swap file.
325
+ #
326
+ # With vm-max-memory 0 the system will swap everything it can. Not a good
327
+ # default, just specify the max amount of RAM you can in bytes, but it's
328
+ # better to leave some margin. For instance specify an amount of RAM
329
+ # that's more or less between 60 and 80% of your free RAM.
330
+ vm-max-memory 0
331
+
332
+ # Redis swap files is split into pages. An object can be saved using multiple
333
+ # contiguous pages, but pages can't be shared between different objects.
334
+ # So if your page is too big, small objects swapped out on disk will waste
335
+ # a lot of space. If you page is too small, there is less space in the swap
336
+ # file (assuming you configured the same number of total swap file pages).
337
+ #
338
+ # If you use a lot of small objects, use a page size of 64 or 32 bytes.
339
+ # If you use a lot of big objects, use a bigger page size.
340
+ # If unsure, use the default :)
341
+ vm-page-size 32
342
+
343
+ # Number of total memory pages in the swap file.
344
+ # Given that the page table (a bitmap of free/used pages) is taken in memory,
345
+ # every 8 pages on disk will consume 1 byte of RAM.
346
+ #
347
+ # The total swap size is vm-page-size * vm-pages
348
+ #
349
+ # With the default of 32-bytes memory pages and 134217728 pages Redis will
350
+ # use a 4 GB swap file, that will use 16 MB of RAM for the page table.
351
+ #
352
+ # It's better to use the smallest acceptable value for your application,
353
+ # but the default is large in order to work in most conditions.
354
+ vm-pages 134217728
355
+
356
+ # Max number of VM I/O threads running at the same time.
357
+ # This threads are used to read/write data from/to swap file, since they
358
+ # also encode and decode objects from disk to memory or the reverse, a bigger
359
+ # number of threads can help with big objects even if they can't help with
360
+ # I/O itself as the physical device may not be able to couple with many
361
+ # reads/writes operations at the same time.
362
+ #
363
+ # The special value of 0 turn off threaded I/O and enables the blocking
364
+ # Virtual Memory implementation.
365
+ vm-max-threads 4
319
366
 
320
367
  ############################### ADVANCED CONFIG ###############################
321
368
 
@@ -7,4 +7,4 @@ if [ $1 = "ALL_QUEUES" ];then
7
7
  QUEUE=$1
8
8
  fi
9
9
 
10
- sudo su -l www-data --command "cd /opt/gs && QUEUE=$QUEUE VERBOSE=1 PIDFILE=tmp/pids/resque_$1_$2.pid nohup bundle exec rake environment resque:work >> log/resque_worker_$1_$2.log 2>&1 &"
10
+ sudo -u www-data /usr/local/rvm/bin/rvm-shell -c "cd <%= scripts.webapp.app_path%> && RAILS_ENV=<%= scripts.webapp.params.rails_env%> QUEUE=$QUEUE VERBOSE=1 PIDFILE=tmp/pids/resque_$1_$2.pid nohup bundle exec rake environment resque:work >> log/resque_worker_$1_$2.log 2>&1 &"
data/scripts/resque.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  Standup.script :node do
2
2
  def run
3
- scripts.redis.install_from_resque if sudo('find /etc/init.d/redis-server').match(/No such file or directory/).present?
3
+ scripts.redis.run unless scripts.redis.installed?
4
4
 
5
5
  path_to_resque_exec = "#{scripts.webapp.app_path}/script/resque"
6
6
  with_processed_file script_file('resque') do |file|
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: standup
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.0
5
+ version: 0.5.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ilia Ablamonov
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-07-02 00:00:00 +04:00
15
+ date: 2011-07-04 00:00:00 +04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency