GithubHelp home page GithubHelp logo

raymond-igoogle's Introduction

StockTrenz

THE STACK

  • Django application
  • Runs on heroku cedar stack
  • Backed by Postgresql database

PREREQUISITE

These instructions are for Mac OSX 10.7 only. sudo where necessary.

  • Install HomeBrew

    /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

  • Install Git

    brew install git

  • Install Postgresql

    brew install postgresql

    initdb /usr/local/var/postgres

    mkdir -p ~/Library/LaunchAgents

    cp /usr/local/Cellar/postgresql/9.1.1/org.postgresql.postgres.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

    createdb stocktrenz

  • Local Memcache Setup

    brew install memcached

  • Install libmemcached for python

    wget https://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz

    tar zxvf libmemcached-1.0.4.tar.gz

    cd libmemcached-1.0.4

    ./configure

    make

    sudo make install

  • gem install heroku

  • gem install foreman

  • python

QUICK START

  1. git clone

  2. cd stocktrenz

  3. ./setup.sh # if you have issues with lxml, talk to Shawn

  4. source .ve/bin/activate

  5. createdb stocktrenz

  6. createuser -P -e stocktrenz # enter "stocktrenz" as password

  7. python webcontent/manage.py syncdb

  8. python webcontent/manage.py migrate

  9. To start the server, you must run it from within the stocktrenz directory. Otherwise the TEMPLATE_DIR will not be found. This is to stay consistent with how it'd run within Heroku which puts the app in different directory.

     > foreman start
    
     or
    
     > python webcontent/manage.py runserver
    

Note: Default user name and password are admin/asdf

KEY LINKS

DEPLOYMENT

Automatic Pipeline

  1. Push your changes to github's master branch
  2. This will automatically trigger the jekins project for functional and unit tests
  3. If the func/unit test pass, then the build is automatically pushed to QA/Integration
  4. Load tests are then run against the QA/Integration environment

Manual Pushing to QA/Loadtest

  • Make sure you have access to the heroku app.

  • Add the heroku remote:

    git remote add heroku

  • Push your code up:

    git push heroku master

  • Run migrations:

    heroku run python webcontent/manage.py syncdb

    heroku run python webcontent/manage.py migrate

  • View your app:

    heroku open

Manual Pushing To Production

  • BE CAREFUL

  • Make sure you have access to the production heroku app.

  • Add the heroku remote:

    git remote add heroku-prod

  • Tag the release: "production--<RELEASE#>" where DATE is YYYY-MM-DD and RELEASE# is the 2 digit (XX) number for the release of the day, starting at 01.

    git tag production-2012-03-20-01 # First release of March 20th, 2012

  • Push your tag:

    git push --tags origin

  • Push your code up:

    git push heroku-prod master

  • Run migrations:

    heroku run --app stocktrenz python webcontent/manage.py migrate

  • View your app:

    heroku open --app stocktrenz

  • Inform QA to do a manual pass of production.

DEVELOPMENT

  • Put development environment tools, like ipython, in dev_requirements.txt
  • We need to keep the slug size for Heroku small
  • Also, vim is the best dev tool there is.

raymond-igoogle's People

Contributors

xxshutong avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.