Skip to content

Commit

Permalink
bug 735131 - move socorro-vagrant out of submodule into main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed Mar 13, 2012
1 parent 1d5f39a commit d2fd2c6
Show file tree
Hide file tree
Showing 29 changed files with 2,642 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ docs/_build/
*~
.coverage
cover/
.vagrant
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "vagrant"]
path = vagrant
url = git://github.com/rhelmer/socorro-vagrant.git
[submodule "configman"]
path = configman
url = git://github.com/mozilla/configman.git
16 changes: 16 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Vagrant::Config.run do |config|
config.vm.box = "socorro-all"
config.vm.network :hostonly, "33.33.33.10"
config.vm.customize ["modifyvm", :id, "--memory", "1024"]
# enable this to see the GUI if vagrant cannot connect
#config.vm.boot_mode = :gui
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "init.pp"
# enable this to see verbose and debug puppet output
#puppet.options = "--verbose --debug"
end
Vagrant::Config.run do |config|
config.vm.share_folder("socorro-code", "/home/socorro/dev/socorro", "./", :nfs => true)
end
end
Empty file.
20 changes: 20 additions & 0 deletions puppet/files/etc_apache2_sites-available/crash-reports
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# vim: syntax=apache
WSGIPythonPath /data/socorro/application:/data/socorro/thirdparty:/data/socorro/application/scripts
<VirtualHost *:80>
ServerName crash-reports
DocumentRoot /data/socorro

Options FollowSymLinks
TimeOut 300
WSGIScriptAlias / /data/socorro/application/scripts/collector.py

<Location /submit>
LimitRequestBody 20971520
</Location>

ReWriteEngine on
RewriteCond %{REQUEST_METHOD} GET
RewriteRule .* http://crash-stats

AddDefaultCharset UTF-8
</VirtualHost>
32 changes: 32 additions & 0 deletions puppet/files/etc_apache2_sites-available/crash-stats
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# vim: syntax=apache
<VirtualHost *:80>
ServerName crash-stats
DocumentRoot /data/socorro/htdocs

ReWriteEngine On

RewriteCond %{REQUEST_URI} /dumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).jsonz
ReWriteRule /dumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).jsonz http://socorro-api/crashes/crash/processed/by/uuid/$1$2$3$4 [P]

RewriteCond %{REQUEST_URI} /rawdumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).dump
ReWriteRule /rawdumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).dump http://socorro-api/crashes/crash/raw_crash/by/uuid/$1$2$3$4 [P]

RewriteCond %{REQUEST_URI} /rawdumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).json
ReWriteRule /rawdumps/(\w\w)(\w\w)((?:\w|-)+?)(\d{6}).json http://socorro-api/crashes/crash/meta/by/uuid/$1$2$3$4 [P]

ReWriteRule /rawdumps/(.*).(json|dump) /missing_dump [L]

<Directory /data/socorro/htdocs>
ReWriteEngine On
AllowOverride All
</Directory>

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" is-forwarded
AddDefaultCharset UTF-8
</VirtualHost>

46 changes: 46 additions & 0 deletions puppet/files/etc_apache2_sites-available/socorro-api
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# vim: syntax=apache
WSGISocketPrefix /var/run/bpapi_s
WSGISocketPrefix /var/run/bpapi_nossl
WSGIPythonPath /data/socorro/application:/data/socorro/thirdparty:/data/socorro/application/scripts
<VirtualHost *:80>
ServerName socorro-api
# Redirect /bpapi https://socorro-api

RewriteEngine On
RequestHeader set Accept application/octet-stream

WSGIDaemonProcess bpapi_nossl user=socorro threads=10 python-path=/data/socorro/application:/data/socorro/thirdparty:/data/socorro/application/scripts
WSGIScriptAlias /crashes /data/socorro/application/scripts/webservices.py
WSGIProcessGroup bpapi_nossl
WSGIApplicationGroup %{GLOBAL}
LogLevel info

WSGIDaemonProcess bpapi_s user=socorro threads=10 python-path=/data/socorro/application:/data/socorro/thirdparty:/data/socorro/application/scripts
WSGIScriptAlias /bpapi /data/socorro/application/scripts/webservices.py

</VirtualHost>

