Skip to content

Instantly share code, notes, and snippets.

@joshuapaling
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuapaling/f2f46f48ed42a4d5007e to your computer and use it in GitHub Desktop.
Save joshuapaling/f2f46f48ed42a4d5007e to your computer and use it in GitHub Desktop.
BIG Vault Capistrano Deployment
joshuapaling: /Applications/MAMP/htdocs/BIG/Employee_Management_Website/www
->cap staging deploy
INFO[516fb1c3] Running /usr/bin/env mkdir -p /tmp/the_big_vault_staging/ on XXX.XXX.XXX.XXX
DEBUG[516fb1c3] Command: /usr/bin/env mkdir -p /tmp/the_big_vault_staging/
INFO[516fb1c3] Finished in 0.501 seconds with exit status 0 (successful).
DEBUGUploading /tmp/the_big_vault_staging/git-ssh.sh 0.0%
INFOUploading /tmp/the_big_vault_staging/git-ssh.sh 100.0%
INFO[7f2c25f1] Running /usr/bin/env chmod +x /tmp/the_big_vault_staging/git-ssh.sh on XXX.XXX.XXX.XXX
DEBUG[7f2c25f1] Command: /usr/bin/env chmod +x /tmp/the_big_vault_staging/git-ssh.sh
INFO[7f2c25f1] Finished in 0.069 seconds with exit status 0 (successful).
DEBUG[b1b8ea39] Running /usr/bin/env git ls-remote -h ssh://git@bitbucket.org/bbldigital/big-employee-management-portal.git on XXX.XXX.XXX.XXX
DEBUG[b1b8ea39] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/the_big_vault_staging/git-ssh.sh /usr/bin/env git ls-remote -h ssh://git@bitbucket.org/bbldigital/big-employee-management-portal.git )
DEBUG[b1b8ea39] f516864a1856f8566f63b5e23bb77aa43ef49035
DEBUG[b1b8ea39]
DEBUG[b1b8ea39] refs/heads/development
DEBUG[b1b8ea39]
DEBUG[b1b8ea39] ab1bd27cf6407134b021262cfe3418a2daf19d96
DEBUG[b1b8ea39]
DEBUG[b1b8ea39] refs/heads/master
DEBUG[b1b8ea39]
DEBUG[b1b8ea39] Finished in 3.865 seconds with exit status 0 (successful).
INFO[d25c5695] Running /usr/bin/env mkdir -pv /home/staging/public_html/shared /home/staging/public_html/releases on XXX.XXX.XXX.XXX
DEBUG[d25c5695] Command: /usr/bin/env mkdir -pv /home/staging/public_html/shared /home/staging/public_html/releases
INFO[d25c5695] Finished in 0.068 seconds with exit status 0 (successful).
INFO[aa41764b] Running /usr/bin/env mkdir -pv /home/staging/public_html/shared/app/webroot/files /home/staging/public_html/shared/app/tmp on XXX.XXX.XXX.XXX
DEBUG[aa41764b] Command: /usr/bin/env mkdir -pv /home/staging/public_html/shared/app/webroot/files /home/staging/public_html/shared/app/tmp
INFO[aa41764b] Finished in 0.071 seconds with exit status 0 (successful).
INFO[4ef9cd6e] Running /usr/bin/env mkdir -pv /home/staging/public_html/shared/app/Config /home/staging/public_html/shared/app/Config /home/staging/public_html/shared/app/Config on XXX.XXX.XXX.XXX
DEBUG[4ef9cd6e] Command: /usr/bin/env mkdir -pv /home/staging/public_html/shared/app/Config /home/staging/public_html/shared/app/Config /home/staging/public_html/shared/app/Config
INFO[4ef9cd6e] Finished in 0.067 seconds with exit status 0 (successful).
DEBUG[c58c7ab6] Running /usr/bin/env [ -f /home/staging/public_html/shared/app/Config/core.php ] on XXX.XXX.XXX.XXX
DEBUG[c58c7ab6] Command: [ -f /home/staging/public_html/shared/app/Config/core.php ]
DEBUG[c58c7ab6] Finished in 0.072 seconds with exit status 0 (successful).
DEBUG[5a50aa21] Running /usr/bin/env [ -f /home/staging/public_html/shared/app/Config/database.php ] on XXX.XXX.XXX.XXX
DEBUG[5a50aa21] Command: [ -f /home/staging/public_html/shared/app/Config/database.php ]
DEBUG[5a50aa21] Finished in 0.070 seconds with exit status 0 (successful).
DEBUG[e40423e0] Running /usr/bin/env [ -f /home/staging/public_html/shared/app/Config/set_environments_array.php ] on XXX.XXX.XXX.XXX
DEBUG[e40423e0] Command: [ -f /home/staging/public_html/shared/app/Config/set_environments_array.php ]
DEBUG[e40423e0] Finished in 0.076 seconds with exit status 0 (successful).
DEBUG[2b007ef2] Running /usr/bin/env [ -f /home/staging/public_html/current/REVISION ] on XXX.XXX.XXX.XXX
DEBUG[2b007ef2] Command: [ -f /home/staging/public_html/current/REVISION ]
DEBUG[2b007ef2] Finished in 0.082 seconds with exit status 0 (successful).
DEBUG[aa35c958] Running /usr/bin/env cat /home/staging/public_html/current/REVISION 2>/dev/null on XXX.XXX.XXX.XXX
DEBUG[aa35c958] Command: /usr/bin/env cat /home/staging/public_html/current/REVISION 2>/dev/null
DEBUG[aa35c958] 760f34f
DEBUG[aa35c958] Finished in 0.093 seconds with exit status 0 (successful).
INFO[85ad3a02] Running /usr/bin/env mkdir -p ~/db_backups/ on XXX.XXX.XXX.XXX
DEBUG[85ad3a02] Command: mkdir -p ~/db_backups/
INFO[85ad3a02] Finished in 0.071 seconds with exit status 0 (successful).
INFO[138d0cb0] Running /usr/bin/env cd ~/db_backups/; (ls -t|head -n 6;ls)|sort|uniq -u|xargs rm -f on XXX.XXX.XXX.XXX
DEBUG[138d0cb0] Command: cd ~/db_backups/; (ls -t|head -n 6;ls)|sort|uniq -u|xargs rm -f
INFO[138d0cb0] Finished in 0.088 seconds with exit status 0 (successful).
INFO[96be3a07] Running /usr/bin/env mysqldump -B thebigvault_staging | gzip ->~/db_backups/mysqldump-$(date +%Y-%m-%d-%H.%M.%S).gz on XXX.XXX.XXX.XXX
DEBUG[96be3a07] Command: mysqldump -B thebigvault_staging | gzip ->~/db_backups/mysqldump-$(date +%Y-%m-%d-%H.%M.%S).gz
DEBUG[96be3a07] Warning: Using unique option prefix database instead of databases is deprecated and will be removed in a future release. Please use the full name instead.
DEBUG[96be3a07] Warning: mysqldump: ignoring option '--databases' due to invalid value 'thebigvault_staging'
INFO[96be3a07] Finished in 6.250 seconds with exit status 0 (successful).
DEBUG[f9b31611] Running /usr/bin/env [ -f /home/staging/public_html/repo/HEAD ] on XXX.XXX.XXX.XXX
DEBUG[f9b31611] Command: [ -f /home/staging/public_html/repo/HEAD ]
DEBUG[f9b31611] Finished in 0.135 seconds with exit status 0 (successful).
INFOThe repository mirror is at /home/staging/public_html/repo
DEBUG[3575203d] Running /usr/bin/env if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[3575203d] Command: if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi
DEBUG[3575203d] Finished in 0.074 seconds with exit status 0 (successful).
INFO[718a442b] Running /usr/bin/env git remote update on XXX.XXX.XXX.XXX
DEBUG[718a442b] Command: cd /home/staging/public_html/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/the_big_vault_staging/git-ssh.sh /usr/bin/env git remote update )
DEBUG[718a442b] Fetching origin
DEBUG[718a442b] remote: Counting objects: 69, done.[K
DEBUG[718a442b]
DEBUG[718a442b] remote: Compressing objects: 1% (1/66) [K
DEBUG[718a442b] remote: Compressing objects: 3% (2/66) [K
DEBUG[718a442b] remote: Compressing objects: 4% (3/66) [K
DEBUG[718a442b] remote: Compressing objects: 6% (4/66) [K
DEBUG[718a442b] remote: Compressing objects: 7% (5/66) [K
DEBUG[718a442b] remote: Compressing objects: 9% (6/66) [K
DEBUG[718a442b] remote: Compressing objects: 10% (7/66) [K
DEBUG[718a442b] remote: Compressing objects: 12% (8/66) [K
DEBUG[718a442b] remote: Compressing objects: 13% (9/66) [K
DEBUG[718a442b] remote: Compressing objects: 15% (10/66) [K
DEBUG[718a442b] remote: Compressing objects: 16% (11/66) [K
DEBUG[718a442b] remote: Compressing objects: 18% (12/66) [K
DEBUG[718a442b] remote: Compressing objects: 19% (13/66) [K
DEBUG[718a442b] remote: Compressing objects: 21% (14/66) [K
DEBUG[718a442b] remote: Compressing objects: 22% (15/66) [K
DEBUG[718a442b] remote: Compressing objects: 24% (16/66) [K
DEBUG[718a442b] remote: Compressing objects: 25% (17/66) [K
DEBUG[718a442b] remote: Compressing objects: 27% (18/66) [K
DEBUG[718a442b] remote: Compressing objects: 28% (19/66) [K
DEBUG[718a442b] remote: Compressing objects: 30% (20/66) [K
DEBUG[718a442b] remote: Compressing objects: 31% (21/66) [K
DEBUG[718a442b] remote: Compressing objects: 33% (22/66) [K
DEBUG[718a442b] remote: Compressing objects: 34% (23/66) [K
DEBUG[718a442b] remote: Compressing objects: 36% (24/66) [K
DEBUG[718a442b] remote: Compressing objects: 37% (25/66) [K
DEBUG[718a442b] remote: Compressing objects: 39% (26/66) [K
DEBUG[718a442b] remote: Compressing objects: 40% (27/66) [K
DEBUG[718a442b] remote: Compressing objects: 42% (28/66) [K
DEBUG[718a442b] remote: Compressing objects: 43% (29/66) [K
DEBUG[718a442b] remote: Compressing objects: 45% (30/66) [K
DEBUG[718a442b] remote: Compressing objects: 46% (31/66) [K
DEBUG[718a442b] remote: Compressing objects: 48% (32/66) [K
DEBUG[718a442b] remote: Compressing objects: 50% (33/66) [K
DEBUG[718a442b] remote: Compressing objects: 51% (34/66) [K
DEBUG[718a442b] remote: Compressing objects: 53% (35/66) [K
DEBUG[718a442b] remote: Compressing objects: 54% (36/66) [K
DEBUG[718a442b] remote: Compressing objects: 56% (37/66) [K
DEBUG[718a442b] remote: Compressing objects: 57% (38/66) [K
DEBUG[718a442b] remote: Compressing objects: 59% (39/66) [K
DEBUG[718a442b] remote: Compressing objects: 60% (40/66) [K
DEBUG[718a442b] remote: Compressing objects: 62% (41/66) [K
DEBUG[718a442b] remote: Compressing objects: 63% (42/66) [K
DEBUG[718a442b] remote: Compressing objects: 65% (43/66) [K
DEBUG[718a442b] remote: Compressing objects: 66% (44/66) [K
DEBUG[718a442b] remote: Compressing objects: 68% (45/66) [K
DEBUG[718a442b] remote: Compressing objects: 69% (46/66) [K
DEBUG[718a442b] remote: Compressing objects: 71% (47/66) [K
DEBUG[718a442b] remote: Compressing objects: 72% (48/66) [K
DEBUG[718a442b] remote: Compressing objects: 74% (49/66) [K
DEBUG[718a442b] remote: Compressing objects: 75% (50/66) [K
DEBUG[718a442b] remote: Compressing objects: 77% (51/66) [K
DEBUG[718a442b] remote: Compressing objects: 78% (52/66) [K
DEBUG[718a442b] remote: Compressing objects: 80% (53/66) [K
DEBUG[718a442b] remote: Compressing objects: 81% (54/66) [K
DEBUG[718a442b] remote: Compressing objects: 83% (55/66) [K
DEBUG[718a442b] remote: Compressing objects: 84% (56/66) [K
DEBUG[718a442b] remote: Compressing objects: 86% (57/66) [K
DEBUG[718a442b] remote: Compressing objects: 87% (58/66) [K
DEBUG[718a442b] remote: Compressing objects: 89% (59/66) [K
DEBUG[718a442b] remote: Compressing objects: 90% (60/66) [K
DEBUG[718a442b] remote: Compressing objects: 92% (61/66) [K
DEBUG[718a442b] remote: Compressing objects: 93% (62/66) [K
DEBUG[718a442b] remote: Compressing objects: 95% (63/66) [K
DEBUG[718a442b] remote: Compressing objects: 96% (64/66) [K
DEBUG[718a442b] remote: Compressing objects: 98% (65/66) [K
DEBUG[718a442b] remote: Compressing objects: 100% (66/66) [K
DEBUG[718a442b] remote: Compressing objects: 100% (66/66), done.[K
DEBUG[718a442b]
DEBUG[718a442b] remote: Total 69 (delta 50), reused 0 (delta 0)[K
DEBUG[718a442b]
DEBUG[718a442b] Unpacking objects: 1% (1/69)
DEBUG[718a442b] Unpacking objects: 2% (2/69)
DEBUG[718a442b] Unpacking objects: 4% (3/69)
DEBUG[718a442b] Unpacking objects: 5% (4/69)
DEBUG[718a442b] Unpacking objects: 7% (5/69)
DEBUG[718a442b] Unpacking objects: 8% (6/69)
DEBUG[718a442b] Unpacking objects: 10% (7/69)
DEBUG[718a442b] Unpacking objects: 11% (8/69)
DEBUG[718a442b] Unpacking objects: 13% (9/69)
DEBUG[718a442b] Unpacking objects: 14% (10/69)
DEBUG[718a442b] Unpacking objects: 15% (11/69)
DEBUG[718a442b] Unpacking objects: 17% (12/69)
DEBUG[718a442b] Unpacking objects: 18% (13/69)
DEBUG[718a442b] Unpacking objects: 20% (14/69)
DEBUG[718a442b] Unpacking objects: 21% (15/69)
DEBUG[718a442b] Unpacking objects: 23% (16/69)
DEBUG[718a442b] Unpacking objects: 24% (17/69)
DEBUG[718a442b] Unpacking objects: 26% (18/69)
DEBUG[718a442b] Unpacking objects: 27% (19/69)
DEBUG[718a442b] Unpacking objects: 28% (20/69)
DEBUG[718a442b] Unpacking objects: 30% (21/69)
DEBUG[718a442b] Unpacking objects: 31% (22/69)
DEBUG[718a442b] Unpacking objects: 33% (23/69)
DEBUG[718a442b] Unpacking objects: 34% (24/69)
DEBUG[718a442b] Unpacking objects: 36% (25/69)
DEBUG[718a442b] Unpacking objects: 37% (26/69)
DEBUG[718a442b] Unpacking objects: 39% (27/69)
DEBUG[718a442b] Unpacking objects: 40% (28/69)
DEBUG[718a442b] Unpacking objects: 42% (29/69)
DEBUG[718a442b] Unpacking objects: 43% (30/69)
DEBUG[718a442b] Unpacking objects: 44% (31/69)
DEBUG[718a442b] Unpacking objects: 46% (32/69)
DEBUG[718a442b] Unpacking objects: 47% (33/69)
DEBUG[718a442b] Unpacking objects: 49% (34/69)
DEBUG[718a442b] Unpacking objects: 50% (35/69)
DEBUG[718a442b] Unpacking objects: 52% (36/69)
DEBUG[718a442b] Unpacking objects: 53% (37/69)
DEBUG[718a442b] Unpacking objects: 55% (38/69)
DEBUG[718a442b] Unpacking objects: 56% (39/69)
DEBUG[718a442b] Unpacking objects: 57% (40/69)
DEBUG[718a442b] Unpacking objects: 59% (41/69)
DEBUG[718a442b] Unpacking objects: 60% (42/69)
DEBUG[718a442b] Unpacking objects: 62% (43/69)
DEBUG[718a442b] Unpacking objects: 63% (44/69)
DEBUG[718a442b] Unpacking objects: 65% (45/69)
DEBUG[718a442b] Unpacking objects: 66% (46/69)
DEBUG[718a442b] Unpacking objects: 68% (47/69)
DEBUG[718a442b] Unpacking objects: 69% (48/69)
DEBUG[718a442b] Unpacking objects: 71% (49/69)
DEBUG[718a442b] Unpacking objects: 72% (50/69)
DEBUG[718a442b] Unpacking objects: 73% (51/69)
DEBUG[718a442b] Unpacking objects: 75% (52/69)
DEBUG[718a442b] Unpacking objects: 76% (53/69)
DEBUG[718a442b] Unpacking objects: 78% (54/69)
DEBUG[718a442b] Unpacking objects: 79% (55/69)
DEBUG[718a442b] Unpacking objects: 81% (56/69)
DEBUG[718a442b] Unpacking objects: 82% (57/69)
DEBUG[718a442b] Unpacking objects: 84% (58/69)
DEBUG[718a442b] Unpacking objects: 85% (59/69)
DEBUG[718a442b] Unpacking objects: 86% (60/69)
DEBUG[718a442b] Unpacking objects: 88% (61/69)
DEBUG[718a442b] Unpacking objects: 89% (62/69)
DEBUG[718a442b] Unpacking objects: 91% (63/69)
DEBUG[718a442b] Unpacking objects: 92% (64/69)
DEBUG[718a442b] Unpacking objects: 94% (65/69)
DEBUG[718a442b] Unpacking objects: 95% (66/69)
DEBUG[718a442b] Unpacking objects: 97% (67/69)
DEBUG[718a442b] Unpacking objects: 98% (68/69)
Unpacking objects: 100% (69/69), done.cts: 100% (69/69)
DEBUG[718a442b] From ssh://bitbucket.org/bbldigital/big-employee-management-portal
DEBUG[718a442b] 760f34f..f516864 development -> development
INFO[718a442b] Finished in 5.021 seconds with exit status 0 (successful).
DEBUG[6cf208f8] Running /usr/bin/env if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[6cf208f8] Command: if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi
DEBUG[6cf208f8] Finished in 0.071 seconds with exit status 0 (successful).
INFO[2833907e] Running /usr/bin/env mkdir -p /home/staging/public_html/releases/20141029030741 on XXX.XXX.XXX.XXX
DEBUG[2833907e] Command: cd /home/staging/public_html/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/the_big_vault_staging/git-ssh.sh /usr/bin/env mkdir -p /home/staging/public_html/releases/20141029030741 )
INFO[2833907e] Finished in 0.071 seconds with exit status 0 (successful).
INFO[1da598bb] Running /usr/bin/env git archive master | tar -x -C /home/staging/public_html/releases/20141029030741 on XXX.XXX.XXX.XXX
DEBUG[1da598bb] Command: cd /home/staging/public_html/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/the_big_vault_staging/git-ssh.sh /usr/bin/env git archive master | tar -x -C /home/staging/public_html/releases/20141029030741 )
INFO[1da598bb] Finished in 0.530 seconds with exit status 0 (successful).
DEBUG[2e87789b] Running /usr/bin/env if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[2e87789b] Command: if test ! -d /home/staging/public_html/repo; then echo "Directory does not exist '/home/staging/public_html/repo'" 1>&2; false; fi
DEBUG[2e87789b] Finished in 0.067 seconds with exit status 0 (successful).
DEBUG[806a96c3] Running /usr/bin/env git rev-parse --short master on XXX.XXX.XXX.XXX
DEBUG[806a96c3] Command: cd /home/staging/public_html/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/the_big_vault_staging/git-ssh.sh /usr/bin/env git rev-parse --short master )
DEBUG[806a96c3] ab1bd27
DEBUG[806a96c3]
DEBUG[806a96c3] Finished in 0.069 seconds with exit status 0 (successful).
DEBUG[df0de42c] Running /usr/bin/env if test ! -d /home/staging/public_html/releases/20141029030741; then echo "Directory does not exist '/home/staging/public_html/releases/20141029030741'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[df0de42c] Command: if test ! -d /home/staging/public_html/releases/20141029030741; then echo "Directory does not exist '/home/staging/public_html/releases/20141029030741'" 1>&2; false; fi
DEBUG[df0de42c] Finished in 0.066 seconds with exit status 0 (successful).
INFO[701031b6] Running /usr/bin/env echo "ab1bd27" >> REVISION on XXX.XXX.XXX.XXX
DEBUG[701031b6] Command: cd /home/staging/public_html/releases/20141029030741 && /usr/bin/env echo "ab1bd27" >> REVISION
INFO[701031b6] Finished in 0.069 seconds with exit status 0 (successful).
INFO[3d40a99d] Running /usr/bin/env mkdir -pv /home/staging/public_html/releases/20141029030741/app/Config /home/staging/public_html/releases/20141029030741/app/Config /home/staging/public_html/releases/20141029030741/app/Config on XXX.XXX.XXX.XXX
DEBUG[3d40a99d] Command: /usr/bin/env mkdir -pv /home/staging/public_html/releases/20141029030741/app/Config /home/staging/public_html/releases/20141029030741/app/Config /home/staging/public_html/releases/20141029030741/app/Config
INFO[3d40a99d] Finished in 0.072 seconds with exit status 0 (successful).
DEBUG[6c54a578] Running /usr/bin/env [ -L /home/staging/public_html/releases/20141029030741/app/Config/core.php ] on XXX.XXX.XXX.XXX
DEBUG[6c54a578] Command: [ -L /home/staging/public_html/releases/20141029030741/app/Config/core.php ]
DEBUG[6c54a578] Finished in 0.070 seconds with exit status 1 (failed).
DEBUG[cdc747d6] Running /usr/bin/env [ -f /home/staging/public_html/releases/20141029030741/app/Config/core.php ] on XXX.XXX.XXX.XXX
DEBUG[cdc747d6] Command: [ -f /home/staging/public_html/releases/20141029030741/app/Config/core.php ]
DEBUG[cdc747d6] Finished in 0.072 seconds with exit status 0 (successful).
INFO[aadf4d59] Running /usr/bin/env rm /home/staging/public_html/releases/20141029030741/app/Config/core.php on XXX.XXX.XXX.XXX
DEBUG[aadf4d59] Command: /usr/bin/env rm /home/staging/public_html/releases/20141029030741/app/Config/core.php
INFO[aadf4d59] Finished in 0.074 seconds with exit status 0 (successful).
INFO[a8579330] Running /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/core.php /home/staging/public_html/releases/20141029030741/app/Config/core.php on XXX.XXX.XXX.XXX
DEBUG[a8579330] Command: /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/core.php /home/staging/public_html/releases/20141029030741/app/Config/core.php
INFO[a8579330] Finished in 0.079 seconds with exit status 0 (successful).
DEBUG[f90aba6e] Running /usr/bin/env [ -L /home/staging/public_html/releases/20141029030741/app/Config/database.php ] on XXX.XXX.XXX.XXX
DEBUG[f90aba6e] Command: [ -L /home/staging/public_html/releases/20141029030741/app/Config/database.php ]
DEBUG[f90aba6e] Finished in 0.070 seconds with exit status 1 (failed).
DEBUG[0c944e2a] Running /usr/bin/env [ -f /home/staging/public_html/releases/20141029030741/app/Config/database.php ] on XXX.XXX.XXX.XXX
DEBUG[0c944e2a] Command: [ -f /home/staging/public_html/releases/20141029030741/app/Config/database.php ]
DEBUG[0c944e2a] Finished in 0.069 seconds with exit status 1 (failed).
INFO[0a737e97] Running /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/database.php /home/staging/public_html/releases/20141029030741/app/Config/database.php on XXX.XXX.XXX.XXX
DEBUG[0a737e97] Command: /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/database.php /home/staging/public_html/releases/20141029030741/app/Config/database.php
INFO[0a737e97] Finished in 0.070 seconds with exit status 0 (successful).
DEBUG[0006f02c] Running /usr/bin/env [ -L /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php ] on XXX.XXX.XXX.XXX
DEBUG[0006f02c] Command: [ -L /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php ]
DEBUG[0006f02c] Finished in 0.066 seconds with exit status 1 (failed).
DEBUG[17f89a7b] Running /usr/bin/env [ -f /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php ] on XXX.XXX.XXX.XXX
DEBUG[17f89a7b] Command: [ -f /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php ]
DEBUG[17f89a7b] Finished in 0.069 seconds with exit status 0 (successful).
INFO[8ccf5020] Running /usr/bin/env rm /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php on XXX.XXX.XXX.XXX
DEBUG[8ccf5020] Command: /usr/bin/env rm /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php
INFO[8ccf5020] Finished in 0.073 seconds with exit status 0 (successful).
INFO[24d4953f] Running /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/set_environments_array.php /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php on XXX.XXX.XXX.XXX
DEBUG[24d4953f] Command: /usr/bin/env ln -s /home/staging/public_html/shared/app/Config/set_environments_array.php /home/staging/public_html/releases/20141029030741/app/Config/set_environments_array.php
INFO[24d4953f] Finished in 0.075 seconds with exit status 0 (successful).
INFO[f836e57f] Running /usr/bin/env mkdir -pv /home/staging/public_html/releases/20141029030741/app/webroot /home/staging/public_html/releases/20141029030741/app on XXX.XXX.XXX.XXX
DEBUG[f836e57f] Command: /usr/bin/env mkdir -pv /home/staging/public_html/releases/20141029030741/app/webroot /home/staging/public_html/releases/20141029030741/app
INFO[f836e57f] Finished in 0.076 seconds with exit status 0 (successful).
DEBUG[7b80f8b0] Running /usr/bin/env [ -L /home/staging/public_html/releases/20141029030741/app/webroot/files ] on XXX.XXX.XXX.XXX
DEBUG[7b80f8b0] Command: [ -L /home/staging/public_html/releases/20141029030741/app/webroot/files ]
DEBUG[7b80f8b0] Finished in 0.071 seconds with exit status 1 (failed).
DEBUG[6a905b41] Running /usr/bin/env [ -d /home/staging/public_html/releases/20141029030741/app/webroot/files ] on XXX.XXX.XXX.XXX
DEBUG[6a905b41] Command: [ -d /home/staging/public_html/releases/20141029030741/app/webroot/files ]
DEBUG[6a905b41] Finished in 0.070 seconds with exit status 1 (failed).
INFO[f536c1c4] Running /usr/bin/env ln -s /home/staging/public_html/shared/app/webroot/files /home/staging/public_html/releases/20141029030741/app/webroot/files on XXX.XXX.XXX.XXX
DEBUG[f536c1c4] Command: /usr/bin/env ln -s /home/staging/public_html/shared/app/webroot/files /home/staging/public_html/releases/20141029030741/app/webroot/files
INFO[f536c1c4] Finished in 0.068 seconds with exit status 0 (successful).
DEBUG[226013f6] Running /usr/bin/env [ -L /home/staging/public_html/releases/20141029030741/app/tmp ] on XXX.XXX.XXX.XXX
DEBUG[226013f6] Command: [ -L /home/staging/public_html/releases/20141029030741/app/tmp ]
DEBUG[226013f6] Finished in 0.069 seconds with exit status 1 (failed).
DEBUG[86a3133a] Running /usr/bin/env [ -d /home/staging/public_html/releases/20141029030741/app/tmp ] on XXX.XXX.XXX.XXX
DEBUG[86a3133a] Command: [ -d /home/staging/public_html/releases/20141029030741/app/tmp ]
DEBUG[86a3133a] Finished in 0.066 seconds with exit status 1 (failed).
INFO[5ed9a0ac] Running /usr/bin/env ln -s /home/staging/public_html/shared/app/tmp /home/staging/public_html/releases/20141029030741/app/tmp on XXX.XXX.XXX.XXX
DEBUG[5ed9a0ac] Command: /usr/bin/env ln -s /home/staging/public_html/shared/app/tmp /home/staging/public_html/releases/20141029030741/app/tmp
INFO[5ed9a0ac] Finished in 0.069 seconds with exit status 0 (successful).
INFO[f8372673] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[f8372673] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
DEBUG[f8372673] (integer) 0
INFO[f8372673] Finished in 0.073 seconds with exit status 0 (successful).
INFO[ac69fbee] Running /usr/bin/env /home/staging/public_html/current/app/Console/cake CacheBuster clearAll on XXX.XXX.XXX.XXX
DEBUG[ac69fbee] Command: /home/staging/public_html/current/app/Console/cake CacheBuster clearAll
DEBUG[ac69fbee]
DEBUG[ac69fbee] [36mWelcome to CakePHP v2.5.1 Console[0m
DEBUG[ac69fbee] ---------------------------------------------------------------
DEBUG[ac69fbee] App : app
DEBUG[ac69fbee] Path: /home/staging/public_html/releases/20141028044415/app/
DEBUG[ac69fbee] ---------------------------------------------------------------
DEBUG[ac69fbee] Cleared core cache\n
DEBUG[ac69fbee] Cleared model cache\n
DEBUG[ac69fbee] Cleared default cache\n
INFO[ac69fbee] Finished in 0.205 seconds with exit status 0 (successful).
INFO[544b255d] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[544b255d] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
INFO[544b255d] Finished in 0.065 seconds with exit status 0 (successful).
DEBUG[544b255d] (integer) 0
INFO[544b255d] Finished in 0.065 seconds with exit status 0 (successful).
DEBUG[d6ae3924] Running /usr/bin/env if test ! -d /home/staging/public_html/releases/20141029030741; then echo "Directory does not exist '/home/staging/public_html/releases/20141029030741'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[d6ae3924] Command: if test ! -d /home/staging/public_html/releases/20141029030741; then echo "Directory does not exist '/home/staging/public_html/releases/20141029030741'" 1>&2; false; fi
DEBUG[d6ae3924] Finished in 0.066 seconds with exit status 0 (successful).
INFO[5ac60d34] Running /usr/bin/env composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader on XXX.XXX.XXX.XXX
DEBUG[5ac60d34] Command: cd /home/staging/public_html/releases/20141029030741 && /usr/bin/env composer install --no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader
INFO[5ac60d34] Finished in 3.726 seconds with exit status 0 (successful).
INFO[6c3e5f04] Running /usr/bin/env /home/staging/public_html/releases/20141029030741/app/Console/cake Migrations.migration run all on XXX.XXX.XXX.XXX
DEBUG[6c3e5f04] Command: /home/staging/public_html/releases/20141029030741/app/Console/cake Migrations.migration run all
DEBUG[6c3e5f04] Cake Migration Shell
DEBUG[6c3e5f04] ---------------------------------------------------------------
DEBUG[6c3e5f04] Running migrations:
DEBUG[6c3e5f04] All migrations have completed.
DEBUG[6c3e5f04]
INFO[6c3e5f04] Finished in 0.324 seconds with exit status 0 (successful).
INFO[2e149be1] Running /usr/bin/env rm -rf /home/staging/public_html/current on XXX.XXX.XXX.XXX
DEBUG[2e149be1] Command: /usr/bin/env rm -rf /home/staging/public_html/current
INFO[2e149be1] Finished in 0.087 seconds with exit status 0 (successful).
INFO[c7f68b48] Running /usr/bin/env ln -s /home/staging/public_html/releases/20141029030741 /home/staging/public_html/current on XXX.XXX.XXX.XXX
DEBUG[c7f68b48] Command: /usr/bin/env ln -s /home/staging/public_html/releases/20141029030741 /home/staging/public_html/current
INFO[c7f68b48] Finished in 0.071 seconds with exit status 0 (successful).
INFO[102daa9a] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[102daa9a] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
DEBUG[102daa9a] (integer) 0
INFO[102daa9a] Finished in 0.072 seconds with exit status 0 (successful).
INFO[81ed0a63] Running /usr/bin/env /home/staging/public_html/current/app/Console/cake CacheBuster clearAll on XXX.XXX.XXX.XXX
DEBUG[81ed0a63] Command: /home/staging/public_html/current/app/Console/cake CacheBuster clearAll
DEBUG[81ed0a63]
DEBUG[81ed0a63] [36mWelcome to CakePHP v2.5.1 Console[0m
DEBUG[81ed0a63] ---------------------------------------------------------------
DEBUG[81ed0a63] App : app
DEBUG[81ed0a63] Path: /home/staging/public_html/releases/20141029030741/app/
DEBUG[81ed0a63] ---------------------------------------------------------------
DEBUG[81ed0a63] Cleared core cache\n
DEBUG[81ed0a63] Cleared model cache\n
DEBUG[81ed0a63] Cleared default cache\n
INFO[81ed0a63] Finished in 0.273 seconds with exit status 0 (successful).
INFO[b9ec91cd] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[b9ec91cd] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
DEBUG[b9ec91cd] (integer) 0
INFO[b9ec91cd] Finished in 0.076 seconds with exit status 0 (successful).
INFO[408af863] Running /usr/bin/env /home/staging/public_html/releases/20141029030741/app/Console/cake CakeResque.CakeResque restart on XXX.XXX.XXX.XXX
DEBUG[408af863] Command: /home/staging/public_html/releases/20141029030741/app/Console/cake CakeResque.CakeResque restart
DEBUG[408af863] [36mStopping workers[0m
DEBUG[408af863] Stopping 29660 ...
DEBUG[408af863] [32mDone[0m
DEBUG[408af863]
DEBUG[408af863] [36mRestarting workers[0m
DEBUG[408af863] Starting worker
DEBUG[408af863] .
DEBUG[408af863] .
DEBUG[408af863] .
DEBUG[408af863] [32mDone[0m
DEBUG[408af863]
INFO[408af863] Finished in 0.653 seconds with exit status 0 (successful).
DEBUG[60e8f157] Running /usr/bin/env ls -x /home/staging/public_html/releases on XXX.XXX.XXX.XXX
DEBUG[60e8f157] Command: /usr/bin/env ls -x /home/staging/public_html/releases
DEBUG[60e8f157] 20141028032858 20141028035359 20141028035426 20141028040747 20141028044415
DEBUG[60e8f157] 20141029030741
DEBUG[60e8f157] Finished in 0.071 seconds with exit status 0 (successful).
INFOKeeping 5 of 6 deployed releases on XXX.XXX.XXX.XXX
INFO[dbd75ea3] Running /usr/bin/env rm -rf /home/staging/public_html/releases/20141028032858 on XXX.XXX.XXX.XXX
DEBUG[dbd75ea3] Command: /usr/bin/env rm -rf /home/staging/public_html/releases/20141028032858
INFO[dbd75ea3] Finished in 1.436 seconds with exit status 0 (successful).
DEBUG[9cee442e] Running /usr/bin/env if test ! -d /home/staging/public_html/releases; then echo "Directory does not exist '/home/staging/public_html/releases'" 1>&2; false; fi on XXX.XXX.XXX.XXX
DEBUG[9cee442e] Command: if test ! -d /home/staging/public_html/releases; then echo "Directory does not exist '/home/staging/public_html/releases'" 1>&2; false; fi
DEBUG[9cee442e] Finished in 0.061 seconds with exit status 0 (successful).
INFO[a21541e1] Running /usr/bin/env echo "Branch master (at ab1bd27) deployed as release 20141029030741 by joshuapaling" >> /home/staging/public_html/revisions.log on XXX.XXX.XXX.XXX
DEBUG[a21541e1] Command: echo "Branch master (at ab1bd27) deployed as release 20141029030741 by joshuapaling" >> /home/staging/public_html/revisions.log
INFO[a21541e1] Finished in 0.066 seconds with exit status 0 (successful).
INFO[4fbc6050] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[4fbc6050] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
INFO[4fbc6050] Finished in 0.062 seconds with exit status 0 (successful).
DEBUG[4fbc6050] (integer) 0
INFO[4fbc6050] Finished in 0.062 seconds with exit status 0 (successful).
INFO[9fb28688] Running /usr/bin/env /home/staging/public_html/current/app/Console/cake CacheBuster clearAll on XXX.XXX.XXX.XXX
DEBUG[9fb28688] Command: /home/staging/public_html/current/app/Console/cake CacheBuster clearAll
DEBUG[9fb28688]
DEBUG[9fb28688] [36mWelcome to CakePHP v2.5.1 Console[0m
DEBUG[9fb28688] ---------------------------------------------------------------
DEBUG[9fb28688] App : app
DEBUG[9fb28688] Path: /home/staging/public_html/releases/20141029030741/app/
DEBUG[9fb28688] ---------------------------------------------------------------
DEBUG[9fb28688] Cleared core cache\n
DEBUG[9fb28688] Cleared model cache\n
DEBUG[9fb28688] Cleared default cache\n
INFO[9fb28688] Finished in 0.180 seconds with exit status 0 (successful).
INFO[e2ce2679] Running /usr/bin/env redis-cli -n 5 DEL big_staging_cake_core_file_map on XXX.XXX.XXX.XXX
DEBUG[e2ce2679] Command: redis-cli -n 5 DEL big_staging_cake_core_file_map
DEBUG[e2ce2679] (integer) 0
INFO[e2ce2679] Finished in 0.066 seconds with exit status 0 (successful).
SEE both files from 20141027095455 and 20141014223923
2014-10-29 10:54:39 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getMerchTasksThisFortnight' at line 1
Request URL: /merch/tasks?debugon=%60
Stack Trace:
#0 /home/deploy/public_html/releases/20141027095455/lib/Cake/Model/Datasource/DboSource.php(458): PDOStatement->execute(Array)
#1 /home/deploy/public_html/releases/20141027095455/lib/Cake/Model/Datasource/DboSource.php(424): DboSource->_execute('getMerchTasksTh...', Array)
#2 /home/deploy/public_html/releases/20141027095455/lib/Cake/Model/Datasource/DboSource.php(666): DboSource->execute('getMerchTasksTh...', Array, Array)
#3 /home/deploy/public_html/releases/20141027095455/lib/Cake/Model/Datasource/DboSource.php(609): DboSource->fetchAll('getMerchTasksTh...', Array, Array)
#4 /home/deploy/public_html/releases/20141027095455/lib/Cake/Model/Model.php(800): DboSource->query('getMerchTasksTh...', Array, Object(Task))
#5 /home/deploy/public_html/releases/20141014223923/app/Controller/TasksController.php(28): Model->__call('getMerchTasksTh...', Array)
#6 /home/deploy/public_html/releases/20141014223923/app/Controller/TasksController.php(28): Task->getMerchTasksThisFortnight('351', '2014-10-27 00:0...', '2014-11-09 23:5...')
#7 [internal function]: TasksController->merch_index()
#8 /home/deploy/public_html/releases/20141014223923/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(TasksController), Array)
#9 /home/deploy/public_html/releases/20141014223923/lib/Cake/Routing/Dispatcher.php(191): Controller->invokeAction(Object(CakeRequest))
#10 /home/deploy/public_html/releases/20141014223923/lib/Cake/Routing/Dispatcher.php(165): Dispatcher->_invoke(Object(TasksController), Object(CakeRequest))
#11 /home/deploy/public_html/releases/20141014223923/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#12 {main}
capistrano v3
I've got staging and production on the same server - both isolated under separate user accounts.
I'm using redis for caching, and ATM staging and production share a single redis instance, but use different database numbers, and different key prefixes.
I'm using CakeResque, and it uses redis - separate database numbers again, for both staging and prod.
I'm using nginx, php-fgm. The server is not set up by me, it's set up with puppet by a company who know what they're doing.
I wrote all the capistrano stuff, and it's pretty stock-standard.
My linked files:
```
set :linked_files, %w{app/Config/core.php app/Config/database.php app/Config/set_environments_array.php}
```
My linked dirs:
```
set :linked_dirs, %w{app/webroot/files app/tmp}
```
My shared dirs:
```
set :shared_dirs, %w{
app/webroot/files
app/tmp/cache/models/
app/tmp/cache/views/
app/tmp/cache/persistent/
app/tmp/cache/sessions/
app/tmp/logs/
}
```
I've got some custom tasks -
1. backup the database (`after 'deploy:started', 'database:backup'`)
2. run cake migrations (`after 'deploy:updated', 'deploy:migrate_all'`)
3. Restart resque workers (`after 'deploy:published', 'resque:restart'`)
4. Clear cache - this one's a bit of a shit. I manually delete the cake core file map, then run a cake shell script to clear the cache through cake, then manually delete the file map again:
```
execute "redis-cli -n #{db} DEL #{prefix}cake_core_file_map"
execute "#{current_path}/app/Console/cake CacheBuster clearAll"
execute "redis-cli -n #{db} DEL #{prefix}cake_core_file_map"
```
And I run the clear cache task a few times throughout the demployemnt, and have wrappers around each separate time since otherwise a rake task only runs once. This stuff (all the clearing many times, and manually clearing the file map) was done attempting to debug the issue where capistrano includes some files from previous releases. I thought I'd fixed it but apparently not.
I was NOT restarting nginx at any point in the deployment.
Capfile
```
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/composer'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment