Removed various contractor tools which don't belong in trunk.
- Legacy-Id: 6277
This commit is contained in:
parent
d737216440
commit
5d22979d28
4
Capfile
4
Capfile
|
@ -1,4 +0,0 @@
|
|||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
|
||||
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
|
||||
|
||||
load 'config/deploy' # remove this line to skip loading any of the default tasks
|
113
config/deploy.rb
113
config/deploy.rb
|
@ -1,113 +0,0 @@
|
|||
|
||||
# on development host.
|
||||
# these will need to be adjusted to the host being deployed to.
|
||||
set :application, "orlando"
|
||||
set :user, 'orlando'
|
||||
set :subdir, ""
|
||||
set :deploy_to, "/data/#{user}/#{subdir}#{application}"
|
||||
set :pythonver, "2.6"
|
||||
set :virtualenv, "/data/pythonenv/IETFDB"
|
||||
set :use_sudo, false
|
||||
|
||||
# this depends upon the source of the code.
|
||||
# branch is not as meaningful for SVN.
|
||||
set :scm_user, ENV['LOGNAME']
|
||||
set :ssh_options, { :forward_agent => true }
|
||||
|
||||
# GIT
|
||||
set :scm, :git
|
||||
set :branch, 'master'
|
||||
set :repository, "git+ssh://#{scm_user}@code.gatineau.credil.org/git/orlando/ietfdb"
|
||||
set :git_enable_submodules, true
|
||||
|
||||
# SVN
|
||||
#set :scm, :subversion
|
||||
#set :repository, "http://svn.tools.ietf.org/svn/tools/ietfdb/branch/ssw/agenda/v4.41"
|
||||
|
||||
set :django_environment, "cd #{release_path}"
|
||||
|
||||
# host list
|
||||
role :web, "orlando.gatineau.credil.org"
|
||||
role :app, "orlando.gatineau.credil.org"
|
||||
|
||||
namespace :deploy do
|
||||
|
||||
# the untouched "deploy" namespace contains:
|
||||
# deploy:setup
|
||||
# deploy:default
|
||||
# deploy:update
|
||||
# deploy:update_code
|
||||
# deploy:finalize_update
|
||||
# deploy:symlink
|
||||
# deploy:restart
|
||||
#
|
||||
#
|
||||
# update_code does the actual checkout/clone, then calls finalize_update. So you can override
|
||||
# finalize_update and still get the checkout and symlink functionality.
|
||||
#
|
||||
# setup has to be called separately.
|
||||
|
||||
# this overrides rails specific things.
|
||||
task :start do ; end
|
||||
task :stop do ; end
|
||||
|
||||
desc "Setup a new django instance"
|
||||
task :setup, :roles => [:app,:web] do
|
||||
setup_deploy_user_home_dir
|
||||
logdir
|
||||
end
|
||||
|
||||
|
||||
desc "Restart the apache server."
|
||||
task :restart, :roles => :web, :except => { :no_release => true } do
|
||||
# something to restart django.
|
||||
run "sudo /usr/sbin/apache2ctl graceful"
|
||||
end
|
||||
|
||||
desc "Adjust a newly checked-out release for use."
|
||||
task :finalize_update, :roles => [:app,:web,:db] do
|
||||
copy_settings
|
||||
#compilemessages
|
||||
run "env"
|
||||
end
|
||||
|
||||
desc "Copies settings_local.py to the new release."
|
||||
task :copy_settings, :roles => [:app,:web] do
|
||||
db_config = "/data/#{user}/settings_local.py"
|
||||
run "cp #{db_config} #{release_path}/ietf/settings_local.py"
|
||||
releasenum=File.basename(release_path)
|
||||
run "echo 'RELEASENUM = \'#{releasenum}\'' >#{release_path}/ietf/releasenum.py"
|
||||
end
|
||||
|
||||
desc "./manage.py compilemessages in the new release."
|
||||
task :compilemessages, :roles => [:app,:web] do
|
||||
#run "chmod 2775 #{release_path}/locale/en/LC_MESSAGES"
|
||||
#run "chmod 2775 #{release_path}/locale/fr/LC_MESSAGES"
|
||||
run "#{django_environment} && ./manage compilemessages -v 2"
|
||||
end
|
||||
|
||||
desc "./manage.py syncdb --noinit in the new release."
|
||||
task :syncdb, :roles => [:app,:web] do
|
||||
run "#{django_environment} && ./manage syncdb --noinput"
|
||||
end
|
||||
|
||||
desc "./manage.py migrate in the new release."
|
||||
task :migrate, :roles => [:app,:web] do
|
||||
run "#{django_environment} && ./manage migrate"
|
||||
end
|
||||
|
||||
desc "Creates the (shared) log directory."
|
||||
task :logdir, :roles => [:app,:web] do
|
||||
run "mkdir -p #{deploy_to}/log"
|
||||
end
|
||||
|
||||
desc "Set up deploy user\'s directory."
|
||||
task :setup_deploy_user_home_dir, :roles => [:app,:web] do
|
||||
run "mkdir -p #{deploy_to}"
|
||||
run "mkdir -p #{deploy_to}/releases"
|
||||
logdir
|
||||
run "echo 'Do not forget to copy the settings_local.py to the deploy home dir.'"
|
||||
end
|
||||
|
||||
end
|
||||
|
6
manage
6
manage
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /data/pythonenv/IETFDB/bin/activate
|
||||
# clientportal depends upon hacking the base.css, rather than extending it.
|
||||
|
||||
ietf/manage.py $*
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
REMOTE_USER=mcr+ietf@sandelman.ca ./manage runserver $*
|
|
@ -1,9 +0,0 @@
|
|||
TOP ?= .
|
||||
UP = ..
|
||||
|
||||
PKG ?= $(shell grep Package DEBIAN/control | cut -d " " -f2)
|
||||
WEEK ?= $(shell date +%Y%V)
|
||||
REV :=$(shell date +%Y%m%d.t%H%M)
|
||||
VER ?= 3.0.$(REV)
|
||||
DEB ?= $(PKG)_$(VER).deb
|
||||
INCOMING ?= credil@galaxy.gatineau.credil.org:/home/credil/incoming
|
|
@ -1,43 +0,0 @@
|
|||
include $(TOP)/common.mk
|
||||
|
||||
DIRS ?= $(shell find . -maxdepth 1 -type d | grep -v tests | egrep -v '\.$$' | sed 's/\.\///')
|
||||
SOURCEFILES ?= $(shell find $(DIRS) -type f)
|
||||
|
||||
all : deb
|
||||
|
||||
deb:: $(DEB)
|
||||
|
||||
info :
|
||||
@echo VER=$(VER)
|
||||
@echo REV=$(REV)
|
||||
@echo PKG=$(PKG)
|
||||
@echo DEB=$(DEB)
|
||||
@echo GENFILES=$(GENFILES)
|
||||
@echo DIRS=$(DIRS)
|
||||
@echo SOURCEFILES=$(SOURCEFILES) | fold -s
|
||||
|
||||
$(DEB):: ${GENFILES}
|
||||
@rm -rf tmp
|
||||
@mkdir -p tmp
|
||||
@cp -r $(DIRS) tmp
|
||||
@perl -pi \
|
||||
-e 's/\$$\(VER\)/'$(VER)'/g;' \
|
||||
-e 's/\$$\(WEEK\)/'$(WEEK)'/g;' \
|
||||
-e 's/\$$\(REVISION\)/'$(REVISION)'/g;' \
|
||||
tmp/DEBIAN/control
|
||||
@echo Packaging $(DEB)
|
||||
@fakeroot -u sh -c 'chown -f -R root tmp; dpkg-deb -b tmp $(DEB)'
|
||||
@rm -rf tmp
|
||||
|
||||
push:: $(DEB)
|
||||
@scp $(DEB) $(INCOMING)
|
||||
@if [ -n "$(INCOMING2)" ]; then scp $(DEB) $(INCOMING2); fi
|
||||
@echo $(DEB) '->' $(INCOMING) $(INCOMING2)
|
||||
|
||||
divert :
|
||||
perl $(TOP)/tools/divert $(PKG)
|
||||
|
||||
clean::
|
||||
@rm -rf *.deb tmp
|
||||
|
||||
.PHONY : all deb push divert clean
|
|
@ -1,10 +0,0 @@
|
|||
Package: ietf-ietfdb-base
|
||||
Version: $(VER)
|
||||
Section: ietf
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Provides: ietf-ietfdb-base
|
||||
Depends: python2.6, apache2, python-virtualenv, libmysqlclient-dev,
|
||||
python2.6-dev
|
||||
Maintainer: <mcr@sandelman.ca>
|
||||
Description: Installs prerequites for running IETF DB (Datatracker)
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ configure = "$1" ]; then
|
||||
: setup python stuff.
|
||||
virtualenv=/data/pythonenv/IETFDB
|
||||
mkdir -p /data/pythonenv
|
||||
virtualenv -p /usr/bin/python2.6 --no-site-packages /data/pythonenv/BASELINE
|
||||
virtualenv -p /usr/bin/python2.6 --no-site-packages ${virtualenv}
|
||||
|
||||
# we do this in two steps, because it seems that we can not upgrade
|
||||
# distribute when we need to use it to install mysql-python.
|
||||
${virtualenv}/bin/pip install --upgrade -r /etc/ietfdb/ietfdb-requirements.txt
|
||||
${virtualenv}/bin/pip install --upgrade -r /etc/ietfdb/ietfdb-requirements2.txt
|
||||
fi
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ remove = "$1" ]; then
|
||||
:
|
||||
|
||||
### BEGIN DIVERT GENERATE ###
|
||||
### END DIVERT GENERATE ###
|
||||
|
||||
fi
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ install = "$1" ]; then
|
||||
:
|
||||
|
||||
### BEGIN DIVERT GENERATE ###
|
||||
### END DIVERT GENERATE ###
|
||||
|
||||
fi
|
|
@ -1,3 +0,0 @@
|
|||
TOP = ..
|
||||
|
||||
include $(TOP)/deb.mk
|
|
@ -1 +0,0 @@
|
|||
WSGIPythonHome /data/pythonenv/BASELINE
|
|
@ -1,3 +0,0 @@
|
|||
distribute==0.6.28
|
||||
wsgiref==0.1.2
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
distribute==0.6.28
|
||||
South
|
||||
MySQL-python
|
||||
pytz
|
||||
wsgiref==0.1.2
|
||||
PyQuery
|
||||
python-magic
|
|
@ -1,10 +0,0 @@
|
|||
Package: ietf-ietfdb-devel
|
||||
Version: $(VER)
|
||||
Section: ietf
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Provides: ietf-ietfdb-devel
|
||||
Depends: ietf-ietfdb-base, mysql-server
|
||||
Maintainer: <mcr@sandelman.ca>
|
||||
Description: Installs prerequites for running IETF DB (Datatracker) locally
|
||||
as a developer.
|
|
@ -1,3 +0,0 @@
|
|||
TOP = ..
|
||||
|
||||
include $(TOP)/deb.mk
|
|
@ -1,24 +0,0 @@
|
|||
include $(TOP)/common.mk
|
||||
|
||||
DIRS ?= $(shell find . -maxdepth 1 -type d | egrep -v '\.$$' | sed 's/\.\///')
|
||||
|
||||
all : deb
|
||||
|
||||
deb : $(DEB)
|
||||
|
||||
$(DEB) :
|
||||
@rm -rf tmp
|
||||
@mkdir -p tmp tmp/DEBIAN
|
||||
@make DESTDIR=`pwd`/tmp install
|
||||
@perl -p -e 's/\$$\(VER\)/$(VER)/g' <DEBIAN/control >tmp/DEBIAN/control
|
||||
@echo Packaging $(DEB)
|
||||
@fakeroot sh -c 'chown -R root tmp; dpkg-deb -b tmp $(DEB)'
|
||||
@rm -rf tmp
|
||||
|
||||
push : $(DEB)
|
||||
scp $(DEB) $(INCOMING)
|
||||
|
||||
clean::
|
||||
@rm -rf *.deb tmp
|
||||
|
||||
.PHONY : all deb push clean
|
|
@ -1,77 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
# Autogenerate the list of packages to dpkg-divert for this .deb package
|
||||
|
||||
use File::stat;
|
||||
|
||||
# List of files that are being overriden by this package
|
||||
if (! -e "diversions") { system("touch diversions"); }
|
||||
open DIVERSIONS, "<diversions";
|
||||
my @diversions = <DIVERSIONS>;
|
||||
close DIVERSIONS;
|
||||
|
||||
my $begin_delim = "### BEGIN DIVERT GENERATE ###";
|
||||
my $end_delim = "### END DIVERT GENERATE ###";
|
||||
|
||||
my $preinst_path = "DEBIAN/preinst";
|
||||
my $postrm_path = "DEBIAN/postrm";
|
||||
my $pkg = shift;
|
||||
|
||||
# Slurp in both existing files (to use as a template)
|
||||
undef $/;
|
||||
|
||||
if(open( PREINST, "<$preinst_path")) {
|
||||
$preinst = <PREINST>;
|
||||
close PREINST;
|
||||
} else {
|
||||
$preinst='#!/bin/sh
|
||||
|
||||
if [ install = "$1" ] || [ upgrade = "$1" ]; then
|
||||
:
|
||||
'.$begin_delim."\n".$end_delim."\nfi\n";
|
||||
}
|
||||
|
||||
if(open(POSTRM, "<$postrm_path")) {
|
||||
$postrm = <POSTRM>;
|
||||
close POSTRM;
|
||||
} else {
|
||||
$postrm='#!/bin/sh
|
||||
if [ remove = "$1" ]; then
|
||||
:
|
||||
'.$begin_delim."\n".$end_delim."\nfi\n";
|
||||
}
|
||||
|
||||
# Generate preinst stub
|
||||
my $preinst_stub = "";
|
||||
foreach my $entry (@diversions)
|
||||
{
|
||||
chomp($entry);
|
||||
next if ($entry =~ /^$/);
|
||||
my @pair = split(",", $entry);
|
||||
$pair[1] =~ s/\n//;
|
||||
$preinst_stub .= " dpkg-divert --package $pkg --add --rename --divert $pair[0].$pair[1] $pair[0]\n";
|
||||
}
|
||||
$preinst =~ s/$begin_delim.*$end_delim/$begin_delim\n$preinst_stub$end_delim/s;
|
||||
|
||||
# Write generated portion back to script file
|
||||
open PREINST, ">$preinst_path";
|
||||
print PREINST $preinst;
|
||||
close PREINST;
|
||||
chmod 0755, $preinst_path;
|
||||
|
||||
# Generate postrm stub
|
||||
my $postrm_stub = "";
|
||||
foreach my $entry (@diversions)
|
||||
{
|
||||
chomp($entry);
|
||||
next if ($entry =~ /^$/);
|
||||
my @pair = split(",", $entry);
|
||||
$pair[1] =~ s/\n//;
|
||||
$postrm_stub .= " dpkg-divert --package $pkg --remove --rename --divert $pair[0].$pair[1] $pair[0]\n";
|
||||
}
|
||||
$postrm =~ s/$begin_delim.*$end_delim/$begin_delim\n$postrm_stub$end_delim/s;
|
||||
|
||||
# Write generated portion back to script file
|
||||
open POSTRM, ">$postrm_path";
|
||||
print POSTRM $postrm;
|
||||
close POSTRM;
|
||||
chmod 0755, $postrm_path;
|
Loading…
Reference in a new issue