#<VirtualHost *:443>
# ServerName socorro-api
# SSLEngine On
# SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
# SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
# DocumentRoot /data/socorro/application
# WSGIDaemonProcess bpapi_s user=socorro threads=10 python-path=/data/socorro/application:/data/socorro/thirdparty:/data/socorro/application/scripts
# WSGIScriptAlias /bpapi /data/socorro/application/scripts/webservices.py
# WSGIApplicationGroup %{GLOBAL}
# LogLevel info
#
# <Location /bpapi>
# Order deny,allow
# Deny from all
# SSLRequireSSL
# AuthType Basic
# AuthName "Magic Words Please"
# AuthUserFile /data/socorro/application/.htpasswd
# # Allow from myserver
# Require valid-user
# Satisfy Any
# </Location>
#</VirtualHost>
#
2 changes: 2 additions & 0 deletions puppet/files/etc_apt_sources.list.d/cloudera.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deb http://archive.cloudera.com/debian lucid-cdh3 contrib
deb-src http://archive.cloudera.com/debian lucid-cdh3 contrib
14 changes: 14 additions & 0 deletions puppet/files/etc_crond/socorro
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MAILTO="cron-socorro@example.com"
*/5 * * * * socorro /data/socorro/application/scripts/crons/cron_status.sh
02 * * * * socorro /data/socorro/application/scripts/crons/cron_aggregates.sh
02 * * * * socorro /data/socorro/application/scripts/crons/cron_duplicates.sh
# reportsclean must run after duplicates, see bug 697772
45 * * * * socorro /data/socorro/application/scripts/crons/cron_reportsclean.sh
11 * * * * socorro /data/socorro/application/scripts/crons/cron_bugzilla.sh
22 * * * * socorro /data/socorro/application/scripts/crons/cron_fixbrokendumps.sh
00 02 * * * socorro /data/socorro/application/scripts/crons/cron_daily_matviews.sh
05 * * * * socorro /data/socorro/application/scripts/crons/cron_ftpscraper.sh
00 17 * * * socorro /data/socorro/application/scripts/crons/cron_modulelist.sh
05 21 * * 2 socorro /data/socorro/application/scripts/crons/cron_create_partitions.sh

05 00 * * * socorro /data/socorro/application/scripts/crons/cron_libraries.sh > /var/log/socorro/cron_libraries.log 2>&1
30 changes: 30 additions & 0 deletions puppet/files/etc_hbase_conf/hbase-site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
* Copyright 2010 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///var/lib/hbase</value>
</property>
</configuration>

2 changes: 2 additions & 0 deletions puppet/files/etc_profile.d/java.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export JAVA_HOME=/data/jdk1.7.0_03
export PATH=$JAVA_HOME/bin:$PATH
7 changes: 7 additions & 0 deletions puppet/files/etc_supervisor/1-socorro-processor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[program:socorro-processor]
user = socorro
command = /data/socorro/application/scripts/startProcessor.py
environment = PYTHONPATH="/data/socorro/application:/data/socorro/thirdparty:/data/socorro/scripts"
autorestart = true
stderr_logfile = /var/log/socorro/processor-stderr.log
stdout_logfile = /var/log/socorro/processor-stdout.log
7 changes: 7 additions & 0 deletions puppet/files/etc_supervisor/2-socorro-crashmover.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[program:socorro-crashmover]
user = socorro
command = /data/socorro/application/scripts/newCrashMover.py
environment = PYTHONPATH="/data/socorro/application:/data/socorro/thirdparty:/data/socorro/scripts"
autorestart = true
stderr_logfile = /var/log/socorro/crashmover-stderr.log
stdout_logfile = /var/log/socorro/crashmover-stdout.log
8 changes: 8 additions & 0 deletions puppet/files/etc_supervisor/3-socorro-monitor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[program:socorro-monitor]
user = socorro
command = /data/socorro/application/scripts/startMonitor.py
environment = PYTHONPATH="/data/socorro/application:/data/socorro/thirdparty:/data/socorro/scripts"
autorestart = true
stderr_logfile = /var/log/socorro/monitor-stderr.log
stdout_logfile = /var/log/socorro/monitor-stdout.log

10 changes: 10 additions & 0 deletions puppet/files/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
127.0.0.1 localhost
127.0.1.1 vagrantup.com lucid64 lucid32 vagrantup crash-stats crash-reports socorro-api

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Loading

0 comments on commit d2fd2c6

Please sign in to comment.