No description, website, or topics provided.
Python JavaScript Other
Switch branches/tags
2.0 1.1 1.0 20120521154717-815714e 20120521154146-815714e 20120521153200-485f21b 20120521110323-fd7aa37 20120521110256-fd7aa37 20120521110233-cb61252 20120518204003-125c059 20120518203034-125c059 20120518202309-513fae9 20120518140836-43b4029 20120518131528-83e4849 20120517211043-83e4849 20120517200535-28074ad 20120517193110-28074ad 20120517182848-28074ad 20120517182205-28074ad 20120517155459-98dd5ef 20120517155409-98dd5ef 20120516211304-267c47b 20120516143652-4b5f659 20120515161130-e93e8c2 20120515143222-61c9f7b 20120514155925-c4f9a84 20120514153949-c4f9a84 20120514153719-c4f9a84 20120514153212-8f91072 20120514095845-f4494b8 20120514095638-f4494b8 20120511153844-07513c5 20120511153015-dc34e0f 20120511152241-dc34e0f 20120511151935-dc34e0f 20120511151100-dc34e0f 20120511150451-dc34e0f 20120511150303-dc34e0f 20120511150042-dc34e0f 20120511145942-902e436 20120510164201-dfda29d 20120510133256-73621ba 20120510131639-afbacd0 20120510124020-d0f1184 20120509161658-5344a64 20120509145643-e635b09 20120509141220-c3614d1 20120509100123-91eca37 20120507085328-983c26c 20120505063139-ed81c2a 20120504125648-fae4419 20120504093715-498cb01 20120504093415-498cb01 20120504090618-498cb01 20120503163002-3c18e54 20120503151519-cd90460 20120503150103-cd90460 20120503145105-cd90460 20120503145020-cd90460 20120501173357-259c9ce 20120501172652-259c9ce 20120430180445-1525c25 20120430180041-1525c25 20120430162532-5e48349 20120430162520-5e48349 20120426081841-5c6ba2a 20120425164823-e65d10a 20120425164816-e65d10a 20120425151758-9aa140f 20120425151321-9aa140f 20120425151316-9aa140f 20120425145400-9aa140f 20120425144051-9aa140f 20120425143902-9aa140f 20120425094119-07e8fc1 20120424155257-36029d5 20120424155231-36029d5 20120424153528-1b9b9e8 20120424153410-1b9b9e8 20120424151959-1b9b9e8 20120424151616-1b9b9e8 20120424142729-be1ac1e 20120424142705-be1ac1e 20120424142555-be1ac1e 20120424115935-eaba8c0 20120419155119-39da90d 20120419154405-39da90d 20120419110310-39da90d 20120419104444-e753ac4 20120419101332-13790fe 20120413090237-ccd3f64 20120412173632-90d471b 20120412172322-869ac21 20120412162723-8810a28 20120412162619-8810a28 20120412162416-0f4e0a4 20120412161000-0eb9da4 20120412160922-0eb9da4 20120412160628-0eb9da4 20120412160451-0eb9da4
Nothing to show
Pull request Compare This branch is 721 commits behind mozilla:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
docs
fabric
lib/product_details_json
make_mozilla
media
migrations
puppet
requirements
vendor @ 7547d25
vendor-local
wsgi
.gitignore
.gitmodules
LICENSE
MANIFEST.in
README.md
Vagrantfile
fabfile.py
manage.py
setup.py
vagrantconfig.yaml
vagrantconfig_local.yaml-dist

README.md

make.mozilla.org

This app is built using Mozilla's Playdoh.

Deployment instructions are towards the bottom of this file.

Local development

We're using PostGIS + GeoDjango for the DB, so you'll also need the following installed

  • Postgresql 8.4 +
  • PostGIS >= 1.4 && < 2.0
  • Geos
  • Proj4
  • GDAL

Mac OS X

With Homebrew, installing PostGIS and GDAL will install all you need:

brew update
brew install postgis gdal

