Skip to content

Instantly share code, notes, and snippets.

Matthew Macdonald-Wallace proffalken

View GitHub Profile
proffalken / logging.conf
Last active Aug 29, 2015
Raven Stacktrace
View logging.conf
keys = root, iso8601, nova, amqplib, sqlalchemy, suds, eventlet.wsgi, nova.openstack.common.rpc.amqp, nova.scheduler.filters.retry_filter, nova.scheduler.filters.image_props_filter, nova.scheduler.filters.disk_filter, nova.servicegroup.drivers.db, nova.servicegroup.api, nova.scheduler.host_manager, root
keys = sentry, watchedfile
keys = context, default
qualname = root
level = DEBUG
from flask import Flask, render_template
import pygerrit
app = Flask(__name__)
def not_found(error):
return render_template('404.html'), 404
View Error
vhost.rb:7: undefined method `createDomainLinux' for #<Libvirt::Connect:0x7f117529b5e8> (NoMethodError)
from vhost.rb:6:in `open'
from vhost.rb:6
View vhost.rb
require 'libvirt'
conn = Libvirt::open("qemu:///system")
puts conn.capabilities
xmlcontent ="domain.xml")
conn.create_domain_linux(xmlcontent, nil)
View Capfile
# Deploy Variables:
set :scm_uri, "http://svnserver/svn" # The URI of the SCM server (http://server/svn or git://server etc)
set :application, "mycoolwebapp" # The name of the application (also doubles as the repository name
View config.rb
namespace :deploy do
desc <<-DESC
Checks the latest version of the libraries
to make sure we're not deploying our code
onto a platform which is not prepared for it
task :checkdeps do
required_libs.each do | appname,version |
current_version = capture("cat /var/www/#{appname}/application/config/version").strip()
if version.to_f() > current_version.to_f() then
View config.rb
set :repository_root, "#{scm_uri}/#{application}"
set(:release) {
Capistrano::CLI.ui.ask("Release Version to deploy (or type 'trunk' to deploy from trunk): ")
set(:repository) {
(release == "trunk") ? "#{repository_root}/trunk" : "#{repository_root}/releases/Release-#{release}"
View Capfile
# Set the dependencies for this application (format: 'application' => 'version number')
set :required_libs, {'libs' => '0.2'}
# Other stuff goes here...
#Check all dependencies before setting up and deploying
before 'deploy:setup', 'deploy:checkdeps'
before 'deploy', 'deploy:checkdeps'
proffalken / Capfile
Created May 27, 2011
Puppet, MCollective and Capistrano
View Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
require 'capistrano'
require 'rubygems'
require 'railsless-deploy'
load 'config/deploy'
proffalken / deploy.rb
Created May 27, 2011
View deploy.rb
set :stages, %w[staging production]
set :deploy_to, "/usr/share/puppet/configuration"
set :deploy_via, :export
set :application, "Puppet Manifests"
set :repository, "git://gitserver/puppet.git"
set :scm, :git
set :default_stage, "staging"
set :use_sudo, false
require 'capistrano/ext/multistage'
You can’t perform that action at this time.