standup 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/standup/version.rb +1 -1
- data/scripts/appconsole.rb +3 -1
- data/scripts/redis/redis-server +1 -1
- data/scripts/redis/redis.conf +72 -25
- data/scripts/resque/resque +1 -1
- data/scripts/resque.rb +1 -1
- metadata +2 -2
data/lib/standup/version.rb
CHANGED
data/scripts/appconsole.rb
CHANGED
@@ -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.
|
5
|
+
scripts.webapp.with_environment do
|
6
|
+
exec 'rails console'
|
7
|
+
end
|
6
8
|
end
|
7
9
|
end
|
data/scripts/redis/redis-server
CHANGED
data/scripts/redis/redis.conf
CHANGED
@@ -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
|
-
|
295
|
-
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
303
|
-
#
|
304
|
-
|
305
|
-
|
306
|
-
#
|
307
|
-
|
308
|
-
# Redis
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
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
|
|
data/scripts/resque/resque
CHANGED
@@ -7,4 +7,4 @@ if [ $1 = "ALL_QUEUES" ];then
|
|
7
7
|
QUEUE=$1
|
8
8
|
fi
|
9
9
|
|
10
|
-
sudo
|
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.
|
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.
|
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-
|
15
|
+
date: 2011-07-04 00:00:00 +04:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|