This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proot@li220-252:~] puppetd -t --server puppet.cyberswat.com | |
warning: peer certificate won't be verified in this SSL session | |
info: Caching certificate for li220-252.members.linode.com | |
pcilib: Cannot open /proc/bus/pci | |
lspci: Cannot find any working access method. | |
info: Caching certificate_revocation_list for ca | |
info: Caching catalog for li220-252.members.linode.com | |
info: Applying configuration version '1330405985' | |
info: Creating state file /var/lib/puppet/state/state.yaml | |
notice: Finished catalog run in 0.05 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch to the jenkins user | |
[root@li220-252:~] su jenkins | |
jenkins@li220-252:/root$ | |
# Generate the key | |
jenkins@li220-252:~$ ssh-keygen -t rsa -C "[email protected]" | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/root/.ssh/id_rsa): | |
Enter passphrase (empty for no passphrase): | |
Enter same passphrase again: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins@li220-252:~$ cat ~/.ssh/id_rsa.pub | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtqqYyeKldKj3lCh6sQ1sKHUNiKQigZx2kmT2+mRKvsZJdZHg/qmGKvhtJRf90DOPklvU1z1/x+ey0hCzP7qOfNNNZLadz9ZLAhR6Dk4jlerAMtS9zMoPZL/yEeQE24gUKAKrcXSpxUrCpAJw2Za1OdyEEoBiPSp+PIiYS/Hm4KrQC5Sj4KOr9cu6bWClmWNCXPFQDFBiEt1MxJ0P9lLTlejMrFlbc4iCeDXXT1P7WCtX/3UCcvsm92ZwgoNfBPqVADC1VytH0X6WsMLgdDiF67ZmDXxT4LTnl6ACbaMw6IZyafyQs4sWC4ecgDa2pDlFKzw9a2/yywtZME3V/6Qlsw== [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# switch to the jenkins user | |
[root@li220-252:~] su jenkins | |
jenkins@li220-252:/root$ | |
# Move into the jenkins directory | |
jenkins@li220-252:~$ cd /var/lib/jenkins/ | |
# Intialize a git repository | |
jenkins@li220-252:~$ git init | |
Initialized empty Git repository in /var/lib/jenkins/.git/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Move into the jenkins directory | |
cd /var/lib/jenkins | |
#Add all top level xml files. | |
git add *.xml | |
# Add all job config.xml files. | |
git add jobs/*/config.xml | |
# Add all user config.xml files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dirty ruby syslog | |
def log(msg) | |
Syslog.open($0, Syslog::LOG_PID | Syslog::LOG_CONS) { |s| s.warning "#{msg}" } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drupal is a vivid and exciting community, creating and maintaining an ecosystem | |
of talent in many different areas of knowledge. When it comes to discussing and | |
embracing the future of Drupal, developers are the front line, making sure we | |
are capable of meeting our clients needs while delivering performant applications | |
more efficiently and securely. | |
The Coding and Development track for Drupalcon Sao Paoulo is dedicated to | |
the new options, capabilities and direction that will shape the future of Drupal. | |
We will offer many must-see sessions with a focus on the RESTful future of | |
Drupal and harnessing the power of the Symfony framework. We will introduce you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clean_releases(vars) | |
directories = [] | |
Dir.entries(vars[:directory]).each do |f| | |
directories.push f if (f=~/^#{vars[:app_name]}-[0-9]+/) | |
end | |
directories.sort.reverse.drop(vars[:quantity]).each do |i| | |
system "rm -rf #{vars[:directory]}/#{i}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files_sorted_by_time = Dir["#{node[:drupal][:server][:base]}/#{site_name}/releases/*"].sort_by{ |f| File.mtime(f) } | |
previous_release = files_sorted_by_time.length > 1 ? files_sorted_by_time[1] : files_sorted_by_time[0] | |
command <<-EOF | |
cp #{files_sorted_by_time[file_index]}/#{site[:settings]} #{release_path}/#{site[:settings]} | |
EOF | |
only_if { ::File.exists?("#{files_sorted_by_time[-2]}/#{site[:settings]}") } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'tempfile' | |
action :ensure do | |
t_file = Tempfile.new('/root/.profile_temp') | |
::File.open(new_resource.profile, 'r') do |f| | |
f.each_line do |line| | |
if line.match(/PATH=/) | |
if ::File.readlines(new_resource.profile).grep(/:#{new_resource.path.gsub('/','\/')}/).length > 0 | |
t_file.puts line |