aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/devel/codebase.rst2
-rw-r--r--docs/source/devel/storage.rst94
-rw-r--r--docs/source/pluginwriter/api.rst27
-rw-r--r--docs/source/siteadmin/deploying.rst14
-rw-r--r--docs/source/siteadmin/media-types.rst37
-rw-r--r--docs/source/siteadmin/relnotes.rst14
6 files changed, 179 insertions, 9 deletions
diff --git a/docs/source/devel/codebase.rst b/docs/source/devel/codebase.rst
index 9718a097..122a3297 100644
--- a/docs/source/devel/codebase.rst
+++ b/docs/source/devel/codebase.rst
@@ -119,7 +119,7 @@ Software Stack
* `Python <http://python.org/>`_: the language we're using to write
this
- * `Nose <http://somethingaboutorange.com/mrl/projects/nose/>`_:
+ * `Py.Test <http://pytest.org/>`_:
for unit tests
* `virtualenv <http://www.virtualenv.org/>`_: for setting up an
diff --git a/docs/source/devel/storage.rst b/docs/source/devel/storage.rst
index 52406c4e..215f9579 100644
--- a/docs/source/devel/storage.rst
+++ b/docs/source/devel/storage.rst
@@ -2,18 +2,28 @@
Storage
=========
-
-See for now: http://wiki.mediagoblin.org/Storage
-
-Things get moved here.
-
-
The storage systems attached to your app
----------------------------------------
Dynamic content: queue_store and public_store
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Two instances of the StorageInterface come attached to your app. These
+are:
+
++ **queue_store:** When a user submits a fresh piece of media for
+ their gallery, before the Processing stage, that piece of media sits
+ here in the queue_store. (It's possible that we'll rename this to
+ "private_store" and start storing more non-publicly-stored stuff in
+ the future...). This is a StorageInterface implementation
+ instance. Visitors to your site probably cannot see it... it isn't
+ designed to be seen, anyway.
+
++ **public_store:** After your media goes through processing it gets
+ moved to the public store. This is also a StorageInterface
+ implelementation, and is for stuff that's intended to be seen by
+ site visitors.
+
The workbench
~~~~~~~~~~~~~
@@ -32,6 +42,28 @@ See the workbench module documentation for more.
Static assets / staticdirect
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+On top of all that, there is some static media that comes bundled with your
+application. This stuff is kept in:
+
+ mediagoblin/static/
+
+These files are for mediagoblin base assets. Things like the CSS files,
+logos, etc. You can mount these at whatever location is appropriate to you
+(see the direct_remote_path option in the config file) so if your users
+are keeping their static assets at http://static.mgoblin.example.org/ but
+their actual site is at http://mgoblin.example.org/, you need to be able
+to get your static files in a where-it's-mounted agnostic way. There's a
+"staticdirector" attached to the request object. It's pretty easy to use;
+just look at this bit taken from the
+mediagoblin/templates/mediagoblin/base.html main template:
+
+ <link rel="stylesheet" type="text/css"
+ href="Template:Request.staticdirect('/css/extlib/text.css')"/>
+
+see? Not too hard. As expected, if you configured direct_remote_path to be
+http://static.mgoblin.example.org/ you'll get back
+http://static.mgoblin.example.org/css/extlib/text.css just as you'd
+probably expect.
StorageInterface and implementations
------------------------------------
@@ -39,5 +71,55 @@ StorageInterface and implementations
The guts of StorageInterface and friends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+So, the StorageInterface!
+
+So, the public and queue stores both use StorageInterface implementations
+... but what does that mean? It's not too hard.
+
+Open up:
+
+ mediagoblin/storage.py
+
+In here you'll see a couple of things. First of all, there's the
+StorageInterface class. What you'll see is that this is just a very simple
+python class. A few of the methods actually implement things, but for the
+most part, they don't. What really matters about this class is the
+docstrings. Each expected method is documented as to how it should be
+constructed. Want to make a new StorageInterface? Simply subclass it. Want
+to know how to use the methods of your storage system? Read these docs,
+they span all implementations.
+
+There are a couple of implementations of these classes bundled in
+storage.py as well. The most simple of these is BasicFileStorage, which is
+also the default storage system used. As expected, this stores files
+locally on your machine.
+
+There's also a CloudFileStorage system. This provides a mapping to
+[OpenStack's swift http://swift.openstack.org/] storage system (used by
+RackSpace Cloud files and etc).
+
+Between these two examples you should be able to get a pretty good idea of
+how to write your own storage systems, for storing data across your
+beowulf cluster of radioactive monkey brains, whatever.
+
Writing code to store stuff
~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+So what does coding for StorageInterface implementations actually look
+like? It's pretty simple, really. For one thing, the design is fairly
+inspired by [Django's file storage API
+https://docs.djangoproject.com/en/dev/ref/files/storage/]... with some
+differences.
+
+Basically, you access files on "file paths", which aren't exactly like
+unix file paths, but are close. If you wanted to store a file on a path
+like dir1/dir2/filename.jpg you'd actually write that file path like:
+
+['dir1', 'dir2', 'filename.jpg']
+
+This way we can be *sure* that each component is actually a component of
+the path that's expected... we do some filename cleaning on each component.
+
+Your StorageInterface should pass in and out "file like objects". In other
+words, they should provide .read() and .write() at minimum, and probably
+also .seek() and .close().
diff --git a/docs/source/pluginwriter/api.rst b/docs/source/pluginwriter/api.rst
index 44ffd6e8..df933511 100644
--- a/docs/source/pluginwriter/api.rst
+++ b/docs/source/pluginwriter/api.rst
@@ -16,10 +16,35 @@
Plugin API
==========
+This documents the general plugin API.
+
+Please note, at this point OUR PLUGIN HOOKS MAY AND WILL CHANGE.
+Authors are encouraged to develop plugins and work with the
+MediaGoblin community to keep them up to date, but this API will be a
+moving target for a few releases.
+
+Please check the release notes for updates!
+
:mod:`pluginapi` Module
-----------------------
.. automodule:: mediagoblin.tools.pluginapi
:members: get_config, register_routes, register_template_path,
register_template_hooks, get_hook_templates,
- callable_runone, callable_runall
+ hook_handle, hook_runall, hook_transform
+
+Configuration
+-------------
+
+Your plugin may define its own configuration defaults.
+
+Simply add to the directory of your plugin a config_spec.ini file. An
+example might look like::
+
+ [plugin_spec]
+ some_string = string(default="blork")
+ some_int = integer(default=50)
+
+This means that when people enable your plugin in their config you'll
+be able to provide defaults as well as type validation.
+
diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst
index 77e60037..f2f71e01 100644
--- a/docs/source/siteadmin/deploying.rst
+++ b/docs/source/siteadmin/deploying.rst
@@ -345,3 +345,17 @@ Visit the site you've set up in your browser by visiting
smaller deployments. However, for larger production deployments
with larger processing requirements, see the
":doc:`production-deployments`" documentation.
+
+
+Security Considerations
+~~~~~~~~~~~~~~~~~~~~~~~
+
+.. warning::
+
+ The directory ``user_dev/crypto/`` contains some very
+ sensitive files.
+ Especially the ``itsdangeroussecret.bin`` is very important
+ for session security. Make sure not to leak its contents anywhere.
+ If the contents gets leaked nevertheless, delete your file
+ and restart the server, so that it creates a new secret key.
+ All previous sessions will be invalifated then.
diff --git a/docs/source/siteadmin/media-types.rst b/docs/source/siteadmin/media-types.rst
index 23d3f3b9..210094b9 100644
--- a/docs/source/siteadmin/media-types.rst
+++ b/docs/source/siteadmin/media-types.rst
@@ -195,3 +195,40 @@ Run
You should now be able to upload .obj and .stl files and MediaGoblin
will be able to present them to your wide audience of admirers!
+
+PDF and Document
+================
+
+To enable the "PDF and Document" support plugin, you need pdftocairo, pdfinfo,
+unoconv with headless support. All executables must be on your execution path.
+
+To install this on Fedora:
+
+.. code-block:: bash
+
+ sudo yum install -y poppler-utils unoconv libreoffice-headless
+
+pdf.js relies on git submodules, so be sure you have fetched them:
+
+.. code-block:: bash
+
+ git submodule init
+ git submodule update
+
+This feature has been tested on Fedora with:
+ poppler-utils-0.20.2-9.fc18.x86_64
+ unoconv-0.5-2.fc18.noarch
+ libreoffice-headless-3.6.5.2-8.fc18.x86_64
+
+It may work on some earlier versions, but that is not guaranteed.
+
+Add ``mediagoblin.media_types.pdf`` to the ``media_types`` list in your
+``mediagoblin_local.ini`` and restart MediaGoblin.
+
+Run
+
+.. code-block:: bash
+
+ ./bin/gmg dbupdate
+
+
diff --git a/docs/source/siteadmin/relnotes.rst b/docs/source/siteadmin/relnotes.rst
index 6962dc5a..04863ec6 100644
--- a/docs/source/siteadmin/relnotes.rst
+++ b/docs/source/siteadmin/relnotes.rst
@@ -100,7 +100,19 @@ MongoDB-based MediaGoblin instance to the newer SQL-based system.
**Do this to upgrade**
-1. Make sure to run ``bin/gmg dbupdate`` after upgrading.
+ # directory of your mediagoblin install
+ cd /srv/mediagoblin.example.org
+
+ # copy source for this release
+ git fetch
+ git checkout tags/v0.3.2
+
+ # perform any needed database updates
+ bin/gmg dbupdate
+
+ # restart your servers however you do that, e.g.,
+ sudo service mediagoblin-paster restart
+ sudo service mediagoblin-celeryd restart
**New features**