mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Fixing version of jekyll
This commit is contained in:
parent
781271c95c
commit
3f33beedb4
11 changed files with 98 additions and 96 deletions
2
Gemfile
2
Gemfile
|
@ -1,7 +1,7 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "debugger"
|
gem "debugger"
|
||||||
gem "jekyll"
|
gem "jekyll", "~> 1.1.2"
|
||||||
gem "redcarpet"
|
gem "redcarpet"
|
||||||
gem "unindent"
|
gem "unindent"
|
||||||
gem "git"
|
gem "git"
|
||||||
|
|
|
@ -17,18 +17,19 @@ GEM
|
||||||
fast-stemmer (1.0.2)
|
fast-stemmer (1.0.2)
|
||||||
git (1.2.5)
|
git (1.2.5)
|
||||||
highline (1.6.19)
|
highline (1.6.19)
|
||||||
jekyll (1.0.2)
|
jekyll (1.1.2)
|
||||||
classifier (~> 1.3)
|
classifier (~> 1.3)
|
||||||
colorator (~> 0.1)
|
colorator (~> 0.1)
|
||||||
commander (~> 4.1.3)
|
commander (~> 4.1.3)
|
||||||
directory_watcher (~> 1.4.1)
|
directory_watcher (~> 1.4.1)
|
||||||
kramdown (~> 1.0.2)
|
kramdown (~> 1.0.2)
|
||||||
liquid (~> 2.3)
|
liquid (~> 2.5.1)
|
||||||
maruku (~> 0.5)
|
maruku (~> 0.5)
|
||||||
pygments.rb (~> 0.5.0)
|
pygments.rb (~> 0.5.0)
|
||||||
|
redcarpet (~> 2.2.2)
|
||||||
safe_yaml (~> 0.7.0)
|
safe_yaml (~> 0.7.0)
|
||||||
kramdown (1.0.2)
|
kramdown (1.0.2)
|
||||||
liquid (2.5.0)
|
liquid (2.5.1)
|
||||||
maruku (0.6.1)
|
maruku (0.6.1)
|
||||||
syntax (>= 1.0.0)
|
syntax (>= 1.0.0)
|
||||||
posix-spawn (0.3.6)
|
posix-spawn (0.3.6)
|
||||||
|
@ -47,6 +48,6 @@ PLATFORMS
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
debugger
|
debugger
|
||||||
git
|
git
|
||||||
jekyll
|
jekyll (~> 1.1.2)
|
||||||
redcarpet
|
redcarpet
|
||||||
unindent
|
unindent
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "debugger"
|
gem "debugger"
|
||||||
gem "jekyll"
|
gem "jekyll", "~> 1.1.2"
|
||||||
gem "redcarpet"
|
gem "redcarpet"
|
||||||
gem "unindent"
|
gem "unindent"
|
||||||
gem "git"
|
gem "git"
|
||||||
|
|
|
@ -17,18 +17,19 @@ GEM
|
||||||
fast-stemmer (1.0.2)
|
fast-stemmer (1.0.2)
|
||||||
git (1.2.5)
|
git (1.2.5)
|
||||||
highline (1.6.19)
|
highline (1.6.19)
|
||||||
jekyll (1.0.2)
|
jekyll (1.1.2)
|
||||||
classifier (~> 1.3)
|
classifier (~> 1.3)
|
||||||
colorator (~> 0.1)
|
colorator (~> 0.1)
|
||||||
commander (~> 4.1.3)
|
commander (~> 4.1.3)
|
||||||
directory_watcher (~> 1.4.1)
|
directory_watcher (~> 1.4.1)
|
||||||
kramdown (~> 1.0.2)
|
kramdown (~> 1.0.2)
|
||||||
liquid (~> 2.3)
|
liquid (~> 2.5.1)
|
||||||
maruku (~> 0.5)
|
maruku (~> 0.5)
|
||||||
pygments.rb (~> 0.5.0)
|
pygments.rb (~> 0.5.0)
|
||||||
|
redcarpet (~> 2.2.2)
|
||||||
safe_yaml (~> 0.7.0)
|
safe_yaml (~> 0.7.0)
|
||||||
kramdown (1.0.2)
|
kramdown (1.0.2)
|
||||||
liquid (2.5.0)
|
liquid (2.5.1)
|
||||||
maruku (0.6.1)
|
maruku (0.6.1)
|
||||||
syntax (>= 1.0.0)
|
syntax (>= 1.0.0)
|
||||||
posix-spawn (0.3.6)
|
posix-spawn (0.3.6)
|
||||||
|
@ -47,6 +48,6 @@ PLATFORMS
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
debugger
|
debugger
|
||||||
git
|
git
|
||||||
jekyll
|
jekyll (~> 1.1.2)
|
||||||
redcarpet
|
redcarpet
|
||||||
unindent
|
unindent
|
||||||
|
|
|
@ -170,9 +170,9 @@ what happens:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
|
||||||
me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
||||||
Interactive
|
Interactive
|
||||||
me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
||||||
Login shell</code></pre>
|
Login shell</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -180,9 +180,9 @@ Login shell</code></pre>
|
||||||
command line without logging in first...</p>
|
command line without logging in first...</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
|
||||||
Interactive
|
Interactive
|
||||||
me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
|
me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
|
||||||
Not login shell</code></pre>
|
Not login shell</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -197,13 +197,13 @@ recipes to test this:</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
|
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
|
||||||
task :query_interactive do
|
task :query_interactive do
|
||||||
on 'me@remote' do
|
on 'me@remote' do
|
||||||
info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
|
info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
task :query_login do
|
task :query_login do
|
||||||
on 'me@remote' do
|
on 'me@remote' do
|
||||||
info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
|
info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
|
||||||
end
|
end
|
||||||
end</code></pre>
|
end</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -298,9 +298,9 @@ what happens:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
|
||||||
me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
|
||||||
Interactive
|
Interactive
|
||||||
me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
|
||||||
Login shell</code></pre>
|
Login shell</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -308,9 +308,9 @@ Login shell</code></pre>
|
||||||
command line without logging in first...</p>
|
command line without logging in first...</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
|
||||||
Interactive
|
Interactive
|
||||||
me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
|
me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
|
||||||
Not login shell</code></pre>
|
Not login shell</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -325,13 +325,13 @@ recipes to test this:</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
|
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
|
||||||
task :query_interactive do
|
task :query_interactive do
|
||||||
on 'me@remote' do
|
on 'me@remote' do
|
||||||
info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
|
info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
task :query_login do
|
task :query_login do
|
||||||
on 'me@remote' do
|
on 'me@remote' do
|
||||||
info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
|
info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
|
||||||
end
|
end
|
||||||
end</code></pre>
|
end</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -160,7 +160,7 @@ quits or gets fired, you can remove their key from that file, and the rest of
|
||||||
you can keep on shipping!</p>
|
you can keep on shipping!</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
|
<p>You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
|
||||||
|
@ -238,7 +238,7 @@ use the same key for each one, but only one key per developer is recommended.
|
||||||
<p>If we did all that correctly, we should now be able to do something like this:</p>
|
<p>If we did all that correctly, we should now be able to do something like this:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
|
||||||
one-of-my-servers.com
|
one-of-my-servers.com
|
||||||
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
|
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -298,9 +298,9 @@ Tutorials project.</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
|
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
|
||||||
me@localhost $ ssh-add -l
|
me@localhost $ ssh-add -l
|
||||||
# Make sure they key is loaded if 'ssh-add -l' didn't show anything
|
# Make sure they key is loaded if 'ssh-add -l' didn't show anything
|
||||||
me@localhost $ ssh-add
|
me@localhost $ ssh-add
|
||||||
me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
|
me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>We first check that the agent has the keys loaded. If not we simply load it
|
<p>We first check that the agent has the keys loaded. If not we simply load it
|
||||||
|
@ -318,7 +318,7 @@ it both ways just to know how your system treats agent forwarding by default.</p
|
||||||
specified on a per-host basis in a configuration file.
|
specified on a per-host basis in a configuration file.
|
||||||
|
|
||||||
Agent forwarding should be enabled with caution. Users with the ability to
|
Agent forwarding should be enabled with caution. Users with the ability to
|
||||||
bypass file permissions on the remote host (for the agent's UNIX-domain
|
bypass file permissions on the remote host (for the agent's UNIX-domain
|
||||||
socket) can access the local agent through the forwarded connection. An
|
socket) can access the local agent through the forwarded connection. An
|
||||||
attacker cannot obtain key material from the agent, however they can perform
|
attacker cannot obtain key material from the agent, however they can perform
|
||||||
operations on the keys that enable them to authenticate using the identities
|
operations on the keys that enable them to authenticate using the identities
|
||||||
|
@ -344,8 +344,8 @@ Github, we'll be prompted for a username and password:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
|
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
|
||||||
Username for 'https://github.com': myownusername
|
Username for 'https://github.com': myownusername
|
||||||
Password for 'https://capistrano@github.com':</code></pre>
|
Password for 'https://capistrano@github.com':</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>This challenge response prompt doesn't work well for automating things, so
|
<p>This challenge response prompt doesn't work well for automating things, so
|
||||||
|
@ -431,7 +431,7 @@ access that you may or may not need depending how well your servers are setup:</
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
|
||||||
# Capistrano will use /var/www/....... where ... is the value set in
|
# Capistrano will use /var/www/....... where ... is the value set in
|
||||||
# :application, you can override this by setting the ':deploy_to' variable
|
# :application, you can override this by setting the ':deploy_to' variable
|
||||||
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
|
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
|
||||||
root@remote $ mkdir ${deploy_to}
|
root@remote $ mkdir ${deploy_to}
|
||||||
root@remote $ chown deploy:deploy ${deploy_to}
|
root@remote $ chown deploy:deploy ${deploy_to}
|
||||||
|
@ -520,7 +520,7 @@ quits or gets fired, you can remove their key from that file, and the rest of
|
||||||
you can keep on shipping!</p>
|
you can keep on shipping!</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
|
<p>You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
|
||||||
|
@ -598,7 +598,7 @@ use the same key for each one, but only one key per developer is recommended.
|
||||||
<p>If we did all that correctly, we should now be able to do something like this:</p>
|
<p>If we did all that correctly, we should now be able to do something like this:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
|
||||||
one-of-my-servers.com
|
one-of-my-servers.com
|
||||||
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
|
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -658,9 +658,9 @@ Tutorials project.</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
|
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
|
||||||
me@localhost $ ssh-add -l
|
me@localhost $ ssh-add -l
|
||||||
# Make sure they key is loaded if 'ssh-add -l' didn't show anything
|
# Make sure they key is loaded if 'ssh-add -l' didn't show anything
|
||||||
me@localhost $ ssh-add
|
me@localhost $ ssh-add
|
||||||
me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
|
me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>We first check that the agent has the keys loaded. If not we simply load it
|
<p>We first check that the agent has the keys loaded. If not we simply load it
|
||||||
|
@ -678,7 +678,7 @@ it both ways just to know how your system treats agent forwarding by default.</p
|
||||||
specified on a per-host basis in a configuration file.
|
specified on a per-host basis in a configuration file.
|
||||||
|
|
||||||
Agent forwarding should be enabled with caution. Users with the ability to
|
Agent forwarding should be enabled with caution. Users with the ability to
|
||||||
bypass file permissions on the remote host (for the agent's UNIX-domain
|
bypass file permissions on the remote host (for the agent's UNIX-domain
|
||||||
socket) can access the local agent through the forwarded connection. An
|
socket) can access the local agent through the forwarded connection. An
|
||||||
attacker cannot obtain key material from the agent, however they can perform
|
attacker cannot obtain key material from the agent, however they can perform
|
||||||
operations on the keys that enable them to authenticate using the identities
|
operations on the keys that enable them to authenticate using the identities
|
||||||
|
@ -704,8 +704,8 @@ Github, we'll be prompted for a username and password:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
|
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
|
||||||
Username for 'https://github.com': myownusername
|
Username for 'https://github.com': myownusername
|
||||||
Password for 'https://capistrano@github.com':</code></pre>
|
Password for 'https://capistrano@github.com':</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>This challenge response prompt doesn't work well for automating things, so
|
<p>This challenge response prompt doesn't work well for automating things, so
|
||||||
|
@ -791,7 +791,7 @@ access that you may or may not need depending how well your servers are setup:</
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
|
||||||
# Capistrano will use /var/www/....... where ... is the value set in
|
# Capistrano will use /var/www/....... where ... is the value set in
|
||||||
# :application, you can override this by setting the ':deploy_to' variable
|
# :application, you can override this by setting the ':deploy_to' variable
|
||||||
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
|
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
|
||||||
root@remote $ mkdir ${deploy_to}
|
root@remote $ mkdir ${deploy_to}
|
||||||
root@remote $ chown deploy:deploy ${deploy_to}
|
root@remote $ chown deploy:deploy ${deploy_to}
|
||||||
|
|
|
@ -127,7 +127,7 @@ technologies.</p>
|
||||||
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
|
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
|
||||||
my-application:
|
my-application:
|
||||||
total 8
|
total 8
|
||||||
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
|
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
|
||||||
|
@ -229,7 +229,7 @@ DEBUG [118bd3e4] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
|
||||||
INFO [118bd3e4] Finished in 0.049 seconds command successful.
|
INFO [118bd3e4] Finished in 0.049 seconds command successful.
|
||||||
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
|
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
|
||||||
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
|
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
|
||||||
DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
|
DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
|
||||||
DEBUG [a996463f] Permission denied (publickey).
|
DEBUG [a996463f] Permission denied (publickey).
|
||||||
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
|
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
|
||||||
cap aborted!
|
cap aborted!
|
||||||
|
@ -295,7 +295,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
|
||||||
<p>If you don't feel like writing a Capistrano task, one could simply do:</p>
|
<p>If you don't feel like writing a Capistrano task, one could simply do:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
|
||||||
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
|
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ technologies.</p>
|
||||||
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
|
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
|
||||||
my-application:
|
my-application:
|
||||||
total 8
|
total 8
|
||||||
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
|
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
|
||||||
|
@ -449,7 +449,7 @@ DEBUG [118bd3e4] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
|
||||||
INFO [118bd3e4] Finished in 0.049 seconds command successful.
|
INFO [118bd3e4] Finished in 0.049 seconds command successful.
|
||||||
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
|
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
|
||||||
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
|
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
|
||||||
DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
|
DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
|
||||||
DEBUG [a996463f] Permission denied (publickey).
|
DEBUG [a996463f] Permission denied (publickey).
|
||||||
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
|
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
|
||||||
cap aborted!
|
cap aborted!
|
||||||
|
@ -515,7 +515,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
|
||||||
<p>If you don't feel like writing a Capistrano task, one could simply do:</p>
|
<p>If you don't feel like writing a Capistrano task, one could simply do:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
|
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
|
||||||
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
|
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -155,11 +155,11 @@ cleanup process is usually different from deploy flow.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'># Capfile
|
<pre data-line=''><code class='language-ruby'># Capfile
|
||||||
require 'capistrano/setup'
|
require 'capistrano/setup'
|
||||||
require 'capistrano/deploy'
|
require 'capistrano/deploy'
|
||||||
require 'capistrano/bundler'
|
require 'capistrano/bundler'
|
||||||
require 'capistrano/rails/migrations'
|
require 'capistrano/rails/migrations'
|
||||||
require 'capistrano/rails/assets'</code></pre>
|
require 'capistrano/rails/assets'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p>
|
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p>
|
||||||
|
@ -273,11 +273,11 @@ cleanup process is usually different from deploy flow.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'># Capfile
|
<pre data-line=''><code class='language-ruby'># Capfile
|
||||||
require 'capistrano/setup'
|
require 'capistrano/setup'
|
||||||
require 'capistrano/deploy'
|
require 'capistrano/deploy'
|
||||||
require 'capistrano/bundler'
|
require 'capistrano/bundler'
|
||||||
require 'capistrano/rails/migrations'
|
require 'capistrano/rails/migrations'
|
||||||
require 'capistrano/rails/assets'</code></pre>
|
require 'capistrano/rails/assets'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p>
|
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p>
|
||||||
|
|
|
@ -168,7 +168,7 @@ gems</a>)</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>group :development do
|
<pre data-line=''><code class='language-ruby'>group :development do
|
||||||
gem 'capistrano-rails', '~> 0.0.7'
|
gem 'capistrano-rails', '~> 0.0.7'
|
||||||
end</code></pre>
|
end</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -194,9 +194,9 @@ part, to get the best, and most sensible results, simply <code>require</code> th
|
||||||
files:</p>
|
files:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
|
<pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
|
||||||
require 'capistrano/rails/gem-bundler'
|
require 'capistrano/rails/gem-bundler'
|
||||||
require 'capistrano/rails/database-migrations'</code></pre>
|
require 'capistrano/rails/database-migrations'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
|
@ -207,7 +207,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
|
||||||
like:
|
like:
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>gem 'capistrano', '~> 2.15' # Or whatever patch release you are using</code></pre>
|
<pre data-line=''><code class='language-ruby'>gem 'capistrano', '~> 2.15' # Or whatever patch release you are using</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which
|
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which
|
||||||
|
@ -286,7 +286,7 @@ gems</a>)</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>group :development do
|
<pre data-line=''><code class='language-ruby'>group :development do
|
||||||
gem 'capistrano-rails', '~> 0.0.7'
|
gem 'capistrano-rails', '~> 0.0.7'
|
||||||
end</code></pre>
|
end</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -312,9 +312,9 @@ part, to get the best, and most sensible results, simply <code>require</code> th
|
||||||
files:</p>
|
files:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
|
<pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
|
||||||
require 'capistrano/rails/gem-bundler'
|
require 'capistrano/rails/gem-bundler'
|
||||||
require 'capistrano/rails/database-migrations'</code></pre>
|
require 'capistrano/rails/database-migrations'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
|
@ -325,7 +325,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
|
||||||
like:
|
like:
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>gem 'capistrano', '~> 2.15' # Or whatever patch release you are using</code></pre>
|
<pre data-line=''><code class='language-ruby'>gem 'capistrano', '~> 2.15' # Or whatever patch release you are using</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which
|
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which
|
||||||
|
|
|
@ -212,7 +212,7 @@ role :db, %w{example.com}
|
||||||
# definition into the server list. The second argument
|
# definition into the server list. The second argument
|
||||||
# is something that quacks like a hash and can be used
|
# is something that quacks like a hash and can be used
|
||||||
# to set extended properties on the server.
|
# to set extended properties on the server.
|
||||||
server 'example.com', roles: %w{web app}, my_property: :my_value
|
server 'example.com', roles: %w{web app}, my_property: :my_value
|
||||||
|
|
||||||
# set :rails_env, :staging</code></pre>
|
# set :rails_env, :staging</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -237,8 +237,8 @@ server line after the comment:</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
|
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
|
||||||
# ...is the same as doing...
|
# ...is the same as doing...
|
||||||
server 'world.com' roles: [:web], user: 'hello'
|
server 'world.com' roles: [:web], user: 'hello'
|
||||||
server 'example.com', roles: [:web], port: 1234</code></pre>
|
server 'example.com', roles: [:web], port: 1234</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
|
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
|
||||||
|
@ -252,8 +252,8 @@ self-documenting, commented-out configuration options, feel free to play with
|
||||||
them a little:</p>
|
them a little:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>set :application, 'my app name'
|
<pre data-line=''><code class='language-ruby'>set :application, 'my app name'
|
||||||
set :repo_url, 'git@example.com:me/my_repo.git'
|
set :repo_url, 'git@example.com:me/my_repo.git'
|
||||||
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
|
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -275,9 +275,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
|
||||||
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
|
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
|
<pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
|
||||||
set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
|
set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
|
||||||
set :branch, 'master'</code></pre>
|
set :branch, 'master'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>I've simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a
|
<p>I've simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a
|
||||||
|
@ -404,7 +404,7 @@ role :db, %w{example.com}
|
||||||
# definition into the server list. The second argument
|
# definition into the server list. The second argument
|
||||||
# is something that quacks like a hash and can be used
|
# is something that quacks like a hash and can be used
|
||||||
# to set extended properties on the server.
|
# to set extended properties on the server.
|
||||||
server 'example.com', roles: %w{web app}, my_property: :my_value
|
server 'example.com', roles: %w{web app}, my_property: :my_value
|
||||||
|
|
||||||
# set :rails_env, :staging</code></pre>
|
# set :rails_env, :staging</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -429,8 +429,8 @@ server line after the comment:</p>
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
|
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
|
||||||
# ...is the same as doing...
|
# ...is the same as doing...
|
||||||
server 'world.com' roles: [:web], user: 'hello'
|
server 'world.com' roles: [:web], user: 'hello'
|
||||||
server 'example.com', roles: [:web], port: 1234</code></pre>
|
server 'example.com', roles: [:web], port: 1234</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
|
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
|
||||||
|
@ -444,8 +444,8 @@ self-documenting, commented-out configuration options, feel free to play with
|
||||||
them a little:</p>
|
them a little:</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>set :application, 'my app name'
|
<pre data-line=''><code class='language-ruby'>set :application, 'my app name'
|
||||||
set :repo_url, 'git@example.com:me/my_repo.git'
|
set :repo_url, 'git@example.com:me/my_repo.git'
|
||||||
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
|
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -467,9 +467,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
|
||||||
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
|
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
|
<pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
|
||||||
set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
|
set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
|
||||||
set :branch, 'master'</code></pre>
|
set :branch, 'master'</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>I've simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a
|
<p>I've simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a
|
||||||
|
|
|
@ -217,7 +217,7 @@ task :ditty do
|
||||||
# we can reflect on the `host` object passed to the block
|
# we can reflect on the `host` object passed to the block
|
||||||
# and use the `info` logger method to benefit from the
|
# and use the `info` logger method to benefit from the
|
||||||
# output formatter that is selected.
|
# output formatter that is selected.
|
||||||
uptime = capture('uptime')
|
uptime = capture('uptime')
|
||||||
if host.roles.include?(:web)
|
if host.roles.include?(:web)
|
||||||
info "Your webserver #{host} has uptime: #{uptime}"
|
info "Your webserver #{host} has uptime: #{uptime}"
|
||||||
end
|
end
|
||||||
|
@ -228,8 +228,8 @@ task :ditty do
|
||||||
# and move the process into a directoy, executing arbitrary tasks
|
# and move the process into a directoy, executing arbitrary tasks
|
||||||
# such as letting Rails do some heavy lifting.
|
# such as letting Rails do some heavy lifting.
|
||||||
with({:rails_env => :production}) do
|
with({:rails_env => :production}) do
|
||||||
within('/var/www/my/rails/app') do
|
within('/var/www/my/rails/app') do
|
||||||
execute :rails, :runner, 'MyModel.something'
|
execute :rails, :runner, 'MyModel.something'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -238,8 +238,8 @@ task :ditty do
|
||||||
# We can even switch users, provided we have support on the remote
|
# We can even switch users, provided we have support on the remote
|
||||||
# server for switching to that user without being prompted for a
|
# server for switching to that user without being prompted for a
|
||||||
# passphrase.
|
# passphrase.
|
||||||
as 'postgres' do
|
as 'postgres' do
|
||||||
widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
|
widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
|
||||||
if widgets.to_i < 50
|
if widgets.to_i < 50
|
||||||
warn "There are fewer than 50 widgets in the database on #{host}!"
|
warn "There are fewer than 50 widgets in the database on #{host}!"
|
||||||
end
|
end
|
||||||
|
@ -249,7 +249,7 @@ task :ditty do
|
||||||
on roles(:all) do
|
on roles(:all) do
|
||||||
# We can even use `test` the way the Unix gods intended
|
# We can even use `test` the way the Unix gods intended
|
||||||
if test("[ -d /some/directory ]")
|
if test("[ -d /some/directory ]")
|
||||||
info "Phew, it's ok, the directory exists!"
|
info "Phew, it's ok, the directory exists!"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ task :ditty do
|
||||||
# we can reflect on the `host` object passed to the block
|
# we can reflect on the `host` object passed to the block
|
||||||
# and use the `info` logger method to benefit from the
|
# and use the `info` logger method to benefit from the
|
||||||
# output formatter that is selected.
|
# output formatter that is selected.
|
||||||
uptime = capture('uptime')
|
uptime = capture('uptime')
|
||||||
if host.roles.include?(:web)
|
if host.roles.include?(:web)
|
||||||
info "Your webserver #{host} has uptime: #{uptime}"
|
info "Your webserver #{host} has uptime: #{uptime}"
|
||||||
end
|
end
|
||||||
|
@ -384,8 +384,8 @@ task :ditty do
|
||||||
# and move the process into a directoy, executing arbitrary tasks
|
# and move the process into a directoy, executing arbitrary tasks
|
||||||
# such as letting Rails do some heavy lifting.
|
# such as letting Rails do some heavy lifting.
|
||||||
with({:rails_env => :production}) do
|
with({:rails_env => :production}) do
|
||||||
within('/var/www/my/rails/app') do
|
within('/var/www/my/rails/app') do
|
||||||
execute :rails, :runner, 'MyModel.something'
|
execute :rails, :runner, 'MyModel.something'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -394,8 +394,8 @@ task :ditty do
|
||||||
# We can even switch users, provided we have support on the remote
|
# We can even switch users, provided we have support on the remote
|
||||||
# server for switching to that user without being prompted for a
|
# server for switching to that user without being prompted for a
|
||||||
# passphrase.
|
# passphrase.
|
||||||
as 'postgres' do
|
as 'postgres' do
|
||||||
widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
|
widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
|
||||||
if widgets.to_i < 50
|
if widgets.to_i < 50
|
||||||
warn "There are fewer than 50 widgets in the database on #{host}!"
|
warn "There are fewer than 50 widgets in the database on #{host}!"
|
||||||
end
|
end
|
||||||
|
@ -405,7 +405,7 @@ task :ditty do
|
||||||
on roles(:all) do
|
on roles(:all) do
|
||||||
# We can even use `test` the way the Unix gods intended
|
# We can even use `test` the way the Unix gods intended
|
||||||
if test("[ -d /some/directory ]")
|
if test("[ -d /some/directory ]")
|
||||||
info "Phew, it's ok, the directory exists!"
|
info "Phew, it's ok, the directory exists!"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue