Perfomatic/Installation: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 36: Line 36:
* if needed, grab the mysql dump from stage
* if needed, grab the mysql dump from stage


= Mac OS X installation, rough dump =  
= Mac OS X installation of CVS version =  
 
This is far from complete and needs revision and instructifying, but this is what LesOrchard has done so far before dinner.  :)


     # Install MacPorts (http://macports.org/)
     # Install MacPorts (http://macports.org/)
Line 45: Line 43:
     # ...or wherever you keep dev stuff.
     # ...or wherever you keep dev stuff.


     cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d graph-cvs mozilla/webtools/graph
     cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d graphs-cvs mozilla/webtools/new-graph
 
    sudo port install mercurial
 
    hg clone http://hg.mozilla.org/graphs/ graphs-hg


     cd graphs-hg
     ln -s `pwd`/graphs-cvs ~/Sites/


     sudo port install mysql5
     sudo port install mysql5
     # follow directions and complete installation  
     # follow directions and complete installation  
     echo "create database o_graphs; grant all privileges on o_graphs.* to o@'localhost' identified by 'o';" | mysql5 -uroot
     echo "create database o_graphs; grant all privileges on o_graphs.* to o@'localhost' identified by 'o';" | mysql5 -uroot
    cd graphs-hg
     mysql5 -uroot o_graphs < sql/schema.sql
     mysql5 -uroot o_graphs < sql/schema.sql


Line 76: Line 67:
     # Uncomment line 383:
     # Uncomment line 383:
     # AddHandler cgi-script .cgi
     # AddHandler cgi-script .cgi
    sudo port install mod_python25
    ########################################################
    # to enable mod_python add
    #  LoadModule python_module modules/mod_python.so
    # to your apache2 config file:
    #  /opt/local/apache2/conf/httpd.conf
    ########################################################


     # Be sure to disable Apple's apache
     # Be sure to disable Apple's apache
Line 90: Line 72:
     sudo /opt/local/apache2/bin/apachectl start
     sudo /opt/local/apache2/bin/apachectl start


     sudo port install wget
     mkdir data
 
     curl http://build-graphs.mozilla.org/db/dhtml/bl-bldlnx01_fx-linux-tbox-head > data/sample1.txt
     # (temporary) Add these two lines to the top of graphs-hg/server/graphsdb.py
     chmod +x utils/import.py
     # import sys
     ./utils/import.py foo bar baz quux < data/sample1.txt
     # sys.path.append("../")


    ln -s `pwd`/graphs-hg ~/Sites/
     # visit http://localhost/~username/graphs-cvs/graph.html
     # visit http://localhost/~USERNAME/graphs-hg/server/getdata.cgi
    # This may not yet work

Revision as of 19:41, 3 July 2008

Get the Code

Server Requirements

  • Python 2.?
  • Apache 2.x + mod_python
  • mod_rewrite
  • MySQL 5.x
  • memcached (someday)

Set Up Database

Configure Application

  • DB config?
  • Path info?
  • Apache
    • Set vhost dir to the root hg directory.
    • set cgi-bin to hgroot/server

Creating Test Data

  • Link to script to populate test data and instructions on how to use it
  • Check this in to Hg
  • Provide seed data (maybe a default .csv with random info)

FAQ

  • How do we get the right version of pysqlite2 off of fink for OSX? (use MySQL?)
  • Installing the required python MySQL packages is almost impossible (still working on it (Ryan))

Build Graph Stage Server

  • For reference we can look at bm-buildgraph01
  • ip: 10.2.74.15
  • /var/www/html/graphs
  • /var/www/html/graphs/g2
  • if needed, grab the mysql dump from stage

Mac OS X installation of CVS version

   # Install MacPorts (http://macports.org/)
   cd ~/devel
   # ...or wherever you keep dev stuff.
   cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d graphs-cvs mozilla/webtools/new-graph
   ln -s `pwd`/graphs-cvs ~/Sites/
   sudo port install mysql5
   # follow directions and complete installation 
   echo "create database o_graphs; grant all privileges on o_graphs.* to o@'localhost' identified by 'o';" | mysql5 -uroot
   mysql5 -uroot o_graphs < sql/schema.sql
   sudo port install python25
   sudo port install python_select
   sudo python_select python25
   sudo port install py25-mysql
   curl -O http://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/pysqlite-2.4.1.tar.gz
   tar -zxf pysqlite-2.4.1.tar.gz
   cd pysqlite-2.4.1
   sudo python setup.py install
   sudo port install apache2
   # Make sure .cgi runs CGI scripts
   # Uncomment line 383:
   # AddHandler cgi-script .cgi
   # Be sure to disable Apple's apache
   sudo /usr/sbin/apachectl stop
   sudo /opt/local/apache2/bin/apachectl start
   mkdir data
   curl http://build-graphs.mozilla.org/db/dhtml/bl-bldlnx01_fx-linux-tbox-head > data/sample1.txt
   chmod +x utils/import.py
   ./utils/import.py foo bar baz quux < data/sample1.txt
   # visit http://localhost/~username/graphs-cvs/graph.html