Code Monkey home page Code Monkey logo

locus's Introduction

Setting up with ansible

  • Vagrant
  • VirtualBox
  • Ansible

Running dev server

Initial setup

`vagrant up`
[Loading raster data for bioregion reports]
[Loading vector data for bioregion reports]
[Create local_vars.yml]
[Loading Bioregions]
`cd deploy`
`ansible-playbook provision-locus.yml -i hosts`
[Create superuser]
[Run server]
[Create Social App Profiles]
[Map report vectors]

Loading raster data for bioregion reports

Get the raster data
	Ecotrusters: gis/projects/projects2013/Locus/raster_data.tar.gz
unzip to /usr/local/apps/locus/data 
	result: /usr/local/apps/locus/data/reports/...
	NOTE: This location is absolute. A different location will require many changes to the fixture.

Loading vector data for bioregion reports

Get the vector data
	Ecotrusters: gis/projects/projects2013/Locus/vector_data.tar.gz
unzip to /usr/local/apps/locus/data [or where VECTOR_DATA_LOCATION points in settings_local.py]
	result: /usr/local/apps/locus/data/shapefiles/...

Create local_vars.yml

copy deploy/local_vars.yml.template to deploy/local_vars.yml
get your facebook app id and app secret id from your facebook developer settings
set a database password
Also set your Twitter API Credentials while you're in there:
	twitteraccesstoken and twitteraccesstokensecret (log in to dev.twitter.com and look at your API keys)

Loading Bioregions

Get the bioregion and thiessen data
	Ecotrusters: gis/projects/projects2013/Locus/DEMO.tar.gz
unzip to /usr/local/apps/locus/media
	result: /usr/local/apps/locus/media/DEMO/...
Load the user and some initial bioregions:
	python manage.py loaddata fbapp/fixtures/gen_bioreg.json

Create Superuser

This is a django app - simply: 
- ssh into the machine (`vagrant ssh`)
- get into your virtual environment (`source go`)
- `python manage.py createsuperuser` and follow the prompts.

Run server

from host: 
	if you have fabric installed, run `fab dev runserver`
from VM:
	`source ~/go`  (get into virtual env, cd /usr/local/apps/locus/locus)
	`python manage.py runserver`

Create Social App Profiles

Log in to the django admin with the superuser you created:
	http://locahost:8000/admin
Select Social apps
	Facebook should already exist
Click 'Add social app'
	Provider: Twitter
	Name: twitter
	Client id:	[from dev.twitter.com 'API key']
	Secret:	[from dev.twitter.com 'API secret']

Map report vectors

vagrant ssh
source go
python manage.py map_report_vectors

# Running production/stage server

Follow above but instead of vagrant, run puppet apply manually.

For production
* Use a different settings.APP_ID
* Use a different social.json (facebook developer account)

locus's People

Contributors

perrygeo avatar rhodges avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

imclab wunl

locus's Issues

Implement Sarah's New Site Design

Sarah redesigned this app to feel more like it fits with Commonplace. This issue is likely to be broken into MANY issues and perhaps deserves its own milestone. For now this will hold its place.

Cron Job: Remove Temp Report Data [1 day]

Report Generation creates temp files. These are normally purged immediately when they're done, but not since we set STARSPAN_REMOVE_TMP to "False".

Have the cron job delete /tmp/madrona.raster_stats/ content that is over 1 hour old.

Get API Up To Snuff

The API works for the prototype and is now documented. Review the needs of Sarah's design and your own notes on its needs to find discrepancies between those and what has been implemented thus far.

Work with @willthemoor to identify other gaps in the API as well.

Facebook Wall Engagement Strategy [4 days]

example: 1 post per day giving one story and count of other stories posted.
1 post, 12 hour cooldown, then post first story posted after, 12 hour cooldown, rinse repeat.

Celery.

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.