Skip to content

Instantly share code, notes, and snippets.

View uran1980's full-sized avatar

Ivan Yakovlev uran1980

View GitHub Profile
Installing Barracuda and Octopus
$ wget -q -U iCab http://files.aegir.cc/BOA.sh.txt
$ bash BOA.sh.txt
$ boa in-head public server.mydomain.org my@email o1
Now simply watch the progress and choose some platforms to include. Done!
And how to upgrade Barracuda and all Octopus instances?
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@uran1980
uran1980 / gist:4649478
Last active December 11, 2015 19:38
Chef :: Check platform for Chef cookbook
unless node['platform'] == "debian"
log("recipe[debian::default] included in non-Debian platform. Skipping.") { level :warn }
return
end
@uran1980
uran1980 / gist:4649491
Last active December 11, 2015 19:38
Chef :: Add dotdep repo...
case node['platform']
when 'debian'
apt_repository "dotdeb" do
uri "http://packages.dotdeb.org"
distribution "squeeze"
components ["all"]
key "http://www.dotdeb.org/dotdeb.gpg"
action :add
notifies :run, "execute[apt-get update]", :immediately
end
@uran1980
uran1980 / gist:4649501
Last active December 11, 2015 19:38
Chef :: Redis :: Add redis repo to Ubuntu or Debian
#
# Cookbook Name:: redis
# Recipe:: default
#
case node["lsb"]["id"]
when "Debian"
apt_repository "dotdeb" do
uri "http://packages.dotdeb.org"
distribution node["lsb"]["codename"]
@uran1980
uran1980 / gist:4649505
Last active December 11, 2015 19:38
Chef :: MongoDB :: Sets up the repositories for stable 10gen packages...
# Sets up the repositories for stable 10gen packages found here:
# http://www.mongodb.org/downloads#packages
case node['platform_family']
when "debian"
# Adds the repo: http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
execute "apt-get update" do
action :nothing
end
@uran1980
uran1980 / gist:4649522
Last active December 11, 2015 19:38
Chef :: Useful commands for chef knife
knife cookbook create <cookbook-name>
knife cookbook upload <cookbook-name>
knife cookbook delete <cookbook-name>
knife role from file <role-name.json|role-name.rb>
@uran1980
uran1980 / gist:4649527
Last active December 11, 2015 19:38
Shell :: Check is nginx running...
ps -ef | gerp nginx
@uran1980
uran1980 / grep-mysql-service-syslogs
Last active December 11, 2015 19:38
Shell :: Check syslogs...
grep mysql /var/log/syslog
@uran1980
uran1980 / gist:4649567
Last active December 11, 2015 19:38
Shell :: Start stop restart some Ubuntu/Debian service
sudo service nginx start|stop|restart
sudo /etc/init.d nginx start|stop|restart