Ubuntu

For Ubuntu 10.04, see the information in our Puppet config (./puppet/manifests/dev.pp and the classes in ./puppet/manifests/classes)

For Ubuntu release >= 11.10, this should work:

sudo apt-get install binutils gdal-bin libproj-dev postgresql-9.1-postgis \
     postgresql-server-dev-9.1

Once those are installed, then pip install -r requirements/compiled.txt should work as expected.

GeoDjango

GeoDjango is installed as part of Django. You need to take a look at the installation instructions at [https://docs.djangoproject.com/en/1.3/ref/contrib/gis/install/#post-installation] to get PostGIS configured properly with Django. Ubuntu's version ships with a postgis-template generation script, which you can see used in ./puppet/manifests/classes/postgis.pp

Deployment

We're making heavy use of Fabric and Puppet to automate deployment. Deployment has been tested on a Ubuntu 10.04 box, and puppet recipes will likely fail on later versions of Ubuntu (or any Debian version), and certainly would on RHEL / CentOS systems.

Note that we're using Puppet 0.25, because that's what comes with Ubuntu 10.04. It's old, you'll find a lot of newer recipes and examples out on the web won't run unmodified on it.

Prequisites

  • A machine set up for local development

  • A user with sudo access on a Ubuntu 10.04 box with openssh-server installed and running. No other pre-puppet dependencies.

  • The machine you want to deploy to listed in the hosts dict in fabfile.py

  • The SSH pubkey of any developers who should have deploy access contained in puppet/files/deploy_keys (this will become the .ssh/authorized_keys file for the server user the app runs as.

Initial setup

fab puppet.setup
fab puppet.apply
fab deploy.cold

fab puppet.setup installs the Puppet packages on the box. fab puppet.apply uploads and applies the current puppet recipes. Note that this is not done from Git, but from the deployers working directory, so be careful about uncommitted changes. fab deploy.cold Actually deploys the app, performing first-run setup and running DB migrations.

If you're not deploying to the default server (you can change the default on line 21 of fabfile.py) then you need to specify which set of hosts to use:

TO=production fab puppet.setup
TO=production fab puppet.apply
TO=production fab deploy.cold

If your sudoer's username on the box you're deploying too doesn't match your local username:

fab -u remote_username puppet.setup

If you need to do both the above mods:

TO=production fab -u remote_username puppet.setup

Updates to Puppet

fab puppet.apply

Provided there are no bugs in the puppet recipes, running fab puppet.apply should only do something if there's a change to apply - it's safe to run multiple times, and even if there are no new changes.

Regular deployment

fab deploy
```

This doesn't run the Migrations. To deploy and run migrations run:

```bash
fab deploy_with_migrations
```

Notes on the Puppet setup
-------------------------

The main Puppet manifest is `puppet/manifests/dev.pp`, which in turn includes all the rest of the resources in a single class, then includes that class - puppet then tries to make sure all the resources described in `puppet/manifests/classes/*.pp` are included and brought up to date. If you need to add more things to the Puppet recipes, add them in a file in `puppet/manifests/classes` and then put an include line into `puppet/manifests/dev.pp`

E.g., add resources to `puppet/manifests/classes/my_file.pp` and then, in `dev.pp`:

```
class dev {
  include app_users
  ...
  include my_file
}
```

I don't think this is an entirely standard way of doing things, but it works well with a single-machine single-OS deployment.

playdoh: about the framework
============================

Mozilla's Playdoh is a web application template based on [Django][django].

Patches are welcome! Feel free to fork and contribute to this project on
[github][gh-playdoh].

Full Playdoh [documentation][docs] is available as well.

[django]: http://www.djangoproject.com/
[gh-playdoh]: https://github.com/mozilla/playdoh
[docs]: http://playdoh.rtfd.org/


License
-------
This software is licensed under the [New BSD License][BSD]. For more
information, read the file ``LICENSE``.

[BSD]: http://creativecommons.org/licenses/BSD/